Searched defs:sql (Results 1 - 18 of 18) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/database/
H A DDatabaseLocaleTest.java65 private String[] query(String sql) { argument
66 Log.i("LocaleTest", "Querying: " + sql);
67 Cursor c = mDatabase.rawQuery(sql, null);
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteCompiledSql.java23 * This class encapsulates compilation of sql statement and release of the compiled statement obj.
24 * Once a sql statement is compiled, it is cached in {@link SQLiteDatabase}
57 /* package */ SQLiteCompiledSql(SQLiteDatabase db, String sql) { argument
61 mSqlStmt = sql;
68 native_compile(sql);
144 buff.append(", sql=");
155 * @param sql The SQL to compile.
157 private final native void native_compile(String sql); argument
H A DSQLiteDirectCursorDriver.java34 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable) { argument
37 mSql = sql;
H A DDatabaseConnectionPool.java74 * @param sql if not null, try to find a connection inthe pool which already has cached
75 * the compiled statement for this sql.
78 /* package */ synchronized SQLiteDatabase get(String sql) { argument
83 assert sql != null;
96 if (mPool.get(i).mDb.isInStatementCache(sql)) {
122 if (mPool.get(i).isFree() && mPool.get(i).mDb.isInStatementCache(sql)) {
H A DSQLiteStatement.java56 * @param sql
58 /* package */ SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument
59 super(db, sql, bindArgs, false /* don't compile sql statement */);
285 // release the compiled sql statement so that the caller's SQLiteStatement no longer
298 private final native void native_executeSql(String sql); argument
H A DSQLiteProgram.java52 * the SQLiteCompiledSql object for the given sql statement.
93 /* package */ SQLiteProgram(SQLiteDatabase db, String sql) { argument
94 this(db, sql, null, true);
97 /* package */ SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, argument
99 mSql = sql.trim();
142 // create a new compiled-sql obj
151 // it is already in compiled-sql cache.
216 * @param sql the SQL string to compile
221 protected void compile(String sql, boolean forceCompilation) { argument
354 throw new IllegalArgumentException("Can't pass bindargs for this sql
417 native_compile(String sql) argument
[all...]
H A DSQLiteQueryBuilder.java164 * <li>Use one of the query overloads instead of getting the statement as a sql string</li>
347 String sql = buildQuery(
352 Log.d(TAG, "Performing query: " + sql);
355 mFactory, sql, selectionArgs,
363 private void validateSql(SQLiteDatabase db, String sql) { argument
364 db.lock(sql);
366 new SQLiteCompiledSql(db, sql).releaseSqlStatement();
H A DSQLiteDatabase.java235 /** the last non-commit/rollback sql statement in a transaction */
243 synchronized void setLastSqlStatement(String sql) { argument
244 mLastSqlStatement = sql;
399 /* package */ void lock(String sql) { argument
400 lock(sql, false);
408 private void lock(String sql, boolean forced) { argument
439 if (sql != null) {
441 logTimeStat(sql, timeStart, GET_LOCK_LOG_PREFIX);
471 private void lockForced(String sql) { argument
472 lock(sql, tru
1366 compileStatement(String sql) argument
1537 rawQuery(String sql, String[] selectionArgs) argument
1553 rawQueryWithFactory( CursorFactory cursorFactory, String sql, String[] selectionArgs, String editTable) argument
1838 execSQL(String sql) argument
1885 execSQL(String sql, Object[] bindArgs) argument
1892 executeSql(String sql, Object[] bindArgs) argument
1989 logTimeStat(String sql, long beginMillis) argument
1995 logTimeStat(String sql, long beginMillis, String prefix) argument
2102 addToCompiledQueries( String sql, SQLiteCompiledSql compiledStatement) argument
2150 getCompiledStatementForSql(String sql) argument
2195 isInStatementCache(String sql) argument
2199 releaseCompiledSqlObj( String sql, SQLiteCompiledSql compiledSql) argument
2370 getDatabaseHandle(String sql) argument
2406 getDbConnection(String sql) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_database_SQLiteCompiledSql.cpp51 jchar const * sql; local
62 sql = env->GetStringChars(sqlString, NULL);
64 err = sqlite3_prepare16_v2(handle, sql, sqlLen * 2, &statement, NULL);
65 env->ReleaseStringChars(sqlString, sql);
H A Dandroid_database_SQLiteProgram.cpp103 jchar const * sql; local
107 sql = env->GetStringChars(sqlString, NULL);
109 err = sqlite3_bind_text16(statement, index, sql, sqlLen * 2, SQLITE_TRANSIENT);
110 env->ReleaseStringChars(sqlString, sql);
123 jchar const * sql; local
H A Dandroid_database_SQLiteStatement.cpp242 static void native_executeSql(JNIEnv* env, jobject object, jstring sql) argument
244 char const* sqlString = env->GetStringUTFChars(sql, NULL);
250 env->ReleaseStringUTFChars(sql, sqlString);
H A Dandroid_database_SQLiteDatabase.cpp199 static void sqlTrace(void *databaseName, const char *sql) { argument
200 LOGI("sql_statement|%s|%s\n", (char *)databaseName, sql);
210 static void sqlProfile(void *databaseName, const char *sql, sqlite3_uint64 tm) { argument
212 LOGI("elapsedTime4Sql|%s|%.3f ms|%s\n", (char *)databaseName, d, sql);
334 static const char *sql = "INSERT INTO " ANDROID_TABLE " (locale) VALUES(?);"; local
335 err = sqlite3_prepare_v2(handle, sql, -1, &stmt, NULL);
337 LOGE("sqlite3_prepare_v2(\"%s\") failed\n", sql);
351 LOGE("sqlite3_step(\"%s\") failed setting locale\n", sql);
/frameworks/base/core/tests/coretests/src/android/database/sqlite/
H A DDatabaseConnectionPoolTest.java202 private void executeSqlOnDatabaseConn(SQLiteDatabase db, String sql) { argument
203 // get the given sql be compiled on the given database connection.
207 ClassToTestSqlCompilationAndCaching.create(db, sql);
H A DSQLiteDatabaseTest.java171 String sql = "select count(*) from " + TEST_TABLE;
172 SQLiteStatement stmt = mDatabase.compileStatement(sql);
176 Cursor c = mDatabase.rawQuery(sql, null);
204 String sql = "select count(*) from " + TEST_TABLE;
205 SQLiteStatement stmt = getDb().compileStatement(sql);
208 Cursor c = getDb().rawQuery(sql, null);
220 stmt = mDatabase.compileStatement(sql);
224 c = mDatabase.rawQuery(sql, null);
417 private ClassToTestSqlCompilationAndCaching(SQLiteDatabase db, String sql) { argument
418 super(db, sql);
420 create(SQLiteDatabase db, String sql) argument
[all...]
/frameworks/base/test-runner/src/android/test/
H A DProviderTestCase.java98 String databaseName, int databaseVersion, String sql)
108 DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
96 newResolverWithContentProviderFromSql( Context targetContext, Class<T> providerClass, String authority, String databaseName, int databaseVersion, String sql) argument
H A DProviderTestCase2.java201 * @param sql A string containing the SQL statements that are needed to create the desired
211 String databaseName, int databaseVersion, String sql)
219 DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
209 newResolverWithContentProviderFromSql( Context targetContext, String filenamePrefix, Class<T> providerClass, String authority, String databaseName, int databaseVersion, String sql) argument
/frameworks/base/core/tests/coretests/src/android/content/
H A DMemoryFileProvider.java136 String sql = "SELECT _blob FROM data WHERE _id=" + url.getPathSegments().get(1);
137 return getBlobColumnAsFile(url, mode, sql);
152 private ParcelFileDescriptor getBlobColumnAsFile(Uri url, String mode, String sql) argument
159 return DatabaseUtils.blobFileDescriptorForQuery(db, sql, null);
/frameworks/base/core/java/android/database/
H A DDatabaseUtils.java374 public static final void appendValueToSql(StringBuilder sql, Object value) { argument
376 sql.append("NULL");
380 sql.append('1');
382 sql.append('0');
385 appendEscapedSQLString(sql, value.toString());
1279 * Creates a db and populates it with the sql statements in sqlStatements.
1314 * @param sql the SQL statement whose type is returned by this method
1317 public static int getSqlStatementType(String sql) { argument
1318 sql = sql
[all...]

Completed in 192 milliseconds