GPKGTableInfo
Objective-C
@interface GPKGTableInfo : NSObject
Swift
class GPKGTableInfo : NSObject
Table Info queries (table_info)
-
Get the table name
Declaration
Objective-C
- (NSString *)tableName;Swift
func tableName() -> String!Return Value
table name
-
Number of columns
Declaration
Objective-C
- (int)numColumns;Swift
func numColumns() -> Int32Return Value
column count
-
Get the columns
Declaration
Objective-C
- (NSArray<GPKGTableColumn *> *)columns;Swift
func columns() -> [GPKGTableColumn]!Return Value
columns
-
Get the column at the index
Declaration
Objective-C
- (GPKGTableColumn *)columnAtIndex:(int)index;Swift
func column(at index: Int32) -> GPKGTableColumn!Parameters
indexcolumn index
Return Value
column
-
Check if the table has the column
Declaration
Objective-C
- (BOOL)hasColumn:(NSString *)name;Swift
func hasColumn(_ name: String!) -> BoolParameters
namecolumn name
Return Value
true if has column
-
Get the column with the name
Declaration
Objective-C
- (GPKGTableColumn *)column:(NSString *)name;Swift
func column(_ name: String!) -> GPKGTableColumn!Parameters
namecolumn name
Return Value
column or null if does not exist
-
Check if the table has one or more primary keys
Declaration
Objective-C
- (BOOL)hasPrimaryKey;Swift
func hasPrimaryKey() -> BoolReturn Value
true if has at least one primary key
-
Get the primary key columns
Declaration
Objective-C
- (NSArray<GPKGTableColumn *> *)primaryKeys;Swift
func primaryKeys() -> [GPKGTableColumn]!Return Value
primary key columns
-
Get the single or first primary key if one exists
Declaration
Objective-C
- (GPKGTableColumn *)primaryKey;Swift
func primaryKey() -> GPKGTableColumn!Return Value
single or first primary key, null if no primary key
-
Query for the table_info of the table name
Declaration
Objective-C
+ (GPKGTableInfo *)infoWithConnection:(GPKGConnection *)db andTable:(NSString *)tableName;Swift
/*not inherited*/ init!(connection db: GPKGConnection!, andTable tableName: String!)Parameters
dbconnection
tableNametable name
Return Value
table info or null if no table
-
Get the data type from the type value
Declaration
Objective-C
+ (enum GPKGDataType)dataType:(NSString *)type;Swift
class func dataType(_ type: String!) -> GPKGDataTypeParameters
typetype value
Return Value
data type or null
-
Get the default object value for the string default value and type
Declaration
Objective-C
+ (NSObject *)defaultValue:(NSString *)defaultValue withType:(NSString *)type;Swift
class func defaultValue(_ defaultValue: String!, withType type: String!) -> NSObject!Parameters
defaultValuedefault value
typetype
Return Value
default value
-
Get the default object value for the string default value with the data type
Declaration
Objective-C
+ (NSObject *)defaultValue:(NSString *)defaultValue withDataType:(enum GPKGDataType)type;Swift
class func defaultValue(_ defaultValue: String!, with type: GPKGDataType) -> NSObject!Parameters
defaultValuedefault value
typedata type
Return Value
default value
View on GitHub
GPKGTableInfo Class Reference