public class GeoPackageDatabase extends Object implements GeoPackageSQLiteDatabase
| Constructor and Description |
|---|
GeoPackageDatabase(GeoPackageDatabase database)
Copy constructor
|
GeoPackageDatabase(SQLiteDatabase db)
Constructor
|
GeoPackageDatabase(SQLiteDatabase db,
boolean writable,
GeoPackageCursorFactory cursorFactory)
Constructor
|
GeoPackageDatabase(SQLiteDatabase db,
GeoPackageCursorFactory cursorFactory)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begin a transaction
|
void |
close()
Close the connection
|
GeoPackageDatabase |
copy()
Copy the database, maintaining the same connections but with the ability to change the active used connection
|
int |
delete(String table,
String whereClause,
String[] whereArgs)
Delete from table
|
void |
endAndBeginTransaction()
End a transaction as successful and begin a new transaction
|
void |
endTransaction()
End a transaction as successful
|
void |
endTransaction(boolean successful)
End a transaction
|
void |
execSQL(String sql)
Execute SQL
|
GeoPackageSQLiteDatabase |
getActive()
Get the active connection
|
AndroidBindingsSQLiteDatabase |
getAndroidBindingsSQLiteDatabase()
Get the Android Bindings SQLite Database connection
|
AndroidSQLiteDatabase |
getAndroidSQLiteDatabase()
Get the Android SQLite Database connection
|
org.sqlite.database.sqlite.SQLiteDatabase |
getBindingsDb()
Get the SQLite bindings database connection
|
SQLiteDatabase |
getDb()
Get the SQLite database connection
|
long |
insert(String table,
String nullColumnHack,
ContentValues values)
Insert into a table
|
long |
insertOrThrow(String table,
String nullColumnHack,
ContentValues values)
Insert into a table
|
boolean |
inTransaction()
Determine if currently within a transaction
|
boolean |
isBindingsWritable()
Is the SQLite bindings database connection writable
|
boolean |
isUseBindings()
Is SQLite Android Bindings connection enabled
|
boolean |
isWritable()
Is the SQLite database connection writable
|
Cursor |
query(String table,
String[] columns,
String[] columnsAs,
String selection,
String[] selectionArgs,
String groupBy,
String having,
String orderBy)
Query the table
|
Cursor |
query(String table,
String[] columns,
String[] columnsAs,
String selection,
String[] selectionArgs,
String groupBy,
String having,
String orderBy,
String limit)
Query the table
|
Cursor |
query(String table,
String[] columns,
String selection,
String[] selectionArgs,
String groupBy,
String having,
String orderBy)
Query the table
|
Cursor |
query(String table,
String[] columns,
String selection,
String[] selectionArgs,
String groupBy,
String having,
String orderBy,
String limit)
Query the table
|
Cursor |
rawQuery(String sql,
String[] selectionArgs)
Raw query
|
boolean |
setUseBindings(boolean useBindings)
Set the active SQLite connection as the bindings or standard
|
int |
update(String table,
ContentValues values,
String whereClause,
String[] whereArgs)
Update the table
|
public GeoPackageDatabase(SQLiteDatabase db)
db - databasepublic GeoPackageDatabase(SQLiteDatabase db, GeoPackageCursorFactory cursorFactory)
db - databasecursorFactory - cursor factorypublic GeoPackageDatabase(SQLiteDatabase db, boolean writable, GeoPackageCursorFactory cursorFactory)
db - databasewritable - writable flagcursorFactory - cursor factorypublic GeoPackageDatabase(GeoPackageDatabase database)
database - GeoPackage databasepublic GeoPackageSQLiteDatabase getActive()
public AndroidSQLiteDatabase getAndroidSQLiteDatabase()
public AndroidBindingsSQLiteDatabase getAndroidBindingsSQLiteDatabase()
public SQLiteDatabase getDb()
public org.sqlite.database.sqlite.SQLiteDatabase getBindingsDb()
public boolean isUseBindings()
public boolean isWritable()
public boolean isBindingsWritable()
public boolean setUseBindings(boolean useBindings)
useBindings - true to use bindings connection, false for standardpublic GeoPackageDatabase copy()
public void execSQL(String sql) throws SQLException
execSQL in interface GeoPackageSQLiteDatabasesql - sql commandSQLExceptionSQLiteDatabase.execSQL(String)public void beginTransaction()
beginTransaction in interface GeoPackageSQLiteDatabasepublic void endTransaction()
endTransaction in interface GeoPackageSQLiteDatabasepublic void endTransaction(boolean successful)
endTransaction in interface GeoPackageSQLiteDatabasesuccessful - true to commit, false to rollbackpublic void endAndBeginTransaction()
endAndBeginTransaction in interface GeoPackageSQLiteDatabasepublic boolean inTransaction()
inTransaction in interface GeoPackageSQLiteDatabasepublic int delete(String table, String whereClause, String[] whereArgs)
delete in interface GeoPackageSQLiteDatabasetable - table namewhereClause - where clausewhereArgs - where argumentsSQLiteDatabase.delete(String, String, String[])public Cursor rawQuery(String sql, String[] selectionArgs)
rawQuery in interface GeoPackageSQLiteDatabasesql - sql commandselectionArgs - selection argumentsSQLiteDatabase.rawQuery(String, String[])public void close()
close in interface GeoPackageSQLiteDatabaseSQLiteClosable.close()public Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
query in interface GeoPackageSQLiteDatabasetable - table namecolumns - columnsselection - selectionselectionArgs - selection argumentsgroupBy - group byhaving - havingorderBy - order bySQLiteDatabase.query(String, String[], String, String[], String, String, String)public Cursor query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
query in interface GeoPackageSQLiteDatabasetable - table namecolumns - columnscolumnsAs - columns asselection - selectionselectionArgs - selection argumentsgroupBy - group byhaving - havingorderBy - order bySQLiteDatabase.query(String, String[], String, String[], String, String, String)public Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
query in interface GeoPackageSQLiteDatabasetable - table namecolumns - columnsselection - selectionselectionArgs - selection argumentsgroupBy - group byhaving - havingorderBy - order bylimit - limitSQLiteDatabase.query(String, String[], String, String[], String, String, String, String)public Cursor query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
query in interface GeoPackageSQLiteDatabasetable - table namecolumns - columnscolumnsAs - columns asselection - selectionselectionArgs - selection argumentsgroupBy - group byhaving - havingorderBy - order bylimit - limitSQLiteDatabase.query(String, String[], String, String[], String, String, String, String)public int update(String table, ContentValues values, String whereClause, String[] whereArgs)
update in interface GeoPackageSQLiteDatabasetable - table namevalues - content valueswhereClause - where clausewhereArgs - where argumentsSQLiteDatabase.update(String, ContentValues, String, String[])public long insertOrThrow(String table, String nullColumnHack, ContentValues values) throws SQLException
insertOrThrow in interface GeoPackageSQLiteDatabasetable - table namenullColumnHack - null column hackvalues - content valuesSQLExceptionSQLiteDatabase.insertOrThrow(String, String, ContentValues)public long insert(String table, String nullColumnHack, ContentValues values)
insert in interface GeoPackageSQLiteDatabasetable - table namenullColumnHack - null column hackvalues - content valuesSQLiteDatabase.insert(String, String, ContentValues)