Skip to content
Snippets Groups Projects
Commit 376d684d authored by Lee Shombert's avatar Lee Shombert Committed by Automerger Merge Worker
Browse files

Merge "Update the SQLite API version table" into udc-dev am: 7fb5f474 am:...

Merge "Update the SQLite API version table" into udc-dev am: 7fb5f474 am: 4df32c8c am: 79a6c9e4 am: 288e00a0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24839684



Change-Id: I5d9e7f1ca97bd99c3a238c9100a7ed6423e4336e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 29ac4d19 288e00a0
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ instead use the generic {@link android.database} classes.
<a href="{@docRoot}studio/command-line/sqlite3.html">sqlite3</a> command-line
database tool. On your development machine, run the tool from the
<code>platform-tools/</code> folder of your SDK. On the emulator, run the tool
with adb shell, for example, <code>adb -e shell sqlite3</code>.
with adb shell, for example, <code>adb shell sqlite3</code>.
<p>The version of SQLite depends on the version of Android. See the following table:
<table style="width:auto;">
......@@ -42,15 +42,19 @@ with adb shell, for example, <code>adb -e shell sqlite3</code>.
<ul>
<li>If available, use the sqlite3 tool, for example:
<code>adb -e shell sqlite3 --version</code>.</li>
<code>adb shell sqlite3 --version</code>.</li>
<li>Create and query an in-memory database as shown in the following code sample:
<pre>
String query = "select sqlite_version() AS sqlite_version";
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(":memory:", null);
Cursor cursor = db.rawQuery(query, null);
String sqliteVersion = "";
if (cursor.moveToNext()) {
sqliteVersion = cursor.getString(0);
try {
if (cursor.moveToNext()) {
sqliteVersion = cursor.getString(0);
}
} finally {
cursor.close();
}</pre>
</li>
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment