Code example for SQLiteStatement

Methods: bindLong, bindString, execute

0
  public void renameRoute(final int localId, final String newName)
  { 
    final String ROUTE_TABLE_RENAME =
      "UPDATE route SET name = ? WHERE " + BaseColumns._ID + " = ?";
    final SQLiteStatement update = db_.compileStatement(ROUTE_TABLE_RENAME);
    update.bindString(1, newName);
    update.bindLong(2, localId);
    update.execute();    
  } // renameRoute 
   
  public void deleteRoute(final int localId)
  { 
    final String ROUTE_TABLE_DELETE = 
      "DELETE FROM route WHERE " + BaseColumns._ID + " = ?";
     
    final SQLiteStatement delete = db_.compileStatement(ROUTE_TABLE_DELETE);
    delete.bindLong(1, localId);
    delete.execute();
  } // deleteRoute 
   
  public List<RouteSummary> savedRoutes()