GPKGExtendedRelationsDao

Objective-C

@interface GPKGExtendedRelationsDao : GPKGBaseDao

Swift

class GPKGExtendedRelationsDao : GPKGBaseDao

Extended Relations Data Access Object

  • Create the DAO

    Declaration

    Objective-C

    + (GPKGExtendedRelationsDao *)createWithDatabase:(GPKGConnection *)database;

    Swift

    class func create(withDatabase database: GPKGConnection!) -> GPKGExtendedRelationsDao!

    Parameters

    database

    database connection

    Return Value

    dao

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithDatabase:(GPKGConnection *)database;

    Swift

    init!(database: GPKGConnection!)

    Parameters

    database

    database connection

    Return Value

    new tile scaling dao

  • Get the extended relation for the current result in the result set

    Declaration

    Objective-C

    - (GPKGExtendedRelation *)relation:(GPKGResultSet *)results;

    Swift

    func relation(_ results: GPKGResultSet!) -> GPKGExtendedRelation!

    Parameters

    results

    result set

    Return Value

    extended relation

  • Get the first extended relation in the result set and close it

    Declaration

    Objective-C

    - (GPKGExtendedRelation *)firstRelation:(GPKGResultSet *)results;

    Swift

    func firstRelation(_ results: GPKGResultSet!) -> GPKGExtendedRelation!

    Parameters

    results

    result set

    Return Value

    first extended relation

  • Get all the base table names

    Declaration

    Objective-C

    - (NSArray<NSString *> *)baseTables;

    Swift

    func baseTables() -> [String]!

    Return Value

    base table names

  • Get all the related table names

    Declaration

    Objective-C

    - (NSArray<NSString *> *)relatedTables;

    Swift

    func relatedTables() -> [String]!

    Return Value

    related table names

  • 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

    Return Value

    extended relations results

  • 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

    Return Value

    extended relations results

  • Get the relations to the table, both base table and related table

    Declaration

    Objective-C

    - (GPKGResultSet *)relationsToTable:(NSString *)table;

    Swift

    func relations(toTable table: String!) -> GPKGResultSet!

    Parameters

    table

    table name

    Return Value

    extended relations results

  • 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 results