GPKGTableConstraints
Objective-C
@interface GPKGTableConstraints : NSObject
Swift
class GPKGTableConstraints : NSObject
Table Constraints including column constraint
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Add a table constraint
Declaration
Objective-C
- (void)addTableConstraint:(GPKGConstraint *)constraint;
Swift
func addTableConstraint(_ constraint: GPKGConstraint!)
Parameters
constraint
constraint
-
Add table constraints
Declaration
Objective-C
- (void)addTableConstraints:(GPKGConstraints *)constraints;
Swift
func addTableConstraints(_ constraints: GPKGConstraints!)
Parameters
constraints
constraints
-
Get the table constraints
Declaration
Objective-C
- (GPKGConstraints *)tableConstraints;
Swift
func tableConstraints() -> GPKGConstraints!
Return Value
table constraints
-
Get the table constraint at the index
Declaration
Objective-C
- (GPKGConstraint *)tableConstraintAtIndex:(int)index;
Swift
func tableConstraint(at index: Int32) -> GPKGConstraint!
Parameters
index
constraint index
Return Value
table constraint
-
Get the number of table constraints
Declaration
Objective-C
- (int)numTableConstraints;
Swift
func numTableConstraints() -> Int32
Return Value
table constraints count
-
Add a column constraint
Declaration
Objective-C
- (void)addColumnConstraint:(GPKGConstraint *)constraint forColumn:(NSString *)columnName;
Swift
func addColumnConstraint(_ constraint: GPKGConstraint!, forColumn columnName: String!)
Parameters
columnName
column name
constraint
constraint
-
Add column constraints
Declaration
Objective-C
- (void)addColumnConstraintsInArray:(NSArray<GPKGConstraint *> *)constraints forColumn:(NSString *)columnName;
Swift
func addColumnConstraints(in constraints: [GPKGConstraint]!, forColumn columnName: String!)
Parameters
columnName
column name
constraints
constraints
-
Add column constraints
Declaration
Objective-C
- (void)addColumnConstraints:(GPKGColumnConstraints *)constraints;
Swift
func addColumnConstraints(_ constraints: GPKGColumnConstraints!)
Parameters
constraints
constraints
-
Add column constraints
Declaration
Objective-C
- (void)addColumnConstraintsInDictionary: (NSDictionary<NSString *, GPKGColumnConstraints *> *)constraints;
Swift
func addColumnConstraints(in constraints: [String : GPKGColumnConstraints]!)
Parameters
constraints
column constraints
-
Add column constraints
Declaration
Objective-C
- (void)addColumnConstraintsInArray: (NSArray<GPKGColumnConstraints *> *)constraints;
Swift
func addColumnConstraints(in constraints: [GPKGColumnConstraints]!)
Parameters
constraints
column constraints
-
Get the column constraints
Declaration
Objective-C
- (NSDictionary<NSString *, GPKGColumnConstraints *> *)columnConstraints;
Swift
func columnConstraints() -> [String : GPKGColumnConstraints]!
Return Value
column constraints
-
Get the column names with constraints
Declaration
Objective-C
- (NSArray<NSString *> *)columnsWithConstraints;
Swift
func columnsWithConstraints() -> [String]!
Return Value
column names
-
Get the column constraints
Declaration
Objective-C
- (GPKGColumnConstraints *)columnConstraintsForColumn:(NSString *)columnName;
Swift
func columnConstraints(forColumn columnName: String!) -> GPKGColumnConstraints!
Parameters
columnName
column name
Return Value
constraints
-
Get the column constraint at the index
Declaration
Objective-C
- (GPKGConstraint *)columnConstraintForColumn:(NSString *)columnName atIndex:(int)index;
Swift
func columnConstraint(forColumn columnName: String!, at index: Int32) -> GPKGConstraint!
Parameters
columnName
column name
index
constraint index
Return Value
column constraint
-
Get the number of column constraints for the column name
Declaration
Objective-C
- (int)numConstraintsForColumn:(NSString *)columnName;
Swift
func numConstraints(forColumn columnName: String!) -> Int32
Parameters
columnName
column name
Return Value
column constraints count
-
Add table constraints
Declaration
Objective-C
- (void)addConstraints:(GPKGTableConstraints *)constraints;
Swift
func add(_ constraints: GPKGTableConstraints!)
Parameters
constraints
table constraints
-
Check if there are constraints
Declaration
Objective-C
- (BOOL)hasConstraints;
Swift
func hasConstraints() -> Bool
Return Value
true if has constraints
-
Check if there are table constraints
Declaration
Objective-C
- (BOOL)hasTableConstraints;
Swift
func hasTableConstraints() -> Bool
Return Value
true if has table constraints
-
Check if there are column constraints
Declaration
Objective-C
- (BOOL)hasColumnConstraints;
Swift
func hasColumnConstraints() -> Bool
Return Value
true if has column constraints
-
Check if there are column constraints for the column name
Declaration
Objective-C
- (BOOL)hasConstraintsForColumn:(NSString *)columnName;
Swift
func hasConstraints(forColumn columnName: String!) -> Bool
Parameters
columnName
column name
Return Value
true if has column constraints