GPKGMetadataReferenceDao

Objective-C

@interface GPKGMetadataReferenceDao : GPKGBaseDao

Swift

class GPKGMetadataReferenceDao : GPKGBaseDao

Metadata Reference Data Access Object

  • Create the DAO

    Declaration

    Objective-C

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

    Swift

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

    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 metadata reference dao

  • Delete metadata references with foreign keys to the metadata file id

    Declaration

    Objective-C

    - (int)deleteByMetadata:(NSNumber *)fileId;

    Swift

    func delete(byMetadata fileId: NSNumber!) -> Int32

    Parameters

    fileId

    file id

    Return Value

    rows deleted

  • Remove metadata references (by updating the field to null) with foreign keys to the metadata parent id

    Declaration

    Objective-C

    - (int)removeMetadataParent:(NSNumber *)parentId;

    Swift

    func removeMetadataParent(_ parentId: NSNumber!) -> Int32

    Parameters

    parentId

    parent id

    Return Value

    rows updated

  • Query by the metadata ids

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByMetadata:(NSNumber *)fileId
                             andParent:(NSNumber *)parentId;

    Swift

    func query(byMetadata fileId: NSNumber!, andParent parentId: NSNumber!) -> GPKGResultSet!

    Parameters

    fileId

    file id

    parentId

    parent id

    Return Value

    result set

  • Query by the metadata ids

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByMetadata:(NSNumber *)fileId;

    Swift

    func query(byMetadata fileId: NSNumber!) -> GPKGResultSet!

    Parameters

    fileId

    file id

    Return Value

    result set

  • Query by the metadata parent ids

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByMetadataParent:(NSNumber *)parentId;

    Swift

    func query(byMetadataParent parentId: NSNumber!) -> GPKGResultSet!

    Parameters

    parentId

    parent id

    Return Value

    result set

  • Query by table name

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByTable:(NSString *)tableName;

    Swift

    func query(byTable tableName: String!) -> GPKGResultSet!

    Parameters

    tableName

    table name

    Return Value

    result set

  • Delete by table name

    Declaration

    Objective-C

    - (int)deleteByTableName:(NSString *)tableName;

    Swift

    func delete(byTableName tableName: String!) -> Int32

    Parameters

    tableName

    table name

    Return Value

    rows deleted