GPKGConstraints
Objective-C
@interface GPKGConstraints : NSObject <NSMutableCopying>
Swift
class GPKGConstraints : NSObject, NSMutableCopying
User table or column constraints
-
Initialize
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new constraints
-
Initialize
Declaration
Objective-C
- (instancetype)initWithConstraints:(GPKGConstraints *)constraints;
Swift
init!(constraints: GPKGConstraints!)
Parameters
constraints
constraints
Return Value
new constraints
-
Add constraint
Declaration
Objective-C
- (void)add:(GPKGConstraint *)constraint;
Swift
func add(_ constraint: GPKGConstraint!)
Parameters
constraint
constraint
-
Add constraints
Declaration
Objective-C
- (void)addArray:(NSArray<GPKGConstraint *> *)constraints;
Swift
func add(_ constraints: [GPKGConstraint]!)
Parameters
constraints
constraints
-
Add constraints
Declaration
Objective-C
- (void)addConstraints:(GPKGConstraints *)constraints;
Swift
func add(_ constraints: GPKGConstraints!)
Parameters
constraints
constraints
-
Check if has constraints
Declaration
Objective-C
- (BOOL)has;
Swift
func has() -> Bool
Return Value
true if has constraints
-
Check if has constraints of the provided type
Declaration
Objective-C
- (BOOL)hasType:(enum GPKGConstraintType)type;
Swift
func hasType(_ type: GPKGConstraintType) -> Bool
Parameters
type
constraint type
Return Value
true if has constraints
-
Get the number of constraints
Declaration
Objective-C
- (int)size;
Swift
func size() -> Int32
Return Value
size
-
Get the number of constraints of the provided type
Declaration
Objective-C
- (int)sizeOfType:(enum GPKGConstraintType)type;
Swift
func size(of type: GPKGConstraintType) -> Int32
Parameters
type
constraint type
Return Value
size
-
Get the constraints
Return Value
constraints
-
Get the constraint at the index
Declaration
Objective-C
- (GPKGConstraint *)atIndex:(int)index;
Swift
func atIndex(_ index: Int32) -> GPKGConstraint!
Parameters
index
constraint index
Return Value
constraint
-
Get the constraints of the provided type
Declaration
Objective-C
- (NSArray<GPKGConstraint *> *)ofType:(enum GPKGConstraintType)type;
Swift
func ofType(_ type: GPKGConstraintType) -> [GPKGConstraint]!
Parameters
type
constraint type
Return Value
constraints
-
Clear the constraints
Declaration
Objective-C
- (NSArray<GPKGConstraint *> *)clear;
Swift
func clear() -> [GPKGConstraint]!
Return Value
cleared constraints
-
Clear the constraints of the provided type
Declaration
Objective-C
- (NSArray<GPKGConstraint *> *)clearType:(enum GPKGConstraintType)type;
Swift
func clear(_ type: GPKGConstraintType) -> [GPKGConstraint]!
Parameters
type
constraint type
Return Value
cleared constraints