GPKGTableCreator
Objective-C
@interface GPKGTableCreator : NSObject
Swift
class GPKGTableCreator : NSObject
Executes database scripts to create tables
-
Database connection
Declaration
Objective-C
@property (nonatomic) GPKGConnection *db;
Swift
var db: GPKGConnection! { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithDatabase:(GPKGConnection *)db;
Swift
init!(database db: GPKGConnection!)
Parameters
db
database connection
Return Value
new table creator
-
Get the table creator properties name
Declaration
Objective-C
- (NSString *)properties;
Swift
func properties() -> String!
Return Value
properties name or nil for base
-
Create the table
Declaration
Objective-C
- (int)createTable:(NSString *)tableName;
Swift
func createTable(_ tableName: String!) -> Int32
Parameters
tableName
table name
Return Value
SQL statements executed
-
Create the table
Declaration
Objective-C
- (int)createTable:(NSString *)tableName fromProperties:(NSString *)properties;
Swift
func createTable(_ tableName: String!, fromProperties properties: String!) -> Int32
Parameters
tableName
table name
properties
properties name
Return Value
SQL statements executed
-
Execute the SQL statement for the property name
Declaration
Objective-C
- (int)execSQLForProperty:(NSString *)propertyName;
Swift
func execSQL(forProperty propertyName: String!) -> Int32
Parameters
propertyName
property name
Return Value
SQL statements executed
-
Execute the SQL statement for the property name
Declaration
Objective-C
- (int)execSQLForProperty:(NSString *)propertyName fromProperties:(NSString *)properties;
Swift
func execSQL(forProperty propertyName: String!, fromProperties properties: String!) -> Int32
Parameters
propertyName
property name
properties
properties name
Return Value
SQL statements executed
-
Execute the SQL statements
Declaration
Objective-C
- (void)execSQLStatements:(NSArray *)statements;
Swift
func execSQLStatements(_ statements: [Any]!)
Parameters
statements
SQL statements
-
Read the SQL statements for the property name
Declaration
Objective-C
+ (NSArray<NSString *> *)readProperty:(NSString *)propertyName;
Swift
class func readProperty(_ propertyName: String!) -> [String]!
Parameters
propertyName
property name
Return Value
statements
-
Read the SQL statements for the property name from the properties
Declaration
Objective-C
+ (NSArray<NSString *> *)readProperty:(NSString *)propertyName fromProperties:(NSString *)properties;
Swift
class func readProperty(_ propertyName: String!, fromProperties properties: String!) -> [String]!
Parameters
propertyName
property name
properties
properties name
Return Value
statements
-
Read the SQL statements for the property name from the properties file
Declaration
Objective-C
+ (NSArray<NSString *> *)readProperty:(NSString *)propertyName fromFile:(NSString *)propertiesFile;
Swift
class func readProperty(_ propertyName: String!, fromFile propertiesFile: String!) -> [String]!
Parameters
propertyName
property name
propertiesFile
properties file
Return Value
statements