Lines Matching defs:db

82     sqlite3* const db;
89 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) :
90 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { }
133 sqlite3* db;
134 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL);
141 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) {
142 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode.");
143 sqlite3_close(db);
148 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_MS);
150 throw_sqlite3_exception(env, db, "Could not set busy timeout");
151 sqlite3_close(db);
156 err = register_android_functions(db, UTF16_STORAGE);
158 throw_sqlite3_exception(env, db, "Could not register Android SQL functions.");
159 sqlite3_close(db);
164 SQLiteConnection* connection = new SQLiteConnection(db, openFlags, path, label);
168 sqlite3_trace(db, &sqliteTraceCallback, connection);
171 sqlite3_profile(db, &sqliteProfileCallback, connection);
174 ALOGV("Opened connection %p with label '%s'", db, label.string());
182 ALOGV("Closing connection %p", connection->db);
183 int err = sqlite3_close(connection->db);
186 ALOGE("sqlite3_close(%p) failed: %d", connection->db, err);
187 throw_sqlite3_exception(env, connection->db, "Count not close db.");
259 int err = sqlite3_create_function_v2(connection->db, name, numArgs, SQLITE_UTF16,
267 throw_sqlite3_exception(env, connection->db);
277 int err = register_localized_collators(connection->db, locale, UTF16_STORAGE);
281 throw_sqlite3_exception(env, connection->db);
292 int err = sqlite3_prepare16_v2(connection->db,
307 throw_sqlite3_exception(env, connection->db, message);
312 ALOGV("Prepared statement %p on connection %p", statement, connection->db);
324 ALOGV("Finalized statement %p on connection %p", statement, connection->db);
371 throw_sqlite3_exception(env, connection->db, NULL);
382 throw_sqlite3_exception(env, connection->db, NULL);
393 throw_sqlite3_exception(env, connection->db, NULL);
408 throw_sqlite3_exception(env, connection->db, NULL);
422 throw_sqlite3_exception(env, connection->db, NULL);
436 throw_sqlite3_exception(env, connection->db, NULL);
446 throw_sqlite3_exception(env, connection->db);
465 return err == SQLITE_DONE ? sqlite3_changes(connection->db) : -1;
474 return err == SQLITE_DONE && sqlite3_changes(connection->db) > 0
475 ? sqlite3_last_insert_rowid(connection->db) : -1;
481 throw_sqlite3_exception(env, connection->db);
676 throw_sqlite3_exception(env, connection->db, msg.string());
686 throw_sqlite3_exception(env, connection->db, msg.string());
735 throw_sqlite3_exception(env, connection->db, "retrycount exceeded");
743 throw_sqlite3_exception(env, connection->db);
766 sqlite3_db_status(connection->db, SQLITE_DBSTATUS_LOOKASIDE_USED, &cur, &unused, 0);
781 sqlite3_progress_handler(connection->db, 4, sqliteProgressHandlerCallback,
784 sqlite3_progress_handler(connection->db, 0, NULL, NULL);