GPKGTableMapping

Objective-C

@interface GPKGTableMapping : NSObject

Swift

class GPKGTableMapping : NSObject

Mapping between column names being mapped to and the mapped column information

  • From table name

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *fromTable;

    Swift

    var fromTable: String! { get set }
  • To table name

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *toTable;

    Swift

    var toTable: String! { get set }
  • Transfer row content to new table

    Declaration

    Objective-C

    @property (nonatomic) BOOL transferContent;

    Swift

    var transferContent: Bool { get set }
  • Custom where clause (in addition to column where mappings)

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *where;

    Swift

    var `where`: String! { get set }
  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTableName:(NSString *)tableName
                           andColumns:(NSArray<GPKGUserColumn *> *)columns;

    Swift

    init!(tableName: String!, andColumns columns: [GPKGUserColumn]!)

    Parameters

    tableName

    table name

    columns

    user columns

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTable:(GPKGUserTable *)table;

    Swift

    init!(table: GPKGUserTable!)

    Parameters

    table

    user table

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTable:(GPKGUserTable *)table
                andDroppedColumns:(NSArray<NSString *> *)droppedColumnNames;

    Swift

    init!(table: GPKGUserTable!, andDroppedColumns droppedColumnNames: [String]!)

    Parameters

    table

    user table

    droppedColumnNames

    dropped column names

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTable:(GPKGUserTable *)table
                      andNewTable:(NSString *)newTableName;

    Swift

    init!(table: GPKGUserTable!, andNewTable newTableName: String!)

    Parameters

    table

    user table

    newTableName

    new table name

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTableInfo:(GPKGTableInfo *)tableInfo;

    Swift

    init!(tableInfo: GPKGTableInfo!)

    Parameters

    tableInfo

    table info

    Return Value

    new table mapping

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithTableName:(NSString *)tableName
                        andConnection:(GPKGConnection *)db;

    Swift

    init!(tableName: String!, andConnection db: GPKGConnection!)

    Parameters

    tableName

    table name

    db

    connection

    Return Value

    new table mapping

  • Check if the table mapping is to a new table

    Declaration

    Objective-C

    - (BOOL)isNewTable;

    Swift

    func isNewTable() -> Bool

    Return Value

    true if a new table

  • Add a column

    Declaration

    Objective-C

    - (void)addColumn:(GPKGMappedColumn *)column;

    Swift

    func add(_ column: GPKGMappedColumn!)

    Parameters

    column

    mapped column

  • Add a column

    Declaration

    Objective-C

    - (void)addColumnName:(NSString *)columnName;

    Swift

    func addColumnName(_ columnName: String!)

    Parameters

    columnName

    column name

  • Remove a column

    Declaration

    Objective-C

    - (GPKGMappedColumn *)removeColumn:(NSString *)columnName;

    Swift

    func removeColumn(_ columnName: String!) -> GPKGMappedColumn!

    Parameters

    columnName

    column name

    Return Value

    removed mapped column or null

  • Get the column names

    Declaration

    Objective-C

    - (NSArray<NSString *> *)columnNames;

    Swift

    func columnNames() -> [String]!

    Return Value

    column names

  • Get the mapped column values

    Declaration

    Objective-C

    - (NSArray<GPKGMappedColumn *> *)mappedColumns;

    Swift

    func mappedColumns() -> [GPKGMappedColumn]!

    Return Value

    columns

  • Get the mapped column for the column name

    Declaration

    Objective-C

    - (GPKGMappedColumn *)columnForName:(NSString *)columnName;

    Swift

    func column(forName columnName: String!) -> GPKGMappedColumn!

    Parameters

    columnName

    column name

    Return Value

    mapped column

  • Add a dropped column

    Declaration

    Objective-C

    - (void)addDroppedColumn:(NSString *)columnName;

    Swift

    func addDroppedColumn(_ columnName: String!)

    Parameters

    columnName

    column name

  • Remove a dropped column

    Declaration

    Objective-C

    - (BOOL)removeDroppedColumn:(NSString *)columnName;

    Swift

    func removeDroppedColumn(_ columnName: String!) -> Bool

    Parameters

    columnName

    column name

    Return Value

    true if removed

  • Get a set of dropped columns

    Declaration

    Objective-C

    - (NSSet<NSString *> *)droppedColumns;

    Swift

    func droppedColumns() -> Set<String>!

    Return Value

    dropped columns

  • Check if the column name is a dropped column

    Declaration

    Objective-C

    - (BOOL)isDroppedColumn:(NSString *)columnName;

    Swift

    func isDroppedColumn(_ columnName: String!) -> Bool

    Parameters

    columnName

    column name

    Return Value

    true if a dropped column

  • Check if there is a custom where clause

    Declaration

    Objective-C

    - (BOOL)hasWhere;

    Swift

    func hasWhere() -> Bool

    Return Value

    true if where clause