GPKGRelatedTablesExtension
Objective-C
@interface GPKGRelatedTablesExtension : GPKGBaseExtension
Swift
class GPKGRelatedTablesExtension : GPKGBaseExtension
Related Tables extension
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage;
Swift
init!(geoPackage: GPKGGeoPackage!)
Parameters
geoPackage
GeoPackage
Return Value
new related tables
-
Get the extension name
Declaration
Objective-C
- (NSString *)extensionName;
Swift
func extensionName() -> String!
Return Value
extension name
-
Get the extension definition
Declaration
Objective-C
- (NSString *)extensionDefinition;
Swift
func extensionDefinition() -> String!
Return Value
extension definition
-
Determine if the GeoPackage has the extension
Declaration
Objective-C
- (BOOL)has;
Swift
func has() -> Bool
Return Value
true if has extension
-
Determine if the GeoPackage has the extension for the mapping table
Declaration
Objective-C
- (BOOL)hasWithMappingTable:(NSString *)mappingTable;
Swift
func has(withMappingTable mappingTable: String!) -> Bool
Parameters
mappingTable
mapping table name
Return Value
true if has extension
-
Get the extended relations DAO
Declaration
Objective-C
- (GPKGExtendedRelationsDao *)extendedRelationsDao;
Swift
func extendedRelationsDao() -> GPKGExtendedRelationsDao!
Return Value
extended relations DAO
-
Get a Extended Relations DAO
Declaration
Objective-C
+ (GPKGExtendedRelationsDao *)extendedRelationsDaoWithGeoPackage: (GPKGGeoPackage *)geoPackage;
Swift
class func extendedRelationsDao(with geoPackage: GPKGGeoPackage!) -> GPKGExtendedRelationsDao!
Parameters
geoPackage
GeoPackage
Return Value
extended relations dao
-
Get a Extended Relations DAO
Declaration
Objective-C
+ (GPKGExtendedRelationsDao *)extendedRelationsDaoWithDatabase: (GPKGConnection *)database;
Swift
class func extendedRelationsDao(withDatabase database: GPKGConnection!) -> GPKGExtendedRelationsDao!
Parameters
database
database connection
Return Value
extended relations dao
-
Create the Extended Relations Table if it does not exist
Declaration
Objective-C
- (BOOL)createExtendedRelationsTable;
Swift
func createExtendedRelationsTable() -> Bool
Return Value
true if created
-
Get the primary key of a table
Declaration
Objective-C
- (NSString *)primaryKeyColumnNameOfTable:(NSString *)tableName;
Swift
func primaryKeyColumnName(ofTable tableName: String!) -> String!
Parameters
tableName
table name
Return Value
the column name
-
Set the contents in the user table
Declaration
Objective-C
- (void)setContentsInTable:(GPKGUserTable *)table;
Swift
func setContentsIn(_ table: GPKGUserTable!)
Parameters
table
user table
-
Returns the relationships defined through this extension
Declaration
Objective-C
- (NSArray<GPKGExtendedRelation *> *)relationships;
Swift
func relationships() -> [GPKGExtendedRelation]!
Return Value
a list of ExtendedRelation objects
-
Adds a relationship between the base and related table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andMappingTableName:(NSString *)mappingTableName andRelation:(enum GPKGRelationType)relationType;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andMappingTableName mappingTableName: String!, andRelation relationType: GPKGRelationType) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
mappingTableName
mapping table name
relationType
relation type
Return Value
The relationship that was added
-
-addRelationshipWithBaseTable:
andRelatedTable: andMappingTableName: andRelationAuthor: andRelationName: Adds a relationship between the base and related table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andMappingTableName:(NSString *)mappingTableName andRelationAuthor:(NSString *)relationAuthor andRelationName:(NSString *)relationName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andMappingTableName mappingTableName: String!, andRelationAuthor relationAuthor: String!, andRelationName relationName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
mappingTableName
mapping table name
relationAuthor
relation author
relationName
relation name
Return Value
The relationship that was added
-
Adds a relationship between the base and related table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andMappingTableName:(NSString *)mappingTableName andRelationName:(NSString *)relationName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andMappingTableName mappingTableName: String!, andRelationName relationName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
mappingTableName
mapping table name
relationName
relation name
Return Value
The relationship that was added
-
Adds a relationship between the base and related table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andUserMappingTable:(GPKGUserMappingTable *)userMappingTable andRelation:(enum GPKGRelationType)relationType;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!, andRelation relationType: GPKGRelationType) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
userMappingTable
user mapping table
relationType
relation type
Return Value
The relationship that was added
-
-addRelationshipWithBaseTable:
andRelatedTable: andUserMappingTable: andRelationAuthor: andRelationName: Adds a relationship between the base and related table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andUserMappingTable:(GPKGUserMappingTable *)userMappingTable andRelationAuthor:(NSString *)relationAuthor andRelationName:(NSString *)relationName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!, andRelationAuthor relationAuthor: String!, andRelationName relationName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
userMappingTable
user mapping table
relationAuthor
relation author
relationName
relation name
Return Value
The relationship that was added
-
Adds a relationship between the base and related table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andUserMappingTable:(GPKGUserMappingTable *)userMappingTable andRelationName:(NSString *)relationName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!, andRelationName relationName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTableName
related table name
userMappingTable
user mapping table
relationName
relation name
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates a default user mapping table and the related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserRelatedTable:(GPKGUserRelatedTable *)relatedTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserRelatedTable relatedTable: GPKGUserRelatedTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates the user mapping table and related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserRelatedTable:(GPKGUserRelatedTable *)relatedTable andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserRelatedTable relatedTable: GPKGUserRelatedTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates a default user mapping table and the related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserTable:(GPKGUserTable *)relatedTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserTable relatedTable: GPKGUserTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates the user mapping table and related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserTable:(GPKGUserTable *)relatedTable andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserTable relatedTable: GPKGUserTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates a default user mapping table and the related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserTable:(GPKGUserTable *)relatedTable andRelationName:(NSString *)relationName andMappingTableName:(NSString *)mappingTableName;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserTable relatedTable: GPKGUserTable!, andRelationName relationName: String!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
relationName
relation name
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a relationship between the base and user related table. Creates the user mapping table and related table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addRelationshipWithBaseTable:(NSString *)baseTableName andUserTable:(GPKGUserTable *)relatedTable andRelationName:(NSString *)relationName andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addRelationship(withBaseTable baseTableName: String!, andUserTable relatedTable: GPKGUserTable!, andRelationName relationName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTable
user related table
relationName
relation name
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a features relationship between the base feature and related feature table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addFeaturesRelationshipWithBaseTable:(NSString *)baseFeaturesTableName andRelatedTable:(NSString *)relatedFeaturesTableName andMappingTableName:(NSString *)mappingTableName;
Swift
func addFeaturesRelationship(withBaseTable baseFeaturesTableName: String!, andRelatedTable relatedFeaturesTableName: String!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseFeaturesTableName
base features table name
relatedFeaturesTableName
related features table name
mappingTableName
mapping table name
Return Value
The relationship that was added
-
Adds a features relationship between the base feature and related feature table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addFeaturesRelationshipWithBaseTable:(NSString *)baseFeaturesTableName andRelatedTable:(NSString *)relatedFeaturesTableName andUserMappingTable: (GPKGUserMappingTable *)userMappingTable;
Swift
func addFeaturesRelationship(withBaseTable baseFeaturesTableName: String!, andRelatedTable relatedFeaturesTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseFeaturesTableName
base features table name
relatedFeaturesTableName
related features table name
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a media relationship between the base table and user media related table. Creates a default user mapping table and the media table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addMediaRelationshipWithBaseTable:(NSString *)baseTableName andMediaTable:(GPKGMediaTable *)mediaTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addMediaRelationship(withBaseTable baseTableName: String!, andMediaTable mediaTable: GPKGMediaTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
mediaTable
user media table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a media relationship between the base table and user media related table. Creates the user mapping table and media table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addMediaRelationshipWithBaseTable:(NSString *)baseTableName andMediaTable:(GPKGMediaTable *)mediaTable andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addMediaRelationship(withBaseTable baseTableName: String!, andMediaTable mediaTable: GPKGMediaTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
mediaTable
user media table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a simple attributes relationship between the base table and user simple attributes related table. Creates a default user mapping table and the simple attributes table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addSimpleAttributesRelationshipWithBaseTable:(NSString *)baseTableName andSimpleAttributesTable: (GPKGSimpleAttributesTable *)simpleAttributesTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addSimpleAttributesRelationship(withBaseTable baseTableName: String!, andSimpleAttributesTable simpleAttributesTable: GPKGSimpleAttributesTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
simpleAttributesTable
user simple attributes table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a simple attributes relationship between the base table and user simple attributes related table. Creates the user mapping table and simple attributes table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addSimpleAttributesRelationshipWithBaseTable:(NSString *)baseTableName andSimpleAttributesTable: (GPKGSimpleAttributesTable *)simpleAttributesTable andUserMappingTable: (GPKGUserMappingTable *)userMappingTable;
Swift
func addSimpleAttributesRelationship(withBaseTable baseTableName: String!, andSimpleAttributesTable simpleAttributesTable: GPKGSimpleAttributesTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
simpleAttributesTable
user simple attributes table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds an attributes relationship between the base table and related attributes table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addAttributesRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable: (NSString *)relatedAttributesTableName andMappingTableName:(NSString *)mappingTableName;
Swift
func addAttributesRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedAttributesTableName: String!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedAttributesTableName
related attributes table name
mappingTableName
mapping table name
Return Value
The relationship that was added
-
Adds an attributes relationship between the base table and related attributes table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addAttributesRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable: (NSString *)relatedAttributesTableName andUserMappingTable: (GPKGUserMappingTable *)userMappingTable;
Swift
func addAttributesRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedAttributesTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedAttributesTableName
related attributes table name
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds an attributes relationship between the base table and user attributes related table. Creates a default user mapping table and the attributes table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addAttributesRelationshipWithBaseTable:(NSString *)baseTableName andAttributesTable: (GPKGAttributesTable *)attributesTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addAttributesRelationship(withBaseTable baseTableName: String!, andAttributesTable attributesTable: GPKGAttributesTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
attributesTable
user attributes table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds an attributes relationship between the base table and user attributes related table. Creates the user mapping table and an attributes table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addAttributesRelationshipWithBaseTable:(NSString *)baseTableName andAttributesTable: (GPKGAttributesTable *)attributesTable andUserMappingTable: (GPKGUserMappingTable *)userMappingTable;
Swift
func addAttributesRelationship(withBaseTable baseTableName: String!, andAttributesTable attributesTable: GPKGAttributesTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
attributesTable
user attributes table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a tiles relationship between the base table and related tiles table. Creates a default user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addTilesRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTilesTableName andMappingTableName:(NSString *)mappingTableName;
Swift
func addTilesRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTilesTableName: String!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTilesTableName
related tiles table name
mappingTableName
mapping table name
Return Value
The relationship that was added
-
Adds a tiles relationship between the base table and related tiles table. Creates the user mapping table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addTilesRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTilesTableName andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addTilesRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTilesTableName: String!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
relatedTilesTableName
related tiles table name
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Adds a tiles relationship between the base table and user tiles related table. Creates a default user mapping table and the tile table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addTilesRelationshipWithBaseTable:(NSString *)baseTableName andTileTable:(GPKGTileTable *)tileTable andMappingTableName:(NSString *)mappingTableName;
Swift
func addTilesRelationship(withBaseTable baseTableName: String!, andTileTable tileTable: GPKGTileTable!, andMappingTableName mappingTableName: String!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
tileTable
user tile table
mappingTableName
user mapping table name
Return Value
The relationship that was added
-
Adds a tiles relationship between the base table and user tiles related table. Creates the user mapping table and a tile table if needed.
Declaration
Objective-C
- (GPKGExtendedRelation *) addTilesRelationshipWithBaseTable:(NSString *)baseTableName andTileTable:(GPKGTileTable *)tileTable andUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func addTilesRelationship(withBaseTable baseTableName: String!, andTileTable tileTable: GPKGTileTable!, andUserMappingTable userMappingTable: GPKGUserMappingTable!) -> GPKGExtendedRelation!
Parameters
baseTableName
base table name
tileTable
user tile table
userMappingTable
user mapping table
Return Value
The relationship that was added
-
Create a default user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled.
Declaration
Objective-C
- (BOOL)createUserMappingTableWithName:(NSString *)mappingTableName;
Swift
func createUserMappingTable(withName mappingTableName: String!) -> Bool
Parameters
mappingTableName
user mapping table name
Return Value
true if table was created, false if the table already existed
-
Create a user mapping table and extension row if either does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled.
Declaration
Objective-C
- (BOOL)createUserMappingTable:(GPKGUserMappingTable *)userMappingTable;
Swift
func createUserMappingTable(_ userMappingTable: GPKGUserMappingTable!) -> Bool
Parameters
userMappingTable
user mapping table
Return Value
true if table was created, false if the table already existed
-
Create a user related table if it does not exist. When not created, there is no guarantee that an existing table has the same schema as the provided tabled.
Declaration
Objective-C
- (BOOL)createRelatedTable:(GPKGUserTable *)relatedTable;
Swift
func createRelatedTable(_ relatedTable: GPKGUserTable!) -> Bool
Parameters
relatedTable
user related table
Return Value
true if created, false if the table already existed
-
Remove a specific relationship from the GeoPackage
Declaration
Objective-C
- (void)removeRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andRelation:(enum GPKGRelationType)relationType;
Swift
func removeRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andRelation relationType: GPKGRelationType)
Parameters
baseTableName
base table name
relatedTableName
related table name
relationType
relation type
-
Remove a specific relationship from the GeoPackage
Declaration
Objective-C
- (void)removeRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andRelationAuthor:(NSString *)relationAuthor andRelationName:(NSString *)relationName;
Swift
func removeRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andRelationAuthor relationAuthor: String!, andRelationName relationName: String!)
Parameters
baseTableName
base table name
relatedTableName
related table name
relationAuthor
relation author
relationName
relation name
-
Remove a specific relationship from the GeoPackage
Declaration
Objective-C
- (void)removeRelationship:(GPKGExtendedRelation *)extendedRelation;
Swift
func removeRelationship(_ extendedRelation: GPKGExtendedRelation!)
Parameters
extendedRelation
extended relation
-
Remove a specific relationship from the GeoPackage
Declaration
Objective-C
- (void)removeRelationshipWithBaseTable:(NSString *)baseTableName andRelatedTable:(NSString *)relatedTableName andRelationName:(NSString *)relationName;
Swift
func removeRelationship(withBaseTable baseTableName: String!, andRelatedTable relatedTableName: String!, andRelationName relationName: String!)
Parameters
baseTableName
base table name
relatedTableName
related table name
relationName
relation name
-
Remove all relationships that include the table
Declaration
Objective-C
- (void)removeRelationshipsWithTable:(NSString *)table;
Swift
func removeRelationships(withTable table: String!)
Parameters
table
base or related table name
-
Remove all relationships with the mapping table
Declaration
Objective-C
- (void)removeRelationshipsWithMappingTable:(NSString *)mappingTable;
Swift
func removeRelationships(withMappingTable mappingTable: String!)
Parameters
mappingTable
mapping table
-
Remove all trace of the extension
Declaration
Objective-C
- (void)removeExtension;
Swift
func remove()
-
Determine if has one or more relations matching the base table and related table
Declaration
Objective-C
- (BOOL)hasRelationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable;
Swift
func hasRelations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!) -> Bool
Parameters
baseTable
base table name
relatedTable
related table name
Return Value
true if has relations
-
Get the relations to the base table and related table
Declaration
Objective-C
- (GPKGResultSet *)relationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable;
Swift
func relations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!) -> GPKGResultSet!
Parameters
baseTable
base table name
relatedTable
related table name
Return Value
extended relations
-
Determine if has one or more relations matching the non null provided values
Declaration
Objective-C
- (BOOL)hasRelationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable andMappingTable:(NSString *)mappingTable;
Swift
func hasRelations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!, andMappingTable mappingTable: String!) -> Bool
Parameters
baseTable
base table name
relatedTable
related table name
mappingTable
mapping table name
Return Value
true if has relations
-
Get the relations matching the non null provided values
Declaration
Objective-C
- (GPKGResultSet *)relationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable andMappingTable:(NSString *)mappingTable;
Swift
func relations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!, andMappingTable mappingTable: String!) -> GPKGResultSet!
Parameters
baseTable
base table name
relatedTable
related table name
mappingTable
mapping table name
Return Value
extended relations
-
Determine if has one or more relations matching the non null provided values
Declaration
Objective-C
- (BOOL)hasRelationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable andRelation:(NSString *)relation andMappingTable:(NSString *)mappingTable;
Swift
func hasRelations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!, andRelation relation: String!, andMappingTable mappingTable: String!) -> Bool
Parameters
baseTable
base table name
relatedTable
related table name
relation
relation name
mappingTable
mapping table name
Return Value
true if has relations
-
Get the relations matching the non null provided values
Declaration
Objective-C
- (GPKGResultSet *)relationsWithBaseTable:(NSString *)baseTable andRelatedTable:(NSString *)relatedTable andRelation:(NSString *)relation andMappingTable:(NSString *)mappingTable;
Swift
func relations(withBaseTable baseTable: String!, andRelatedTable relatedTable: String!, andRelation relation: String!, andMappingTable mappingTable: String!) -> GPKGResultSet!
Parameters
baseTable
base table name
relatedTable
related table name
relation
relation name
mappingTable
mapping table name
Return Value
extended relations
-
-hasRelationsWithBaseTable:
andBaseColumn: andRelatedTable: andRelatedColumn: andRelation: andMappingTable: Determine if has one or more relations matching the non null provided values
Declaration
Objective-C
- (BOOL)hasRelationsWithBaseTable:(NSString *)baseTable andBaseColumn:(NSString *)baseColumn andRelatedTable:(NSString *)relatedTable andRelatedColumn:(NSString *)relatedColumn andRelation:(NSString *)relation andMappingTable:(NSString *)mappingTable;
Swift
func hasRelations(withBaseTable baseTable: String!, andBaseColumn baseColumn: String!, andRelatedTable relatedTable: String!, andRelatedColumn relatedColumn: String!, andRelation relation: String!, andMappingTable mappingTable: String!) -> Bool
Parameters
baseTable
base table name
baseColumn
base primary column name
relatedTable
related table name
relatedColumn
related primary column name
relation
relation name
mappingTable
mapping table name
Return Value
true if has relations
-
Get the relations matching the non null provided values
Declaration
Objective-C
- (GPKGResultSet *)relationsWithBaseTable:(NSString *)baseTable andBaseColumn:(NSString *)baseColumn andRelatedTable:(NSString *)relatedTable andRelatedColumn:(NSString *)relatedColumn andRelation:(NSString *)relation andMappingTable:(NSString *)mappingTable;
Swift
func relations(withBaseTable baseTable: String!, andBaseColumn baseColumn: String!, andRelatedTable relatedTable: String!, andRelatedColumn relatedColumn: String!, andRelation relation: String!, andMappingTable mappingTable: String!) -> GPKGResultSet!
Parameters
baseTable
base table name
baseColumn
base primary column name
relatedTable
related table name
relatedColumn
related primary column name
relation
relation name
mappingTable
mapping table name
Return Value
extended relations
-
Build the custom relation name with author
Declaration
Objective-C
- (NSString *)buildRelationNameWithAuthor:(NSString *)author andName:(NSString *)name;
Swift
func buildRelationName(withAuthor author: String!, andName name: String!) -> String!
Parameters
author
relation author
name
base relation name
Return Value
custom relation name
-
Get the relations to the base table
Declaration
Objective-C
- (GPKGResultSet *)relationsToBaseTable:(NSString *)baseTable;
Swift
func relations(toBaseTable baseTable: String!) -> GPKGResultSet!
Parameters
baseTable
base table name
Return Value
extended relations
-
Determine if there are relations to the base table
Declaration
Objective-C
- (BOOL)hasRelationsToBaseTable:(NSString *)baseTable;
Swift
func hasRelations(toBaseTable baseTable: String!) -> Bool
Parameters
baseTable
base table name
Return Value
true if has extended relations
-
Get the relations to the related table
Declaration
Objective-C
- (GPKGResultSet *)relationsToRelatedTable:(NSString *)relatedTable;
Swift
func relations(toRelatedTable relatedTable: String!) -> GPKGResultSet!
Parameters
relatedTable
related table name
Return Value
extended relations
-
Determine if there are relations to the related table
Declaration
Objective-C
- (BOOL)hasRelationsToRelatedTable:(NSString *)relatedTable;
Swift
func hasRelations(toRelatedTable relatedTable: String!) -> Bool
Parameters
relatedTable
related table name
Return Value
true if has extended relations
-
Get the relations to the table
Declaration
Objective-C
- (GPKGResultSet *)relationsToTable:(NSString *)table;
Swift
func relations(toTable table: String!) -> GPKGResultSet!
Parameters
table
table name
Return Value
extended relations
-
Determine if there are relations to the table
Declaration
Objective-C
- (BOOL)hasRelationsToTable:(NSString *)table;
Swift
func hasRelations(toTable table: String!) -> Bool
Parameters
table
table name
Return Value
true if has extended relations
-
Get a User Custom DAO from a table name
Declaration
Objective-C
- (GPKGUserCustomDao *)userDaoForTableName:(NSString *)tableName;
Swift
func userDao(forTableName tableName: String!) -> GPKGUserCustomDao!
Parameters
tableName
table name
Return Value
user custom dao
-
Get a User Mapping DAO from an extended relation
Declaration
Objective-C
- (GPKGUserMappingDao *)mappingDaoForRelation: (GPKGExtendedRelation *)extendedRelation;
Swift
func mappingDao(for extendedRelation: GPKGExtendedRelation!) -> GPKGUserMappingDao!
Parameters
extendedRelation
extended relation
Return Value
user mapping dao
-
Get a User Mapping DAO from a table name
Declaration
Objective-C
- (GPKGUserMappingDao *)mappingDaoForTableName:(NSString *)tableName;
Swift
func mappingDao(forTableName tableName: String!) -> GPKGUserMappingDao!
Parameters
tableName
mapping table name
Return Value
user mapping dao
-
Get a related media table DAO
Declaration
Objective-C
- (GPKGMediaDao *)mediaDaoForTable:(GPKGMediaTable *)mediaTable;
Swift
func mediaDao(for mediaTable: GPKGMediaTable!) -> GPKGMediaDao!
Parameters
mediaTable
media table
Return Value
media DAO
-
Get a related media table DAO
Declaration
Objective-C
- (GPKGMediaDao *)mediaDaoForRelation:(GPKGExtendedRelation *)extendedRelation;
Swift
func mediaDao(for extendedRelation: GPKGExtendedRelation!) -> GPKGMediaDao!
Parameters
extendedRelation
extended relation
Return Value
media DAO
-
Get a related media table DAO
Declaration
Objective-C
- (GPKGMediaDao *)mediaDaoForTableName:(NSString *)tableName;
Swift
func mediaDao(forTableName tableName: String!) -> GPKGMediaDao!
Parameters
tableName
media table name
Return Value
media DAO
-
Get a related simple attributes table DAO
Declaration
Objective-C
- (GPKGSimpleAttributesDao *)simpleAttributesDaoForTable: (GPKGSimpleAttributesTable *)simpleAttributesTable;
Swift
func simpleAttributesDao(for simpleAttributesTable: GPKGSimpleAttributesTable!) -> GPKGSimpleAttributesDao!
Parameters
simpleAttributesTable
simple attributes table
Return Value
simple attributes DAO
-
Get a related simple attributes table DAO
Declaration
Objective-C
- (GPKGSimpleAttributesDao *)simpleAttributesDaoForRelation: (GPKGExtendedRelation *)extendedRelation;
Swift
func simpleAttributesDao(for extendedRelation: GPKGExtendedRelation!) -> GPKGSimpleAttributesDao!
Parameters
extendedRelation
extended relation
Return Value
simple attributes DAO
-
Get a related simple attributes table DAO
Declaration
Objective-C
- (GPKGSimpleAttributesDao *)simpleAttributesDaoForTableName: (NSString *)tableName;
Swift
func simpleAttributesDao(forTableName tableName: String!) -> GPKGSimpleAttributesDao!
Parameters
tableName
simple attributes table name
Return Value
simple attributes DAO
-
Get the related id mappings for the base id
Declaration
Objective-C
- (NSArray<NSNumber *> *)mappingsForRelation: (GPKGExtendedRelation *)extendedRelation withBaseId:(int)baseId;
Swift
func mappings(for extendedRelation: GPKGExtendedRelation!, withBaseId baseId: Int32) -> [NSNumber]!
Parameters
extendedRelation
extended relation
baseId
base id
Return Value
IDs representing the matching related IDs
-
Get the related id mappings for the base id
Declaration
Objective-C
- (NSArray<NSNumber *> *)mappingsForTableName:(NSString *)tableName withBaseId:(int)baseId;
Swift
func mappings(forTableName tableName: String!, withBaseId baseId: Int32) -> [NSNumber]!
Parameters
tableName
mapping table name
baseId
base id
Return Value
IDs representing the matching related IDs
-
Get the base id mappings for the related id
Declaration
Objective-C
- (NSArray<NSNumber *> *)mappingsForRelation: (GPKGExtendedRelation *)extendedRelation withRelatedId:(int)relatedId;
Swift
func mappings(for extendedRelation: GPKGExtendedRelation!, withRelatedId relatedId: Int32) -> [NSNumber]!
Parameters
extendedRelation
extended relation
relatedId
related id
Return Value
IDs representing the matching base IDs
-
Get the base id mappings for the related id
Declaration
Objective-C
- (NSArray<NSNumber *> *)mappingsForTableName:(NSString *)tableName withRelatedId:(int)relatedId;
Swift
func mappings(forTableName tableName: String!, withRelatedId relatedId: Int32) -> [NSNumber]!
Parameters
tableName
mapping table name
relatedId
related id
Return Value
IDs representing the matching base IDs
-
Determine if the base id and related id mapping exists
Declaration
Objective-C
- (BOOL)hasMappingWithTableName:(NSString *)tableName andBaseId:(int)baseId andRelatedId:(int)relatedId;
Swift
func hasMapping(withTableName tableName: String!, andBaseId baseId: Int32, andRelatedId relatedId: Int32) -> Bool
Parameters
tableName
mapping table name
baseId
base id
relatedId
related id
Return Value
true if mapping exists
-
Count the number of mappings to the base table and id
Declaration
Objective-C
- (int)countMappingsToBaseTable:(NSString *)baseTable andBaseId:(int)baseId;
Swift
func countMappings(toBaseTable baseTable: String!, andBaseId baseId: Int32) -> Int32
Parameters
baseTable
base table name
baseId
base id
Return Value
mappings count
-
Determine if a mapping to the base table and id exists
Declaration
Objective-C
- (BOOL)hasMappingToBaseTable:(NSString *)baseTable andBaseId:(int)baseId;
Swift
func hasMapping(toBaseTable baseTable: String!, andBaseId baseId: Int32) -> Bool
Parameters
baseTable
base table name
baseId
base id
Return Value
true if mapping exists
-
Count the number of mappings in the extended relations to the base id
Declaration
Objective-C
- (int)countMappingsInRelations:(GPKGResultSet *)extendedRelations toBaseId:(int)baseId;
Swift
func countMappings(inRelations extendedRelations: GPKGResultSet!, toBaseId baseId: Int32) -> Int32
Parameters
extendedRelations
extended relations
baseId
base id
Return Value
mappings count
-
Determine if a mapping in the extended relations to the base id exists
Declaration
Objective-C
- (BOOL)hasMappingInRelations:(GPKGResultSet *)extendedRelations toBaseId:(int)baseId;
Swift
func hasMapping(inRelations extendedRelations: GPKGResultSet!, toBaseId baseId: Int32) -> Bool
Parameters
extendedRelations
extended relations
baseId
base id
Return Value
true if mapping exists
-
Count the number of mappings in the extended relation to the base id
Declaration
Objective-C
- (int)countMappingsInRelation:(GPKGExtendedRelation *)extendedRelation toBaseId:(int)baseId;
Swift
func countMappings(in extendedRelation: GPKGExtendedRelation!, toBaseId baseId: Int32) -> Int32
Parameters
extendedRelation
extended relation
baseId
base id
Return Value
mappings count
-
Determine if a mapping in the extended relation to the base id exists
Declaration
Objective-C
- (BOOL)hasMappingInRelation:(GPKGExtendedRelation *)extendedRelation toBaseId:(int)baseId;
Swift
func hasMapping(in extendedRelation: GPKGExtendedRelation!, toBaseId baseId: Int32) -> Bool
Parameters
extendedRelation
extended relation
baseId
base id
Return Value
true if mapping exists
-
Delete mappings to the base table and id
Declaration
Objective-C
- (int)deleteMappingsToBaseTable:(NSString *)baseTable andBaseId:(int)baseId;
Swift
func deleteMappings(toBaseTable baseTable: String!, andBaseId baseId: Int32) -> Int32
Parameters
baseTable
base table name
baseId
base id
Return Value
rows deleted
-
Delete mappings in the extended relations to the base id
Declaration
Objective-C
- (int)deleteMappingsInRelations:(GPKGResultSet *)extendedRelations toBaseId:(int)baseId;
Swift
func deleteMappings(inRelations extendedRelations: GPKGResultSet!, toBaseId baseId: Int32) -> Int32
Parameters
extendedRelations
extended relations
baseId
base id
Return Value
rows deleted
-
Delete mappings in the extended relation to the base id
Declaration
Objective-C
- (int)deleteMappingsInRelation:(GPKGExtendedRelation *)extendedRelation toBaseId:(int)baseId;
Swift
func deleteMappings(in extendedRelation: GPKGExtendedRelation!, toBaseId baseId: Int32) -> Int32
Parameters
extendedRelation
extended relation
baseId
base id
Return Value
rows deleted
-
Count the number of mappings to the related table and id
Declaration
Objective-C
- (int)countMappingsToRelatedTable:(NSString *)relatedTable andRelatedId:(int)relatedId;
Swift
func countMappings(toRelatedTable relatedTable: String!, andRelatedId relatedId: Int32) -> Int32
Parameters
relatedTable
related table name
relatedId
related id
Return Value
mappings count
-
Determine if a mapping to the related table and id exists
Declaration
Objective-C
- (BOOL)hasMappingToRelatedTable:(NSString *)relatedTable andRelatedId:(int)relatedId;
Swift
func hasMapping(toRelatedTable relatedTable: String!, andRelatedId relatedId: Int32) -> Bool
Parameters
relatedTable
related table name
relatedId
related id
Return Value
true if mapping exists
-
Count the number of mappings in the extended relations to the related id
Declaration
Objective-C
- (int)countMappingsInRelations:(GPKGResultSet *)extendedRelations toRelatedId:(int)relatedId;
Swift
func countMappings(inRelations extendedRelations: GPKGResultSet!, toRelatedId relatedId: Int32) -> Int32
Parameters
extendedRelations
extended relations
relatedId
related id
Return Value
mappings count
-
Determine if a mapping in the extended relations to the related id exists
Declaration
Objective-C
- (BOOL)hasMappingInRelations:(GPKGResultSet *)extendedRelations toRelatedId:(int)relatedId;
Swift
func hasMapping(inRelations extendedRelations: GPKGResultSet!, toRelatedId relatedId: Int32) -> Bool
Parameters
extendedRelations
extended relations
relatedId
related id
Return Value
true if mapping exists
-
Count the number of mappings in the extended relation to the related id
Declaration
Objective-C
- (int)countMappingsInRelation:(GPKGExtendedRelation *)extendedRelation toRelatedId:(int)relatedId;
Swift
func countMappings(in extendedRelation: GPKGExtendedRelation!, toRelatedId relatedId: Int32) -> Int32
Parameters
extendedRelation
extended relation
relatedId
related id
Return Value
mappings count
-
Determine if a mapping in the extended relation to the related id exists
Declaration
Objective-C
- (BOOL)hasMappingInRelation:(GPKGExtendedRelation *)extendedRelation toRelatedId:(int)relatedId;
Swift
func hasMapping(in extendedRelation: GPKGExtendedRelation!, toRelatedId relatedId: Int32) -> Bool
Parameters
extendedRelation
extended relation
relatedId
related id
Return Value
true if mapping exists
-
Delete mappings to the related table and id
Declaration
Objective-C
- (int)deleteMappingsToRelatedTable:(NSString *)relatedTable andRelatedId:(int)relatedId;
Swift
func deleteMappings(toRelatedTable relatedTable: String!, andRelatedId relatedId: Int32) -> Int32
Parameters
relatedTable
related table name
relatedId
related id
Return Value
rows deleted
-
Delete mappings in the extended relations to the related id
Declaration
Objective-C
- (int)deleteMappingsInRelations:(GPKGResultSet *)extendedRelations toRelatedId:(int)relatedId;
Swift
func deleteMappings(inRelations extendedRelations: GPKGResultSet!, toRelatedId relatedId: Int32) -> Int32
Parameters
extendedRelations
extended relations
relatedId
related id
Return Value
rows deleted
-
Delete mappings in the extended relation to the related id
Declaration
Objective-C
- (int)deleteMappingsInRelation:(GPKGExtendedRelation *)extendedRelation toRelatedId:(int)relatedId;
Swift
func deleteMappings(in extendedRelation: GPKGExtendedRelation!, toRelatedId relatedId: Int32) -> Int32
Parameters
extendedRelation
extended relation
relatedId
related id
Return Value
rows deleted
-
Count the number of mappings to the table and id
Declaration
Objective-C
- (int)countMappingsToTable:(NSString *)table andId:(int)id;
Swift
func countMappings(toTable table: String!, andId id: Int32) -> Int32
Parameters
table
table name
id
table id
Return Value
mappings count
-
Determine if a mapping to the table and id exists
Declaration
Objective-C
- (BOOL)hasMappingToTable:(NSString *)table andId:(int)id;
Swift
func hasMapping(toTable table: String!, andId id: Int32) -> Bool
Parameters
table
table name
id
table id
Return Value
true if mapping exists
-
Delete mappings to the table and id
Declaration
Objective-C
- (int)deleteMappingsToTable:(NSString *)table andId:(int)id;
Swift
func deleteMappings(toTable table: String!, andId id: Int32) -> Int32
Parameters
table
table name
id
table id
Return Value
rows deleted