Package mil.nga.geopackage
Interface GeoPackageCore
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
GeoPackageCoreImpl
public interface GeoPackageCore extends Closeable
A single GeoPackage database connection- Author:
- osbornb
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
beginTransaction()
Begin a transaction<T> T
callInTransaction(Callable<T> callable)
Execute theCallable
class inside an ORMLite transactionvoid
close()
Close the GeoPackage connectionvoid
commit()
Commit changes on the connectionvoid
copyTable(String tableName, String newTableName)
Copy the table with transferred contents and extensionsvoid
copyTableAsEmpty(String tableName, String newTableName)
Copy the table but leave the user table empty and without extensionsvoid
copyTableNoExtensions(String tableName, String newTableName)
Copy the table with transferred contents but no extensionsvoid
createAttributesTable(AttributesTable table)
Create a new attributes tableAttributesTable
createAttributesTable(AttributesTableMetadata metadata)
Create a new attributes table with GeoPackage metadata including: user attributes table and contents row.<D extends GeoPackageDao<T,?>,T>
DcreateDao(Class<T> type)
Create a daoboolean
createExtensionsTable()
Create the Extensions table if it does not already existvoid
createFeatureTable(FeatureTable table)
Create a new feature tableFeatureTable
createFeatureTable(FeatureTableMetadata metadata)
Create a new feature table with GeoPackage metadata including: geometry columns table and row, user feature table, and contents row.boolean
createGeometryColumnsTable()
Create the Geometry Columns table if it does not already existboolean
createTileMatrixSetTable()
Create the Tile Matrix Set table if it does not already existboolean
createTileMatrixTable()
Create the Tile Matrix table if it does not already existvoid
createTileTable(TileTable table)
Create a new tile tableTileTable
createTileTable(TileTableMetadata metadata)
Create a new tile table with GeoPackage metadata including: tile matrix set table and row, tile matrix table, user tile table, and contents row.void
createUserTable(UserTable<? extends UserColumn> table)
Create a new user tablevoid
deleteTable(String table)
Delete the user table (a feature or tile table) and all GeoPackage metadatavoid
deleteTableQuietly(String tableName)
Attempt to delete the user table (a feature or tile table) and all GeoPackage metadata quietlyvoid
dropTable(String table)
Drop the table if it exists.void
dropView(String view)
Drop the view if it exists.boolean
enableForeignKeys()
If foreign keys is disabled and there are no foreign key violations, enables foreign key checks, else logs violationsvoid
endAndBeginTransaction()
End a transaction as successful and begin a new transactionvoid
endTransaction()
End a transaction successfullyvoid
endTransaction(boolean successful)
End a transactionvoid
execSQL(String sql)
Execute the sql on the GeoPackage databasevoid
failTransaction()
Fail a transactionboolean
foreignKeys()
Query for the foreign keys valueboolean
foreignKeys(boolean on)
Change the foreign keys stateString
getApplicationId()
Get the application idString
getApplicationIdHex()
Get the application id as a hex string prefixed with 0xInteger
getApplicationIdInteger()
Get the application id integerList<String>
getAttributesTables()
Get the attributes tablesBoundingBox
getBoundingBox(String table)
Get the bounding box for the table in the table's projection, including contents and table metadataBoundingBox
getBoundingBox(String table, boolean manual)
Get the bounding box for the table in the table's projection, including contents, table metadata, and manual queries if enabledBoundingBox
getBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, including contents and table metadataBoundingBox
getBoundingBox(Projection projection, boolean manual)
Get the bounding box for all tables in the provided projection, including contents, table metadata, and manual queries if enabledBoundingBox
getBoundingBox(Projection projection, String table)
Get the bounding box for the table in the provided projection, including contents and table metadataBoundingBox
getBoundingBox(Projection projection, String table, boolean manual)
Get the bounding box for the table in the provided projection, including contents, table metadata, and manual queries if enabledBoundingBox
getContentsBoundingBox(String table)
Get the bounding box from the contents for the table in the table's projectionBoundingBox
getContentsBoundingBox(Projection projection)
Get the bounding box for all table contents in the provided projectionBoundingBox
getContentsBoundingBox(Projection projection, String table)
Get the bounding box from the contents for the table in the provided projectionContentsDao
getContentsDao()
Get a Contents DAOProjection
getContentsProjection(String table)
Get the projection of the table contentsGeoPackageCoreConnection
getDatabase()
Get the SQLite databaseExtensionManager
getExtensionManager()
Get an extension manager on the GeoPackageExtensionsDao
getExtensionsDao()
Get an Extensions DAOBoundingBox
getFeatureBoundingBox(Projection projection, String table, boolean manual)
Get the feature table bounding boxList<String>
getFeatureTables()
Get the feature tablesGeometryColumnsDao
getGeometryColumnsDao()
Get a Geometry Columns DAOString
getName()
Get the GeoPackage nameString
getPath()
Get the GeoPackage pathProjection
getProjection(String table)
Get the projection of the tableSpatialReferenceSystemDao
getSpatialReferenceSystemDao()
Get a Spatial Reference System DAOBoundingBox
getTableBoundingBox(String table)
Get the bounding box for the table in the table's projection, using only table metadataBoundingBox
getTableBoundingBox(String table, boolean manual)
Get the bounding box for the table in the table's projection, using only table metadata and manual queries if enabledBoundingBox
getTableBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, using only table metadataBoundingBox
getTableBoundingBox(Projection projection, boolean manual)
Get the bounding box for all tables in the provided projection, using only table metadata and manual queries if enabledBoundingBox
getTableBoundingBox(Projection projection, String table)
Get the bounding box for the table in the provided projection, using only table metadataBoundingBox
getTableBoundingBox(Projection projection, String table, boolean manual)
Get the bounding box for the table in the provided projection, using only table metadata and manual queries if enabledContents
getTableContents(String table)
Get the contents of the user tableContentsDataType
getTableCoreDataType(String table)
Get the data type of the user table only if it is a core data type (features, tiles, attributes)GeoPackageTableCreator
getTableCreator()
Get the Table CreatorContentsDataType
getTableDataType(String table)
Get the contents data type of the user tableList<String>
getTables()
Get all tablesList<String>
getTables(String type)
Get the tables for the contents data typeList<String>
getTables(String... types)
Get the tables for the contents data typesList<String>
getTables(ContentsDataType type)
Get the tables for the contents data typeList<String>
getTables(ContentsDataType... types)
Get the tables for the contents data typesString
getTableType(String table)
Get the contents data type of the user tableTileMatrixDao
getTileMatrixDao()
Get a Tile Matrix DAOTileMatrixSetDao
getTileMatrixSetDao()
Get a Tile Matrix Set DAOList<String>
getTileTables()
Get the tile tablesList<Contents>
getTypeContents(String type)
Get the contents for the data typeList<Contents>
getTypeContents(String... types)
Get the contents for the data typesList<Contents>
getTypeContents(ContentsDataType type)
Get the contents for the data typeList<Contents>
getTypeContents(ContentsDataType... types)
Get the contents for the data typesInteger
getUserVersion()
Get the user versionInteger
getUserVersionMajor()
Get the major user versionInteger
getUserVersionMinor()
Get the minor user versionInteger
getUserVersionPatch()
Get the patch user versionboolean
inTransaction()
Determine if currently within a transactionboolean
isAttributeTable(String table)
Check if the table is an attribute tableboolean
isContentsTable(String table)
Check if the table exists as a user contents tableboolean
isFeatureTable(String table)
Check if the table is a feature tableboolean
isTable(String table)
Check if the table existsboolean
isTableCoreDataType(String table)
Determine if the user table is one of the core data types (features, tiles, attributes)boolean
isTableOrView(String name)
Check if the table or view existsboolean
isTableType(String table, String type)
Check if the table is the provided typeboolean
isTableType(String table, String... types)
Check if the table is one of the provided typesboolean
isTableType(String table, ContentsDataType type)
Check if the table is the provided typeboolean
isTableType(String table, ContentsDataType... types)
Check if the table is one of the provided typesboolean
isTileTable(String table)
Check if the table is a tile tableboolean
isView(String view)
Check if the view existsboolean
isWritable()
Is the GeoPackage writablevoid
renameTable(String tableName, String newTableName)
Rename the tablevoid
saveSchema(UserTable<? extends UserColumn> table)
Save the table schema using theSchemaExtension
void
vacuum()
Rebuild the GeoPackage, repacking it into a minimal amount of disk spacevoid
verifyWritable()
Verify the GeoPackage is writable and throw an exception if it is not
-
-
-
Method Detail
-
close
void close()
Close the GeoPackage connection- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getName
String getName()
Get the GeoPackage name- Returns:
- name
-
getPath
String getPath()
Get the GeoPackage path- Returns:
- path
-
getDatabase
GeoPackageCoreConnection getDatabase()
Get the SQLite database- Returns:
- connection
-
getTableCreator
GeoPackageTableCreator getTableCreator()
Get the Table Creator- Returns:
- table creator
- Since:
- 4.0.0
-
isWritable
boolean isWritable()
Is the GeoPackage writable- Returns:
- true if writable
-
getApplicationId
String getApplicationId()
Get the application id- Returns:
- application id
- Since:
- 1.2.1
-
getApplicationIdInteger
Integer getApplicationIdInteger()
Get the application id integer- Returns:
- application id integer
- Since:
- 4.0.0
-
getApplicationIdHex
String getApplicationIdHex()
Get the application id as a hex string prefixed with 0x- Returns:
- application id hex string
- Since:
- 4.0.0
-
getUserVersion
Integer getUserVersion()
Get the user version- Returns:
- user version
- Since:
- 1.2.1
-
getUserVersionMajor
Integer getUserVersionMajor()
Get the major user version- Returns:
- major user version
- Since:
- 1.2.1
-
getUserVersionMinor
Integer getUserVersionMinor()
Get the minor user version- Returns:
- minor user version
- Since:
- 1.2.1
-
getUserVersionPatch
Integer getUserVersionPatch()
Get the patch user version- Returns:
- patch user version
- Since:
- 1.2.1
-
getAttributesTables
List<String> getAttributesTables()
Get the attributes tables- Returns:
- table name
- Since:
- 1.2.1
-
getTables
List<String> getTables(ContentsDataType type)
Get the tables for the contents data type- Parameters:
type
- data type- Returns:
- table names
- Since:
- 1.2.1
-
getTables
List<String> getTables(ContentsDataType... types)
Get the tables for the contents data types- Parameters:
types
- data types- Returns:
- table names
- Since:
- 4.0.0
-
getTables
List<String> getTables(String type)
Get the tables for the contents data type- Parameters:
type
- data type- Returns:
- table names
- Since:
- 3.0.1
-
getTables
List<String> getTables(String... types)
Get the tables for the contents data types- Parameters:
types
- data types- Returns:
- table names
- Since:
- 4.0.0
-
getTypeContents
List<Contents> getTypeContents(ContentsDataType type)
Get the contents for the data type- Parameters:
type
- data type- Returns:
- contents
- Since:
- 4.0.0
-
getTypeContents
List<Contents> getTypeContents(ContentsDataType... types)
Get the contents for the data types- Parameters:
types
- data types- Returns:
- contents
- Since:
- 4.0.0
-
getTypeContents
List<Contents> getTypeContents(String type)
Get the contents for the data type- Parameters:
type
- data type- Returns:
- contents
- Since:
- 3.0.1
-
getTypeContents
List<Contents> getTypeContents(String... types)
Get the contents for the data types- Parameters:
types
- data types- Returns:
- contents
- Since:
- 4.0.0
-
isFeatureTable
boolean isFeatureTable(String table)
Check if the table is a feature table- Parameters:
table
- table name- Returns:
- true if a feature table
- Since:
- 1.1.7
-
isTileTable
boolean isTileTable(String table)
Check if the table is a tile table- Parameters:
table
- table name- Returns:
- true if a tile table
- Since:
- 1.1.7
-
isAttributeTable
boolean isAttributeTable(String table)
Check if the table is an attribute table- Parameters:
table
- table name- Returns:
- true if an attribute table
- Since:
- 3.3.0
-
isTableType
boolean isTableType(String table, ContentsDataType type)
Check if the table is the provided type- Parameters:
table
- table nametype
- data type- Returns:
- true if the type of table
- Since:
- 4.0.0
-
isTableType
boolean isTableType(String table, ContentsDataType... types)
Check if the table is one of the provided types- Parameters:
table
- table nametypes
- data types- Returns:
- true if the type of table
- Since:
- 4.0.0
-
isTableType
boolean isTableType(String table, String type)
Check if the table is the provided type- Parameters:
table
- table nametype
- data type- Returns:
- true if the type of table
- Since:
- 4.0.0
-
isTableType
boolean isTableType(String table, String... types)
Check if the table is one of the provided types- Parameters:
table
- table nametypes
- data types- Returns:
- true if the type of table
- Since:
- 4.0.0
-
isContentsTable
boolean isContentsTable(String table)
Check if the table exists as a user contents table- Parameters:
table
- table name- Returns:
- true if a user contents table
- Since:
- 3.2.0
-
isTable
boolean isTable(String table)
Check if the table exists- Parameters:
table
- table name- Returns:
- true if a table
- Since:
- 1.2.1
-
isView
boolean isView(String view)
Check if the view exists- Parameters:
view
- view name- Returns:
- true if a view
- Since:
- 4.0.0
-
isTableOrView
boolean isTableOrView(String name)
Check if the table or view exists- Parameters:
name
- table or view name- Returns:
- true if a table or view
- Since:
- 4.0.0
-
getTableContents
Contents getTableContents(String table)
Get the contents of the user table- Parameters:
table
- table name- Returns:
- contents
- Since:
- 3.0.1
-
getTableType
String getTableType(String table)
Get the contents data type of the user table- Parameters:
table
- table name- Returns:
- table type
- Since:
- 3.0.1
-
getTableDataType
ContentsDataType getTableDataType(String table)
Get the contents data type of the user table- Parameters:
table
- table name- Returns:
- table type or null if not an enumerated type
- Since:
- 3.3.0
-
getTableCoreDataType
ContentsDataType getTableCoreDataType(String table)
Get the data type of the user table only if it is a core data type (features, tiles, attributes)- Parameters:
table
- table name- Returns:
- core data type or null
- Since:
- 6.6.4
-
isTableCoreDataType
boolean isTableCoreDataType(String table)
Determine if the user table is one of the core data types (features, tiles, attributes)- Parameters:
table
- table name- Returns:
- true if a core data type
- Since:
- 6.6.4
-
getContentsBoundingBox
BoundingBox getContentsBoundingBox(Projection projection)
Get the bounding box for all table contents in the provided projection- Parameters:
projection
- desired bounding box projection- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, including contents and table metadata- Parameters:
projection
- desired bounding box projection- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(Projection projection, boolean manual)
Get the bounding box for all tables in the provided projection, including contents, table metadata, and manual queries if enabled- Parameters:
projection
- desired bounding box projectionmanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 3.1.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, using only table metadata- Parameters:
projection
- desired bounding box projection- Returns:
- bounding box
- Since:
- 4.0.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(Projection projection, boolean manual)
Get the bounding box for all tables in the provided projection, using only table metadata and manual queries if enabled- Parameters:
projection
- desired bounding box projectionmanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 4.0.0
-
getContentsBoundingBox
BoundingBox getContentsBoundingBox(String table)
Get the bounding box from the contents for the table in the table's projection- Parameters:
table
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
getContentsBoundingBox
BoundingBox getContentsBoundingBox(Projection projection, String table)
Get the bounding box from the contents for the table in the provided projection- Parameters:
projection
- desired bounding box projectiontable
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(String table)
Get the bounding box for the table in the table's projection, including contents and table metadata- Parameters:
table
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(Projection projection, String table)
Get the bounding box for the table in the provided projection, including contents and table metadata- Parameters:
projection
- desired bounding box projectiontable
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(String table, boolean manual)
Get the bounding box for the table in the table's projection, including contents, table metadata, and manual queries if enabled- Parameters:
table
- table namemanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
BoundingBox getBoundingBox(Projection projection, String table, boolean manual)
Get the bounding box for the table in the provided projection, including contents, table metadata, and manual queries if enabled- Parameters:
projection
- desired bounding box projectiontable
- table namemanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 3.1.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(String table)
Get the bounding box for the table in the table's projection, using only table metadata- Parameters:
table
- table name- Returns:
- bounding box
- Since:
- 4.0.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(Projection projection, String table)
Get the bounding box for the table in the provided projection, using only table metadata- Parameters:
projection
- desired bounding box projectiontable
- table name- Returns:
- bounding box
- Since:
- 4.0.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(String table, boolean manual)
Get the bounding box for the table in the table's projection, using only table metadata and manual queries if enabled- Parameters:
table
- table namemanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 4.0.0
-
getTableBoundingBox
BoundingBox getTableBoundingBox(Projection projection, String table, boolean manual)
Get the bounding box for the table in the provided projection, using only table metadata and manual queries if enabled- Parameters:
projection
- desired bounding box projectiontable
- table namemanual
- manual query flag, true to determine missing bounds manually- Returns:
- bounding box
- Since:
- 4.0.0
-
getContentsProjection
Projection getContentsProjection(String table)
Get the projection of the table contents- Parameters:
table
- table name- Returns:
- projection
- Since:
- 4.0.0
-
getProjection
Projection getProjection(String table)
Get the projection of the table- Parameters:
table
- table name- Returns:
- projection
- Since:
- 4.0.0
-
getFeatureBoundingBox
BoundingBox getFeatureBoundingBox(Projection projection, String table, boolean manual)
Get the feature table bounding box- Parameters:
projection
- desired projectiontable
- table namemanual
- true to manually query if not indexed- Returns:
- bounding box
- Since:
- 3.5.0
-
getSpatialReferenceSystemDao
SpatialReferenceSystemDao getSpatialReferenceSystemDao()
Get a Spatial Reference System DAO- Returns:
- Spatial Reference System DAO
-
getContentsDao
ContentsDao getContentsDao()
Get a Contents DAO- Returns:
- Contents DAO
-
getGeometryColumnsDao
GeometryColumnsDao getGeometryColumnsDao()
Get a Geometry Columns DAO- Returns:
- Geometry Columns DAO
-
createGeometryColumnsTable
boolean createGeometryColumnsTable()
Create the Geometry Columns table if it does not already exist- Returns:
- true if created
-
createFeatureTable
void createFeatureTable(FeatureTable table)
Create a new feature tableWARNING: only creates the feature table, call
createFeatureTable(FeatureTableMetadata)
) instead to create both the table and required GeoPackage metadata- Parameters:
table
- feature table
-
createFeatureTable
FeatureTable createFeatureTable(FeatureTableMetadata metadata)
Create a new feature table with GeoPackage metadata including: geometry columns table and row, user feature table, and contents row.- Parameters:
metadata
- feature table metadata- Returns:
- feature table
- Since:
- 4.0.0
-
getTileMatrixSetDao
TileMatrixSetDao getTileMatrixSetDao()
Get a Tile Matrix Set DAO- Returns:
- Tile Matrix Set DAO
-
createTileMatrixSetTable
boolean createTileMatrixSetTable()
Create the Tile Matrix Set table if it does not already exist- Returns:
- true if created
-
getTileMatrixDao
TileMatrixDao getTileMatrixDao()
Get a Tile Matrix DAO- Returns:
- Tile Matrix DAO
-
createTileMatrixTable
boolean createTileMatrixTable()
Create the Tile Matrix table if it does not already exist- Returns:
- true if created
-
createTileTable
void createTileTable(TileTable table)
Create a new tile tableWARNING: only creates the tile table, call
createTileTable(TileTableMetadata)
) instead to create both the table and required GeoPackage metadata- Parameters:
table
- tile table
-
createTileTable
TileTable createTileTable(TileTableMetadata metadata)
Create a new tile table with GeoPackage metadata including: tile matrix set table and row, tile matrix table, user tile table, and contents row.- Parameters:
metadata
- tile table metadata- Returns:
- tile table
- Since:
- 4.0.0
-
createAttributesTable
void createAttributesTable(AttributesTable table)
Create a new attributes tableWARNING: only creates the attributes table, call
createAttributesTable(AttributesTableMetadata)
) instead to create both the table and required GeoPackage metadata- Parameters:
table
- attributes table- Since:
- 1.2.1
-
createAttributesTable
AttributesTable createAttributesTable(AttributesTableMetadata metadata)
Create a new attributes table with GeoPackage metadata including: user attributes table and contents row.- Parameters:
metadata
- attributes table metadata- Returns:
- attributes table
- Since:
- 4.0.0
-
getExtensionsDao
ExtensionsDao getExtensionsDao()
Get an Extensions DAO- Returns:
- Extensions DAO
-
createExtensionsTable
boolean createExtensionsTable()
Create the Extensions table if it does not already exist- Returns:
- true if created
-
deleteTable
void deleteTable(String table)
Delete the user table (a feature or tile table) and all GeoPackage metadata- Parameters:
table
- table name
-
deleteTableQuietly
void deleteTableQuietly(String tableName)
Attempt to delete the user table (a feature or tile table) and all GeoPackage metadata quietly- Parameters:
tableName
- table name
-
verifyWritable
void verifyWritable()
Verify the GeoPackage is writable and throw an exception if it is not
-
createDao
<D extends GeoPackageDao<T,?>,T> D createDao(Class<T> type)
Create a dao- Type Parameters:
D
- dao typeT
- class type- Parameters:
type
- dao class type- Returns:
- base dao implementation
- Since:
- 1.1.0
-
execSQL
void execSQL(String sql)
Execute the sql on the GeoPackage database- Parameters:
sql
- sql statement- Since:
- 1.1.2
-
beginTransaction
void beginTransaction()
Begin a transaction- Since:
- 3.3.0
-
endTransaction
void endTransaction()
End a transaction successfully- Since:
- 3.3.0
-
failTransaction
void failTransaction()
Fail a transaction- Since:
- 3.3.0
-
endTransaction
void endTransaction(boolean successful)
End a transaction- Parameters:
successful
- true if the transaction was successful, false to rollback or not commit- Since:
- 3.3.0
-
endAndBeginTransaction
void endAndBeginTransaction()
End a transaction as successful and begin a new transaction- Since:
- 3.3.0
-
commit
void commit()
Commit changes on the connection- Since:
- 3.3.0
-
inTransaction
boolean inTransaction()
Determine if currently within a transaction- Returns:
- true if in transaction
- Since:
- 3.3.0
-
callInTransaction
<T> T callInTransaction(Callable<T> callable) throws SQLException
Execute theCallable
class inside an ORMLite transaction- Type Parameters:
T
- callable type- Parameters:
callable
- Callable to execute inside of the transaction.- Returns:
- The object returned by the callable.
- Throws:
SQLException
- upon transaction error- Since:
- 3.3.0
-
enableForeignKeys
boolean enableForeignKeys()
If foreign keys is disabled and there are no foreign key violations, enables foreign key checks, else logs violations- Returns:
- true if enabled or already enabled, false if foreign key violations and not enabled
- Since:
- 3.3.0
-
foreignKeys
boolean foreignKeys()
Query for the foreign keys value- Returns:
- true if enabled, false if disabled
- Since:
- 3.3.0
-
foreignKeys
boolean foreignKeys(boolean on)
Change the foreign keys state- Parameters:
on
- true to turn on, false to turn off- Returns:
- previous foreign keys value
- Since:
- 3.3.0
-
dropTable
void dropTable(String table)
Drop the table if it exists. Drops the table with the table name, not limited to GeoPackage specific tables.- Parameters:
table
- table name- Since:
- 1.1.5
-
dropView
void dropView(String view)
Drop the view if it exists. Drops the view with the view name, not limited to GeoPackage specific tables.- Parameters:
view
- view name- Since:
- 4.0.0
-
renameTable
void renameTable(String tableName, String newTableName)
Rename the table- Parameters:
tableName
- table namenewTableName
- new table name- Since:
- 3.3.0
-
copyTable
void copyTable(String tableName, String newTableName)
Copy the table with transferred contents and extensions- Parameters:
tableName
- table namenewTableName
- new table name- Since:
- 3.3.0
-
copyTableNoExtensions
void copyTableNoExtensions(String tableName, String newTableName)
Copy the table with transferred contents but no extensions- Parameters:
tableName
- table namenewTableName
- new table name- Since:
- 3.3.0
-
copyTableAsEmpty
void copyTableAsEmpty(String tableName, String newTableName)
Copy the table but leave the user table empty and without extensions- Parameters:
tableName
- table namenewTableName
- new table name- Since:
- 3.3.0
-
vacuum
void vacuum()
Rebuild the GeoPackage, repacking it into a minimal amount of disk space- Since:
- 3.3.0
-
getExtensionManager
ExtensionManager getExtensionManager()
Get an extension manager on the GeoPackage- Returns:
- extension manager
- Since:
- 4.0.0
-
createUserTable
void createUserTable(UserTable<? extends UserColumn> table)
Create a new user table- Parameters:
table
- user table- Since:
- 3.0.1
-
saveSchema
void saveSchema(UserTable<? extends UserColumn> table)
Save the table schema using theSchemaExtension
- Parameters:
table
- user table- Since:
- 6.6.7
-
-