Permalink
Browse files

Change setValue to putValue

  • Loading branch information...
1 parent 0bfb684 commit cd46b284c44f782558fe2a89094007e913dbabd6 @hoisie committed Sep 27, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 Classes/LevelDB.h
  2. +1 −1 Classes/LevelDB.mm
  3. +2 −2 LevelDB/RootViewController.mm
View
@@ -27,7 +27,7 @@ typedef BOOL (^KeyValueBlock)(NSString *key, id value);
- (id) initWithPath:(NSString *)path;
-- (void) setObject:(id)value forKey:(NSString *)key;
+- (void) putObject:(id)value forKey:(NSString *)key;
- (id) getObject:(NSString *)key;
- (NSString *) getString:(NSString *)key;
View
@@ -79,7 +79,7 @@ + (LevelDB *)databaseInLibraryWithName:(NSString *)name {
return ldb;
}
-- (void) setObject:(id)value forKey:(NSString *)key {
+- (void) putObject:(id)value forKey:(NSString *)key {
Slice k = SliceFromString(key);
Slice v = SliceFromObject(value);
Status status = db->Put(writeOptions, k, v);
@@ -17,11 +17,11 @@ - (void)viewDidLoad
LevelDB *ldb = [LevelDB databaseInLibraryWithName:@"test.ldb"];
//test string
- [ldb setObject:@"laval" forKey:@"string_test"];
+ [ldb putObject:@"laval" forKey:@"string_test"];
NSLog(@"String Value: %@", [ldb getString:@"string_test"]);
//test dictionary
- [ldb setObject:[NSDictionary dictionaryWithObjectsAndKeys:@"val1", @"key1", @"val2", @"key2", nil] forKey:@"dict_test"];
+ [ldb putObject:[NSDictionary dictionaryWithObjectsAndKeys:@"val1", @"key1", @"val2", @"key2", nil] forKey:@"dict_test"];
NSLog(@"Dictionary Value: %@", [ldb getDictionary:@"dict_test"]);
[super viewDidLoad];

0 comments on commit cd46b28

Please sign in to comment.