Package mil.nga.geopackage.db
Interface GeoPackageSQLiteDatabase
- All Known Implementing Classes:
AndroidBindingsSQLiteDatabase
,AndroidSQLiteDatabase
,GeoPackageDatabase
public interface GeoPackageSQLiteDatabase
GeoPackage SQLiteDatabase interface
- Since:
- 3.4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Begin a transactionvoid
close()
Close the connectionint
Delete from tablevoid
End a transaction as successful and begin a new transactionvoid
End a transaction as successfulvoid
endTransaction
(boolean successful) End a transactionvoid
Execute SQLlong
insert
(String table, String nullColumnHack, ContentValues values) Insert into a tablelong
insertOrThrow
(String table, String nullColumnHack, ContentValues values) Insert into a tableboolean
Determine if currently within a transactionquery
(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the tablequery
(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) Query the tablequery
(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the tablequery
(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) Query the tablequery
(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the tableRaw queryrawQueryWithFactory
(GeoPackageCursorFactory cursorFactory, String sql, String[] selectionArgs, String editTable) Raw query with factoryint
update
(String table, ContentValues values, String whereClause, String[] whereArgs) Update the table
-
Method Details
-
execSQL
Execute SQL- Parameters:
sql
- sql command- Throws:
SQLException
- See Also:
-
beginTransaction
void beginTransaction()Begin a transaction -
endTransaction
void endTransaction()End a transaction as successful -
endTransaction
void endTransaction(boolean successful) End a transaction- Parameters:
successful
- true to commit, false to rollback
-
endAndBeginTransaction
void endAndBeginTransaction()End a transaction as successful and begin a new transaction -
inTransaction
boolean inTransaction()Determine if currently within a transaction- Returns:
- true if in transaction
-
delete
Delete from table- Parameters:
table
- table namewhereClause
- where clausewhereArgs
- where arguments- Returns:
- deleted rows
- See Also:
-
rawQuery
Raw query- Parameters:
sql
- sql commandselectionArgs
- selection arguments- Returns:
- cursor
- See Also:
-
rawQueryWithFactory
Cursor rawQueryWithFactory(GeoPackageCursorFactory cursorFactory, String sql, String[] selectionArgs, String editTable) Raw query with factory- Parameters:
cursorFactory
- cursor factorysql
- sql commandselectionArgs
- selection argumentseditTable
- edit table name- Returns:
- cursor
- Since:
- 4.0.0
- See Also:
-
close
void close()Close the connection- See Also:
-
query
Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) Query the table- Parameters:
table
- table namecolumns
- columnsselection
- selectionselectionArgs
- selection argumentsgroupBy
- group byhaving
- havingorderBy
- order by- Returns:
- cursor
- See Also:
-
query
Cursor query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) Query the table- Parameters:
table
- table namecolumns
- columnscolumnsAs
- columns asselection
- selectionselectionArgs
- selection argumentsgroupBy
- group byhaving
- havingorderBy
- order by- Returns:
- cursor
- See Also:
-
query
Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the table- Parameters:
table
- table namecolumns
- columnsselection
- selectionselectionArgs
- selection argumentsgroupBy
- group byhaving
- havingorderBy
- order bylimit
- limit- Returns:
- cursor
- See Also:
-
query
Cursor query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the table- Parameters:
table
- table namecolumns
- columnscolumnsAs
- columns asselection
- selectionselectionArgs
- selection argumentsgroupBy
- group byhaving
- havingorderBy
- order bylimit
- limit- Returns:
- cursor
- See Also:
-
query
Cursor query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) Query the table- Parameters:
distinct
- distinct flagtable
- table namecolumns
- columnsselection
- selectionselectionArgs
- selection argumentsgroupBy
- group byhaving
- havingorderBy
- order bylimit
- limit- Returns:
- cursor
- Since:
- 4.0.0
- See Also:
-
update
Update the table- Parameters:
table
- table namevalues
- content valueswhereClause
- where clausewhereArgs
- where arguments- Returns:
- updated rows
- See Also:
-
insertOrThrow
Insert into a table- Parameters:
table
- table namenullColumnHack
- null column hackvalues
- content values- Returns:
- row id
- Throws:
SQLException
- See Also:
-
insert
Insert into a table- Parameters:
table
- table namenullColumnHack
- null column hackvalues
- content values- Returns:
- row id
- See Also:
-