GPKGGeoPackage
Objective-C
@interface GPKGGeoPackage : NSObject
Swift
class GPKGGeoPackage : NSObject
A single GeoPackage database connection
-
GeoPackage name
Declaration
Objective-C
@property (nonatomic, strong) NSString *name;
Swift
var name: String! { get set }
-
GeoPackage file path
Declaration
Objective-C
@property (nonatomic, strong) NSString *path;
Swift
var path: String! { get set }
-
Database connection
Declaration
Objective-C
@property (nonatomic) GPKGConnection *database;
Swift
var database: GPKGConnection! { get set }
-
Writable GeoPackage flag
Declaration
Objective-C
@property (nonatomic) BOOL writable;
Swift
var writable: Bool { get set }
-
Metadata db
Declaration
Objective-C
@property (nonatomic, strong) GPKGMetadataDb *metadataDb;
Swift
var metadataDb: GPKGMetadataDb! { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithConnection:(GPKGConnection *)database andWritable:(BOOL)writable andMetadataDb:(GPKGMetadataDb *)metadataDb;
Swift
init!(connection database: GPKGConnection!, andWritable writable: Bool, andMetadataDb metadataDb: GPKGMetadataDb!)
Parameters
database
database connection
writable
writable flag
Return Value
new GeoPackage
-
Close the GeoPackage connection
Declaration
Objective-C
- (void)close;
Swift
func close()
-
Get the Table Creator
Declaration
Objective-C
- (GPKGGeoPackageTableCreator *)tableCreator;
Swift
func tableCreator() -> GPKGGeoPackageTableCreator!
Return Value
table creator
-
Get the application id
Declaration
Objective-C
- (NSString *)applicationId;
Swift
func applicationId() -> String!
Return Value
application id
-
Get the application id integer
Declaration
Objective-C
- (NSNumber *)applicationIdNumber;
Swift
func applicationIdNumber() -> NSNumber!
Return Value
application id integer
-
Get the application id as a hex string prefixed with 0x
Declaration
Objective-C
- (NSString *)applicationIdHex;
Swift
func applicationIdHex() -> String!
Return Value
application id hex string
-
Get the user version
Declaration
Objective-C
- (NSNumber *)userVersion;
Swift
func userVersion() -> NSNumber!
Return Value
user version
-
Get the major user version
Declaration
Objective-C
- (NSNumber *)userVersionMajor;
Swift
func userVersionMajor() -> NSNumber!
Return Value
major user version
-
Get the minor user version
Declaration
Objective-C
- (NSNumber *)userVersionMinor;
Swift
func userVersionMinor() -> NSNumber!
Return Value
minor user version
-
Get the patch user version
Declaration
Objective-C
- (NSNumber *)userVersionPatch;
Swift
func userVersionPatch() -> NSNumber!
Return Value
patch user version
-
Get the feature tables
Declaration
Objective-C
- (NSArray<NSString *> *)featureTables;
Swift
func featureTables() -> [String]!
Return Value
feature table names
-
Get the tile tables
Declaration
Objective-C
- (NSArray<NSString *> *)tileTables;
Swift
func tileTables() -> [String]!
Return Value
tile table names
-
Get the attributes tables
Declaration
Objective-C
- (NSArray<NSString *> *)attributesTables;
Swift
func attributesTables() -> [String]!
Return Value
attributes table names
-
Get the tables for the contents data type
Declaration
Objective-C
- (NSArray<NSString *> *)tablesByType:(enum GPKGContentsDataType)type;
Swift
func tables(by type: GPKGContentsDataType) -> [String]!
Parameters
type
data type
Return Value
table names
-
Get the tables for the contents data types
Declaration
Objective-C
- (NSArray<NSString *> *)tablesByTypes:(NSArray<NSNumber *> *)types;
Swift
func tables(byTypes types: [NSNumber]!) -> [String]!
Parameters
types
data types
Return Value
table names
-
Get the tables for the contents data type
Declaration
Objective-C
- (NSArray<NSString *> *)tablesByTypeName:(NSString *)type;
Swift
func tables(byTypeName type: String!) -> [String]!
Parameters
type
data type
Return Value
table names
-
Get the tables for the contents data types
Declaration
Objective-C
- (NSArray<NSString *> *)tablesByTypeNames:(NSArray<NSString *> *)types;
Swift
func tables(byTypeNames types: [String]!) -> [String]!
Parameters
types
data types
Return Value
table names
-
Get the contents for the data type
Declaration
Objective-C
- (GPKGResultSet *)contentsByType:(enum GPKGContentsDataType)type;
Swift
func contents(by type: GPKGContentsDataType) -> GPKGResultSet!
Parameters
type
data type
Return Value
contents
-
Get the contents for the data types
Declaration
Objective-C
- (GPKGResultSet *)contentsByTypes:(NSArray<NSNumber *> *)types;
Swift
func contents(byTypes types: [NSNumber]!) -> GPKGResultSet!
Parameters
types
data types
Return Value
contents
-
Get the contents for the data type
Declaration
Objective-C
- (GPKGResultSet *)contentsByTypeName:(NSString *)type;
Swift
func contents(byTypeName type: String!) -> GPKGResultSet!
Parameters
type
data type
Return Value
contents
-
Get the contents for the data types
Declaration
Objective-C
- (GPKGResultSet *)contentsByTypeNames:(NSArray<NSString *> *)types;
Swift
func contents(byTypeNames types: [String]!) -> GPKGResultSet!
Parameters
types
data types
Return Value
contents
-
Get the feature and tile tables
Declaration
Objective-C
- (NSArray<NSString *> *)tables;
Swift
func tables() -> [String]!
Return Value
feature and tile table names
-
Check if the table is a feature table
Declaration
Objective-C
- (BOOL)isFeatureTable:(NSString *)table;
Swift
func isFeatureTable(_ table: String!) -> Bool
Parameters
table
table name
Return Value
true if a feature table
-
Check if the table is a tile table
Declaration
Objective-C
- (BOOL)isTileTable:(NSString *)table;
Swift
func isTileTable(_ table: String!) -> Bool
Parameters
table
table name
Return Value
true if a tile table
-
Check if the table is an attribute table
Declaration
Objective-C
- (BOOL)isAttributeTable:(NSString *)table;
Swift
func isAttributeTable(_ table: String!) -> Bool
Parameters
table
table name
Return Value
true if a tile table
-
Check if the table is the provided type
Declaration
Objective-C
- (BOOL)isTable:(NSString *)table ofType:(enum GPKGContentsDataType)type;
Swift
func isTable(_ table: String!, of type: GPKGContentsDataType) -> Bool
Parameters
table
table name
type
contents data type
Return Value
true if the type of table
-
Check if the table is one of the provided types
Declaration
Objective-C
- (BOOL)isTable:(NSString *)table ofTypes:(NSArray<NSNumber *> *)types;
Swift
func isTable(_ table: String!, ofTypes types: [NSNumber]!) -> Bool
Parameters
table
table name
types
contents data types
Return Value
true if the type of table
-
Check if the table is the provided type
Declaration
Objective-C
- (BOOL)isTable:(NSString *)table ofTypeName:(NSString *)type;
Swift
func isTable(_ table: String!, ofTypeName type: String!) -> Bool
Parameters
table
table name
type
contents data type
Return Value
true if the type of table
-
Check if the table is one of the provided types
Declaration
Objective-C
- (BOOL)isTable:(NSString *)table ofTypeNames:(NSArray<NSString *> *)types;
Swift
func isTable(_ table: String!, ofTypeNames types: [String]!) -> Bool
Parameters
table
table name
types
data types
Return Value
true if the type of table
-
Check if the table exists as a user contents table
Declaration
Objective-C
- (BOOL)isContentsTable:(NSString *)table;
Swift
func isContentsTable(_ table: String!) -> Bool
Parameters
table
table name
Return Value
true if a user contents table
-
Check if the table exists
Declaration
Objective-C
- (BOOL)isTable:(NSString *)table;
Swift
func isTable(_ table: String!) -> Bool
Parameters
table
table name
Return Value
true if a table
-
Check if the view exists
Declaration
Objective-C
- (BOOL)isView:(NSString *)view;
Swift
func isView(_ view: String!) -> Bool
Parameters
view
view name
Return Value
true if a view
-
Check if the table or view exists
Declaration
Objective-C
- (BOOL)isTableOrView:(NSString *)name;
Swift
func isTableOrView(_ name: String!) -> Bool
Parameters
name
table or view name
Return Value
true if a table or view
-
Get the contents of the user table
Declaration
Objective-C
- (GPKGContents *)contentsOfTable:(NSString *)table;
Swift
func contents(ofTable table: String!) -> GPKGContents!
Parameters
table
table name
Return Value
contents
-
Get the contents data type of the user table
Declaration
Objective-C
- (NSString *)typeOfTable:(NSString *)table;
Swift
func type(ofTable table: String!) -> String!
Parameters
table
table name
Return Value
table type
-
Get the contents data type of the user table
Declaration
Objective-C
- (enum GPKGContentsDataType)dataTypeOfTable:(NSString *)table;
Swift
func dataType(ofTable table: String!) -> GPKGContentsDataType
Parameters
table
table name
Return Value
table type or -1 if not an enumerated type
-
Get the feature table count
Declaration
Objective-C
- (int)featureTableCount;
Swift
func featureTableCount() -> Int32
Return Value
number of feature tables
-
Get the tile table count
Declaration
Objective-C
- (int)tileTableCount;
Swift
func tileTableCount() -> Int32
Return Value
number of tile tables
-
Get the feature and tile table count
Declaration
Objective-C
- (int)tableCount;
Swift
func tableCount() -> Int32
Return Value
number of feature and tile tables
-
Get the bounding box for all table contents in the provided projection
Declaration
Objective-C
- (GPKGBoundingBox *)contentsBoundingBoxInProjection: (PROJProjection *)projection;
Swift
func contentsBoundingBox(in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
Return Value
bounding box
-
Get the bounding box for all tables in the provided projection, including contents and table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxInProjection:(PROJProjection *)projection;
Swift
func boundingBox(in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
Return Value
bounding box
-
Get the bounding box for all tables in the provided projection, including contents, table metadata, and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxInProjection:(PROJProjection *)projection andManual:(BOOL)manual;
Swift
func boundingBox(in projection: PROJProjection!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the bounding box for all tables in the provided projection, using only table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxInProjection:(PROJProjection *)projection;
Swift
func tableBoundingBox(in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
Return Value
bounding box
-
Get the bounding box for all tables in the provided projection, using only table metadata and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxInProjection:(PROJProjection *)projection andManual:(BOOL)manual;
Swift
func tableBoundingBox(in projection: PROJProjection!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the bounding box from the contents for the table in the table’s projection
Declaration
Objective-C
- (GPKGBoundingBox *)contentsBoundingBoxOfTable:(NSString *)table;
Swift
func contentsBoundingBox(ofTable table: String!) -> GPKGBoundingBox!
Parameters
table
table name
Return Value
bounding box
-
Get the bounding box from the contents for the table in the provided projection
Declaration
Objective-C
- (GPKGBoundingBox *)contentsBoundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection;
Swift
func contentsBoundingBox(ofTable table: String!, in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
table
table name
projection
desired bounding box projection
Return Value
bounding box
-
Get the bounding box for the table in the table’s projection, including contents and table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxOfTable:(NSString *)table;
Swift
func boundingBox(ofTable table: String!) -> GPKGBoundingBox!
Parameters
table
table name
Return Value
bounding box
-
Get the bounding box for the table in the provided projection, including contents and table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection;
Swift
func boundingBox(ofTable table: String!, in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
table
table name
projection
desired bounding box projection
Return Value
bounding box
-
Get the bounding box for the table in the table’s projection, including contents, table metadata, and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxOfTable:(NSString *)table andManual:(BOOL)manual;
Swift
func boundingBox(ofTable table: String!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
table
table name
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the bounding box for the table in the provided projection, including contents, table metadata, and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection andManual:(BOOL)manual;
Swift
func boundingBox(ofTable table: String!, in projection: PROJProjection!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
table
table name
projection
desired bounding box projection
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the bounding box for the table in the table’s projection, using only table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxOfTable:(NSString *)table;
Swift
func tableBoundingBox(ofTable table: String!) -> GPKGBoundingBox!
Parameters
table
table name
Return Value
bounding box
-
Get the bounding box for the table in the provided projection, using only table metadata
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection;
Swift
func tableBoundingBox(ofTable table: String!, in projection: PROJProjection!) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
table
table name
Return Value
bounding box
-
Get the bounding box for the table in the table’s projection, using only table metadata and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxOfTable:(NSString *)table andManual:(BOOL)manual;
Swift
func tableBoundingBox(ofTable table: String!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
table
table name
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the bounding box for the table in the provided projection, using only table metadata and manual queries if enabled
Declaration
Objective-C
- (GPKGBoundingBox *)tableBoundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection andManual:(BOOL)manual;
Swift
func tableBoundingBox(ofTable table: String!, in projection: PROJProjection!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
projection
desired bounding box projection
table
table name
manual
manual query flag, true to determine missing bounds manually
Return Value
bounding box
-
Get the projection of the table contents
Declaration
Objective-C
- (PROJProjection *)contentsProjectionOfTable:(NSString *)table;
Swift
func contentsProjection(ofTable table: String!) -> PROJProjection!
Parameters
table
table name
Return Value
projection
-
Get the projection of the table
Declaration
Objective-C
- (PROJProjection *)projectionOfTable:(NSString *)table;
Swift
func projection(ofTable table: String!) -> PROJProjection!
Parameters
table
table name
Return Value
projection
-
Get the feature table bounding box
Declaration
Objective-C
- (GPKGBoundingBox *)featureBoundingBoxOfTable:(NSString *)table inProjection:(PROJProjection *)projection andManual:(BOOL)manual;
Swift
func featureBoundingBox(ofTable table: String!, in projection: PROJProjection!, andManual manual: Bool) -> GPKGBoundingBox!
Parameters
table
table name
projection
desired projection
manual
true to manually query if not indexed
Return Value
bounding box
-
Get a Spatial Reference System DAO
Declaration
Objective-C
- (GPKGSpatialReferenceSystemDao *)spatialReferenceSystemDao;
Swift
func spatialReferenceSystemDao() -> GPKGSpatialReferenceSystemDao!
Return Value
Spatial Reference System DAO
-
Get a Contents DAO
Declaration
Objective-C
- (GPKGContentsDao *)contentsDao;
Swift
func contentsDao() -> GPKGContentsDao!
Return Value
Contents DAO
-
Get a Geometry Columns DAO
Declaration
Objective-C
- (GPKGGeometryColumnsDao *)geometryColumnsDao;
Swift
func geometryColumnsDao() -> GPKGGeometryColumnsDao!
Return Value
Geometry Columns DAO
-
Create the Geometry Columns table if it does not already exist
Declaration
Objective-C
- (BOOL)createGeometryColumnsTable;
Swift
func createGeometryColumnsTable() -> Bool
Return Value
true if created
-
Create a new feature table
WARNING: only creates the feature table, call createFeatureTableWithMetadata instead to create both the table and required GeoPackage metadata
Declaration
Objective-C
- (void)createFeatureTable:(GPKGFeatureTable *)table;
Swift
func createFeatureTable(_ table: GPKGFeatureTable!)
Parameters
table
feature table
-
Create a new feature table with GeoPackage metadata including: geometry columns table and row, user feature table, and contents row.
Declaration
Objective-C
- (GPKGFeatureTable *)createFeatureTableWithMetadata: (GPKGFeatureTableMetadata *)metadata;
Swift
func createFeatureTable(with metadata: GPKGFeatureTableMetadata!) -> GPKGFeatureTable!
Parameters
metadata
feature table metadata
Return Value
feature table
-
Get a Tile Matrix Set DAO
Declaration
Objective-C
- (GPKGTileMatrixSetDao *)tileMatrixSetDao;
Swift
func tileMatrixSetDao() -> GPKGTileMatrixSetDao!
Return Value
Tile Matrix Set DAO
-
Create the Tile Matrix Set table if it does not already exist
Declaration
Objective-C
- (BOOL)createTileMatrixSetTable;
Swift
func createTileMatrixSetTable() -> Bool
Return Value
true if created
-
Get a Tile Matrix DAO
Declaration
Objective-C
- (GPKGTileMatrixDao *)tileMatrixDao;
Swift
func tileMatrixDao() -> GPKGTileMatrixDao!
Return Value
Tile Matrix DAO
-
Create the Tile Matrix table if it does not already exist
Declaration
Objective-C
- (BOOL)createTileMatrixTable;
Swift
func createTileMatrixTable() -> Bool
Return Value
true if created
-
Create a new tile table
WARNING: only creates the tile table, call createTileTableWithMetadata instead to create both the table and required GeoPackage metadata
Declaration
Objective-C
- (void)createTileTable:(GPKGTileTable *)table;
Swift
func createTileTable(_ table: GPKGTileTable!)
Parameters
table
tile table
-
Create a new tile table with GeoPackage metadata including: tile matrix set table and row, tile matrix table, user tile table, and contents row.
Declaration
Objective-C
- (GPKGTileTable *)createTileTableWithMetadata: (GPKGTileTableMetadata *)metadata;
Swift
func createTileTable(with metadata: GPKGTileTableMetadata!) -> GPKGTileTable!
Parameters
metadata
tile table metadata
Return Value
tile table
-
Create a new attributes table
WARNING: only creates the attributes table, call createAttributesTableWithMetadata instead to create both the table and required GeoPackage metadata
Declaration
Objective-C
- (void)createAttributesTable:(GPKGAttributesTable *)table;
Swift
func createAttributesTable(_ table: GPKGAttributesTable!)
Parameters
table
attributes table
-
Create a new attributes table with GeoPackage metadata including: user attributes table and contents row.
Declaration
Objective-C
- (GPKGAttributesTable *)createAttributesTableWithMetadata: (GPKGAttributesTableMetadata *)metadata;
Swift
func createAttributesTable(with metadata: GPKGAttributesTableMetadata!) -> GPKGAttributesTable!
Parameters
metadata
attributes table metadata
Return Value
attributes table
-
Get an Extensions DAO
Declaration
Objective-C
- (GPKGExtensionsDao *)extensionsDao;
Swift
func extensionsDao() -> GPKGExtensionsDao!
Return Value
Extensions DAO
-
Create the Extensions table if it does not already exist
Declaration
Objective-C
- (BOOL)createExtensionsTable;
Swift
func createExtensionsTable() -> Bool
Return Value
true if created
-
Delete the table and all GeoPackage metadata
Declaration
Objective-C
- (void)deleteTable:(NSString *)tableName;
Swift
func deleteTable(_ tableName: String!)
Parameters
tableName
table name
-
Attempt to delete the table and all GeoPackage metadata quietly
Declaration
Objective-C
- (void)deleteTableQuietly:(NSString *)tableName;
Swift
func deleteTableQuietly(_ tableName: String!)
Parameters
tableName
table name
-
Verify the GeoPackage is writable and throw an exception if it is not
Declaration
Objective-C
- (void)verifyWritable;
Swift
func verifyWritable()
-
Get a Feature DAO from Geometry Columns
Declaration
Objective-C
- (GPKGFeatureDao *)featureDaoWithGeometryColumns: (GPKGGeometryColumns *)geometryColumns;
Swift
func featureDao(with geometryColumns: GPKGGeometryColumns!) -> GPKGFeatureDao!
Parameters
geometryColumns
Geometry Columns
Return Value
Feature DAO
-
Get a Feature DAO from Contents
Declaration
Objective-C
- (GPKGFeatureDao *)featureDaoWithContents:(GPKGContents *)contents;
Swift
func featureDao(with contents: GPKGContents!) -> GPKGFeatureDao!
Parameters
contents
Contents
Return Value
Feature DAO
-
Get a Feature DAO from a table
Declaration
Objective-C
- (GPKGFeatureDao *)featureDaoWithTable:(GPKGFeatureTable *)table;
Swift
func featureDao(with table: GPKGFeatureTable!) -> GPKGFeatureDao!
Parameters
table
feature table
Return Value
feature dao
-
Get a Feature DAO from a table name
Declaration
Objective-C
- (GPKGFeatureDao *)featureDaoWithTableName:(NSString *)tableName;
Swift
func featureDao(withTableName tableName: String!) -> GPKGFeatureDao!
Parameters
tableName
table name
Return Value
Feature DAO
-
Get a Tile DAO from Tile Matrix Set
Declaration
Objective-C
- (GPKGTileDao *)tileDaoWithTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet;
Swift
func tileDao(with tileMatrixSet: GPKGTileMatrixSet!) -> GPKGTileDao!
Parameters
tileMatrixSet
Tile Matrix Set
Return Value
Tile DAO
-
Get a Tile DAO from Contents
Declaration
Objective-C
- (GPKGTileDao *)tileDaoWithContents:(GPKGContents *)contents;
Swift
func tileDao(with contents: GPKGContents!) -> GPKGTileDao!
Parameters
contents
Contents
Return Value
Tile DAO
-
Get a Tile DAO from a table
Declaration
Objective-C
- (GPKGTileDao *)tileDaoWithTable:(GPKGTileTable *)table;
Swift
func tileDao(with table: GPKGTileTable!) -> GPKGTileDao!
Parameters
table
tile table
Return Value
tile dao
-
Get a Tile DAO from a table name
Declaration
Objective-C
- (GPKGTileDao *)tileDaoWithTableName:(NSString *)tableName;
Swift
func tileDao(withTableName tableName: String!) -> GPKGTileDao!
Parameters
tableName
table name
Return Value
Tile DAO
-
Get an Attributes DAO from Contents
Declaration
Objective-C
- (GPKGAttributesDao *)attributesDaoWithContents:(GPKGContents *)contents;
Swift
func attributesDao(with contents: GPKGContents!) -> GPKGAttributesDao!
Parameters
contents
contents
Return Value
attributes dao
-
Get an Attributes DAO from a table
Declaration
Objective-C
- (GPKGAttributesDao *)attributesDaoWithTable:(GPKGAttributesTable *)table;
Swift
func attributesDao(with table: GPKGAttributesTable!) -> GPKGAttributesDao!
Parameters
table
attributes table
Return Value
attributes dao
-
Get an Attributes DAO from a table name
Declaration
Objective-C
- (GPKGAttributesDao *)attributesDaoWithTableName:(NSString *)tableName;
Swift
func attributesDao(withTableName tableName: String!) -> GPKGAttributesDao!
Parameters
tableName
table name
Return Value
attributes dao
-
Get a User Custom DAO from a table name
Declaration
Objective-C
- (GPKGUserCustomDao *)userCustomDaoWithTableName:(NSString *)tableName;
Swift
func userCustomDao(withTableName tableName: String!) -> GPKGUserCustomDao!
Parameters
tableName
table name
Return Value
user custom dao
-
Get a User Custom DAO from a table
Declaration
Objective-C
- (GPKGUserCustomDao *)userCustomDaoWithTable:(GPKGUserCustomTable *)table;
Swift
func userCustomDao(with table: GPKGUserCustomTable!) -> GPKGUserCustomDao!
Parameters
table
table
Return Value
user custom dao
-
Get a User DAO from a table
Declaration
Objective-C
- (GPKGUserDao *)userDaoWithTableName:(NSString *)tableName;
Swift
func userDao(withTableName tableName: String!) -> GPKGUserDao!
Parameters
tableName
table name
Return Value
user dao
-
Execute the sql on the GeoPackage database
Declaration
Objective-C
- (void)execSQL:(NSString *)sql;
Swift
func execSQL(_ sql: String!)
Parameters
sql
sql
-
Begin a transaction
Declaration
Objective-C
- (void)beginTransaction;
Swift
func beginTransaction()
-
Commit the transaction
Declaration
Objective-C
- (void)commitTransaction;
Swift
func commitTransaction()
-
Rollback the transaction
Declaration
Objective-C
- (void)rollbackTransaction;
Swift
func rollbackTransaction()
-
Determine if currently within a transaction
Declaration
Objective-C
- (BOOL)inTransaction;
Swift
func inTransaction() -> Bool
Return Value
true if in transaction
-
If foreign keys is disabled and there are no foreign key violations, enables foreign key checks, else logs violations
Declaration
Objective-C
- (BOOL)enableForeignKeys;
Swift
func enableForeignKeys() -> Bool
Return Value
true if enabled or already enabled, false if foreign key violations and not enabled
-
Query for the foreign keys value
Declaration
Objective-C
- (BOOL)foreignKeys;
Swift
func foreignKeys() -> Bool
Return Value
true if enabled, false if disabled
-
Change the foreign keys state
Declaration
Objective-C
- (BOOL)foreignKeysAsOn:(BOOL)on;
Swift
func foreignKeysAs(on: Bool) -> Bool
Parameters
on
true to turn on, false to turn off
Return Value
previous foreign keys value
-
- Drop the table if it exists. Drops the table with the table name, not
- limited to GeoPackage specific tables. *
- - parameter: table table to drop
Declaration
Objective-C
- (void)dropTable:(NSString *)table;
Swift
func dropTable(_ table: String!)
-
Drop the view if it exists. Drops the view with the view name, not limited to GeoPackage specific tables.
Declaration
Objective-C
- (void)dropView:(NSString *)view;
Swift
func dropView(_ view: String!)
Parameters
view
view name
-
Rename the table
Declaration
Objective-C
- (void)renameTable:(NSString *)tableName toTable:(NSString *)newTableName;
Swift
func renameTable(_ tableName: String!, toTable newTableName: String!)
Parameters
tableName
table name
newTableName
new table name
-
Copy the table with transferred contents and extensions
Declaration
Objective-C
- (void)copyTable:(NSString *)tableName toTable:(NSString *)newTableName;
Swift
func copyTable(_ tableName: String!, toTable newTableName: String!)
Parameters
tableName
table name
newTableName
new table name
-
Copy the table with transferred contents but no extensions
Declaration
Objective-C
- (void)copyTableNoExtensions:(NSString *)tableName toTable:(NSString *)newTableName;
Swift
func copyTableNoExtensions(_ tableName: String!, toTable newTableName: String!)
Parameters
tableName
table name
newTableName
new table name
-
Copy the table but leave the user table empty and without extensions
Declaration
Objective-C
- (void)copyTableAsEmpty:(NSString *)tableName toTable:(NSString *)newTableName;
Swift
func copyTable(asEmpty tableName: String!, toTable newTableName: String!)
Parameters
tableName
table name
newTableName
new table name
-
Rebuild the GeoPackage, repacking it into a minimal amount of disk space
Declaration
Objective-C
- (void)vacuum;
Swift
func vacuum()
-
Perform a raw query on the database
Declaration
Objective-C
- (GPKGResultSet *)rawQuery:(NSString *)sql andArgs:(NSArray *)args;
Swift
func rawQuery(_ sql: String!, andArgs args: [Any]!) -> GPKGResultSet!
Parameters
sql
sql
args
sql args
Return Value
result set
-
Perform a foreign key check on the database
Declaration
Objective-C
- (GPKGResultSet *)foreignKeyCheck;
Swift
func foreignKeyCheck() -> GPKGResultSet!
Return Value
nil if check passed, open result set with results if failed
-
Perform a foreign key check on the database table
Declaration
Objective-C
- (GPKGResultSet *)foreignKeyCheckOnTable:(NSString *)tableName;
Swift
func foreignKeyCheck(onTable tableName: String!) -> GPKGResultSet!
Parameters
tableName
table name
Return Value
null if check passed, open result set with results if failed
-
Perform an integrity check on the database
Declaration
Objective-C
- (GPKGResultSet *)integrityCheck;
Swift
func integrityCheck() -> GPKGResultSet!
Return Value
nil if check passed, open result set with results if failed
-
Perform a quick integrity check on the database
Return Value
nil if check passed, open result set with results if failed
-
Create a new user table
Declaration
Objective-C
- (void)createUserTable:(GPKGUserTable *)table;
Swift
func createUserTable(_ table: GPKGUserTable!)
Parameters
table
user table
-
Save the table schema using the {@link SchemaExtension}
Declaration
Objective-C
- (void)saveSchema:(GPKGUserTable *)table;
Swift
func saveSchema(_ table: GPKGUserTable!)