GPKGConstraint
Objective-C
@interface GPKGConstraint : NSObject <NSMutableCopying>
Swift
class GPKGConstraint : NSObject, NSMutableCopying
Table or column constraint
-
Optional constraint name
Declaration
Objective-C
@property (nonatomic, strong) NSString *name;
Swift
var name: String! { get set }
-
Constraint type
Declaration
Objective-C
@property (nonatomic) enum GPKGConstraintType type;
Swift
var type: GPKGConstraintType { get set }
-
Optional order
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *order;
Swift
var order: NSNumber! { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithType:(enum GPKGConstraintType)type;
Swift
init!(type: GPKGConstraintType)
Parameters
type
constraint type
-
Initialize
Declaration
Objective-C
- (instancetype)initWithType:(enum GPKGConstraintType)type andName:(NSString *)name;
Swift
init!(type: GPKGConstraintType, andName name: String!)
Parameters
type
constraint type
name
constraint name
-
Initialize
Declaration
Objective-C
- (instancetype)initWithType:(enum GPKGConstraintType)type andOrder:(NSNumber *)order;
Swift
init!(type: GPKGConstraintType, andOrder order: NSNumber!)
Parameters
type
constraint type
order
constraint order
-
Initialize
Declaration
Objective-C
- (instancetype)initWithType:(enum GPKGConstraintType)type andName:(NSString *)name andOrder:(NSNumber *)order;
Swift
init!(type: GPKGConstraintType, andName name: String!, andOrder order: NSNumber!)
Parameters
type
constraint type
name
constraint name
order
constraint order
-
Build the name SQL
Declaration
Objective-C
- (NSString *)buildNameSql;
Swift
func buildNameSql() -> String!
Return Value
name SQL
-
Build the constraint SQL
Declaration
Objective-C
- (NSString *)buildSql;
Swift
func buildSql() -> String!
Return Value
sql constraint
-
Get the order for maintaining sorted constraints
Declaration
Objective-C
- (int)sortOrder;
Swift
func sortOrder() -> Int32
Return Value
sort order