Lines Matching refs:db

753      * @param db the database the table is in
757 public static long queryNumEntries(SQLiteDatabase db, String table) {
758 return queryNumEntries(db, table, null, null);
763 * @param db the database the table is in
770 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) {
771 return queryNumEntries(db, table, selection, null);
776 * @param db the database the table is in
787 public static long queryNumEntries(SQLiteDatabase db, String table, String selection,
790 return longForQuery(db, "select count(*) from " + table + s,
795 * Utility method to run the query on the db and return the value in the
798 public static long longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) {
799 SQLiteStatement prog = db.compileStatement(query);
817 * Utility method to run the query on the db and return the value in the
820 public static String stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) {
821 SQLiteStatement prog = db.compileStatement(query);
839 * Utility method to run the query on the db and return the blob value in the
844 public static ParcelFileDescriptor blobFileDescriptorForQuery(SQLiteDatabase db,
846 SQLiteStatement prog = db.compileStatement(query);
998 * @param db the SQLiteDatabase to insert into
1001 public InsertHelper(SQLiteDatabase db, String tableName) {
1002 mDb = db;
1324 * Creates a db and populates it with the sql statements in sqlStatements.
1326 * @param context the context to use to create the db
1327 * @param dbName the name of the db to create
1328 * @param dbVersion the version to set on the db
1329 * @param sqlStatements the statements to use to populate the db. This should be a single string
1335 SQLiteDatabase db = context.openOrCreateDatabase(dbName, 0, null);
1342 db.execSQL(statement);
1344 db.setVersion(dbVersion);
1345 db.close();