Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove class org.sqlite.database.ExtraUtils. No longer required now that org.sqlite.database.DatabaseUtils works. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2332e2eecdbef7d63da5d1cd9ea1c15e |
User & Date: | dan 2017-11-27 14:14:42.174 |
Context
2017-11-27
| ||
19:22 | Remove out of date "package.html" files. (check-in: e9352bdf96 user: dan tags: trunk) | |
14:14 | Remove class org.sqlite.database.ExtraUtils. No longer required now that org.sqlite.database.DatabaseUtils works. (check-in: 2332e2eecd user: dan tags: trunk) | |
2017-11-23
| ||
19:13 | Add modified version of DatabaseGeneralTest.java from the sqlite-android project. (check-in: d03685fdba user: dan tags: trunk) | |
Changes
Deleted sqlite3/src/main/java/org/sqlite/database/ExtraUtils.java.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to sqlite3/src/main/java/org/sqlite/database/sqlite/SQLiteConnection.java.
︙ | ︙ | |||
21 22 23 24 25 26 27 | package org.sqlite.database.sqlite; /* import dalvik.system.BlockGuard; */ import org.sqlite.database.sqlite.CloseGuard; import android.database.Cursor; import android.database.CursorWindow; | < | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | package org.sqlite.database.sqlite; /* import dalvik.system.BlockGuard; */ import org.sqlite.database.sqlite.CloseGuard; import android.database.Cursor; import android.database.CursorWindow; import org.sqlite.database.DatabaseUtils; import org.sqlite.database.sqlite.SQLiteDebug.DbStats; import android.os.CancellationSignal; import android.os.OperationCanceledException; import android.os.ParcelFileDescriptor; import android.util.Log; import android.util.LruCache; import android.util.Printer; |
︙ | ︙ | |||
1000 1001 1002 1003 1004 1005 1006 | if (count == 0) { return; } final long statementPtr = statement.mStatementPtr; for (int i = 0; i < count; i++) { final Object arg = bindArgs[i]; | | | 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | if (count == 0) { return; } final long statementPtr = statement.mStatementPtr; for (int i = 0; i < count; i++) { final Object arg = bindArgs[i]; switch (DatabaseUtils.getTypeOfObject(arg)) { case Cursor.FIELD_TYPE_NULL: nativeBindNull(mConnectionPtr, statementPtr, i + 1); break; case Cursor.FIELD_TYPE_INTEGER: nativeBindLong(mConnectionPtr, statementPtr, i + 1, ((Number)arg).longValue()); break; |
︙ | ︙ |
Changes to sqlite3/src/main/java/org/sqlite/database/sqlite/SQLiteCursor.java.
︙ | ︙ | |||
16 17 18 19 20 21 22 | /* ** Modified to support SQLite extensions by the SQLite developers: ** sqlite-dev@sqlite.org. */ package org.sqlite.database.sqlite; | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | /* ** Modified to support SQLite extensions by the SQLite developers: ** sqlite-dev@sqlite.org. */ package org.sqlite.database.sqlite; import org.sqlite.database.DatabaseUtils; import android.database.AbstractWindowedCursor; import android.database.CursorWindow; import android.os.StrictMode; import android.util.Log; |
︙ | ︙ | |||
160 161 162 163 164 165 166 | } private void fillWindow(int requiredPos) { awc_clearOrCreateWindow(getDatabase().getPath()); try { if (mCount == NO_COUNT) { | | | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | } private void fillWindow(int requiredPos) { awc_clearOrCreateWindow(getDatabase().getPath()); try { if (mCount == NO_COUNT) { int startPos = DatabaseUtils.cursorPickFillWindowStartPosition(requiredPos, 0); mCount = mQuery.fillWindow(mWindow, startPos, requiredPos, true); mCursorWindowCapacity = mWindow.getNumRows(); if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "received count(*) from native_fill_window: " + mCount); } } else { int startPos = DatabaseUtils.cursorPickFillWindowStartPosition(requiredPos, mCursorWindowCapacity); mQuery.fillWindow(mWindow, startPos, requiredPos, false); } } catch (RuntimeException ex) { // Close the cursor window if the query failed and therefore will // not produce any results. This helps to avoid accidentally leaking // the cursor window if the client does not correctly handle exceptions |
︙ | ︙ |
Changes to sqlite3/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java.
︙ | ︙ | |||
19 20 21 22 23 24 25 | */ package org.sqlite.database.sqlite; import android.content.ContentValues; import android.database.Cursor; import org.sqlite.database.DatabaseErrorHandler; | < | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | */ package org.sqlite.database.sqlite; import android.content.ContentValues; import android.database.Cursor; import org.sqlite.database.DatabaseErrorHandler; import org.sqlite.database.DatabaseUtils; import org.sqlite.database.DefaultDatabaseErrorHandler; import org.sqlite.database.SQLException; import org.sqlite.database.sqlite.SQLiteDebug.DbStats; import android.os.CancellationSignal; import android.os.Looper; import android.os.OperationCanceledException; import android.text.TextUtils; |
︙ | ︙ | |||
860 861 862 863 864 865 866 | /** * Gets the database version. * * @return the database version */ public int getVersion() { | | | | | | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | /** * Gets the database version. * * @return the database version */ public int getVersion() { return ((Long) DatabaseUtils.longForQuery(this, "PRAGMA user_version;", null)).intValue(); } /** * Sets the database version. * * @param version the new database version */ public void setVersion(int version) { execSQL("PRAGMA user_version = " + version); } /** * Returns the maximum size the database may grow to. * * @return the new maximum database size */ public long getMaximumSize() { long pageCount = DatabaseUtils.longForQuery(this, "PRAGMA max_page_count;", null); return pageCount * getPageSize(); } /** * Sets the maximum size the database will grow to. The maximum size cannot * be set below the current size. * * @param numBytes the maximum database size, in bytes * @return the new maximum database size */ public long setMaximumSize(long numBytes) { long pageSize = getPageSize(); long numPages = numBytes / pageSize; // If numBytes isn't a multiple of pageSize, bump up a page if ((numBytes % pageSize) != 0) { numPages++; } long newPageCount = DatabaseUtils.longForQuery(this, "PRAGMA max_page_count = " + numPages, null); return newPageCount * pageSize; } /** * Returns the current database page size, in bytes. * * @return the database page size, in bytes */ public long getPageSize() { return DatabaseUtils.longForQuery(this, "PRAGMA page_size;", null); } /** * Sets the database page size. The page size must be a power of two. This * method does not work if any data has been written to the database file, * and must be called right after the database has been created. * |
︙ | ︙ |