DatabaseKit
0.5
|
#import <DBModel.h>
Instance Methods | |
(DBWriteQuery *) | - saveQueryForKey: |
(DBQuery *) | - query |
Class Methods | |
(NSSet *) | + savedKeys |
(NSSet *) | + excludedKeys |
(NSArray *) | + indices |
(NSArray *) | + constraintsForKey: |
(NSString *) | + tableName |
Properties | |
DB * | database |
NSUUID * | UUID |
BOOL | saved |
BOOL | hasChanges |
An abstract base class for objects that should model a table.
Any keys not excluded by +excludedKeys
will be saved to the table if a column with the same name is present.
+ (NSArray *) constraintsForKey: | (NSString *) | key |
+ (NSSet *) excludedKeys |
+ (NSArray *) indices |
- (DBQuery *) query |
+ (NSSet *) savedKeys |
Returns the set of keys that should be saved to a database
Definition at line 51 of file DBModel.m.
References DBIteratePropertiesForClass(), excludedKeys, key, and savedKeys.
Referenced by savedKeys.
- (DBWriteQuery *) saveQueryForKey: | (NSString *) | key |
Returns a query to use to save a given key to the database. To override query generation for a key you should implement a method named like -saveQueryForMyKey
Remember to handle both the insert and update cases.
Definition at line 222 of file DBModel.m.
References DBAttributesForProperty(), and key.
+ (NSString *) tableName |