Code example for SQLiteStatement

Methods: bindDouble, executeInsert

0
    } 
 
    @Override 
    public long insert(ApproximateLocation location) {
 
        this.mInsertStmt.bindDouble(1, location.getLatitude());
        this.mInsertStmt.bindDouble(2, location.getLongitude());
        long index = this.mInsertStmt.executeInsert();
        Log.d(TAG,
                DATABASE_NAME
                        + "Inserted latitude and longitude: " 
                        + numberLogList(location.getLatitude(),
                                location.getLongitude()));
 
        return index;
    } 
 
    public void insert(List<ApproximateLocation> locations) {
        // TODO test batch insert speed 
        DatabaseUtils.InsertHelper batchInserter = new DatabaseUtils.InsertHelper(
                mDatabase, TABLE_NAME);