8
8
9
9
#import " LKDBUtils.h"
10
10
11
- @interface NSObject (TableMapping)
11
+ @interface NSObject (TableMapping)
12
12
13
13
/* *
14
14
* @brief Overwrite in your models if your property names don't match your Table Column names.
17
17
@{ sql column name : ( model property name ) or LKDBInherit or LKDBUserCalculate}
18
18
19
19
*/
20
- +(NSDictionary *)getTableMapping ;
20
+ + (NSDictionary *)getTableMapping ;
21
21
22
22
/* **
23
23
simple set a column as "LKSQL_Mapping_UserCalculate"
24
24
column name
25
25
*/
26
- +(void )setUserCalculateForCN : (NSString *)columnName ;
26
+ + (void )setUserCalculateForCN : (NSString *)columnName ;
27
27
28
28
// /property type name
29
- +(void )setUserCalculateForPTN : (NSString *)propertyTypeName ;
29
+ + (void )setUserCalculateForPTN : (NSString *)propertyTypeName ;
30
30
31
31
// /binding columnName to PropertyName
32
- +(void )setTableColumnName : (NSString *)columnName bindingPropertyName : (NSString *)propertyName ;
32
+ + (void )setTableColumnName : (NSString *)columnName bindingPropertyName : (NSString *)propertyName ;
33
33
34
34
// /remove unwanted binding property
35
- +(void )removePropertyWithColumnName : (NSString *)columnName ;
36
- +(void )removePropertyWithColumnNameArray : (NSArray *)columnNameArray ;
35
+ + (void )removePropertyWithColumnName : (NSString *)columnName ;
36
+ + (void )removePropertyWithColumnNameArray : (NSArray *)columnNameArray ;
37
37
@end
38
38
39
39
@interface LKDBProperty : NSObject
40
40
41
41
// /保存的方式
42
- @property (readonly ,copy ,nonatomic )NSString * type;
42
+ @property (readonly , copy , nonatomic ) NSString * type;
43
43
44
44
// /保存到数据的 列名
45
- @property (readonly ,copy ,nonatomic )NSString * sqlColumnName;
45
+ @property (readonly , copy , nonatomic ) NSString * sqlColumnName;
46
46
// /保存到数据的类型
47
- @property (readonly ,copy ,nonatomic )NSString * sqlColumnType;
47
+ @property (readonly , copy , nonatomic ) NSString * sqlColumnType;
48
48
49
49
// /属性名
50
- @property (readonly ,copy ,nonatomic )NSString * propertyName;
50
+ @property (readonly , copy , nonatomic ) NSString * propertyName;
51
51
// /属性的类型
52
- @property (readonly ,copy ,nonatomic )NSString * propertyType;
52
+ @property (readonly , copy , nonatomic ) NSString * propertyType;
53
53
54
54
// /属性的Protocol
55
55
// @property(readonly,copy,nonatomic)NSString* propertyProtocol;
56
56
57
-
58
57
// /creating table's column
59
58
@property BOOL isUnique;
60
59
@property BOOL isNotNull;
61
- @property (copy ,nonatomic ) NSString * defaultValue;
62
- @property (copy ,nonatomic ) NSString * checkValue;
60
+ @property (copy , nonatomic ) NSString * defaultValue;
61
+ @property (copy , nonatomic ) NSString * checkValue;
63
62
@property NSInteger length;
64
63
65
- -(BOOL )isUserCalculate ;
64
+ - (BOOL )isUserCalculate ;
66
65
@end
67
66
68
-
69
67
@interface LKModelInfos : NSObject
70
68
71
- -(id )initWithKeyMapping : (NSDictionary *)keyMapping propertyNames : (NSArray *)propertyNames propertyType : (NSArray *)propertyType primaryKeys : (NSArray *)primaryKeys ;
69
+ - (id )initWithKeyMapping : (NSDictionary *)keyMapping propertyNames : (NSArray *)propertyNames propertyType : (NSArray *)propertyType primaryKeys : (NSArray *)primaryKeys ;
72
70
73
- @property (readonly ,nonatomic )NSUInteger count;
74
- @property (readonly ,nonatomic )NSArray * primaryKeys;
71
+ @property (readonly , nonatomic ) NSUInteger count;
72
+ @property (readonly , nonatomic ) NSArray * primaryKeys;
75
73
76
- -(LKDBProperty*)objectWithIndex : (NSInteger )index ;
77
- -(LKDBProperty*)objectWithPropertyName : (NSString *)propertyName ;
78
- -(LKDBProperty*)objectWithSqlColumnName : (NSString *)columnName ;
74
+ - (LKDBProperty*)objectWithIndex : (NSInteger )index ;
75
+ - (LKDBProperty*)objectWithPropertyName : (NSString *)propertyName ;
76
+ - (LKDBProperty*)objectWithSqlColumnName : (NSString *)columnName ;
79
77
80
78
@end
0 commit comments