+- (id)fetchRowColumn:(NSString *)query, ... {
+ va_list args;
+ va_start(args, query);
+
+ [dbLock lock];
+ NSDictionary *result = [self fetchRow:query va_args:args];
+ [dbLock unlock];
+
+ va_end(args);
+
+ if (result) {
+ if ([[result allKeys] count] >= 1) {
+ return [result objectForKey:[[result allKeys] objectAtIndex:0]];
+ }
+ }
+
+ return nil;
+}
+
+- (NSArray *)fetchTableColumn:(NSString *)query, ... {
+ va_list args;
+ va_start(args, query);
+
+ [dbLock lock];
+ NSArray *result = [self fetchTable:query va_args:args];
+ [dbLock unlock];
+
+ va_end(args);
+
+ if (result) {
+ NSMutableArray *columnArray = [[NSMutableArray alloc] init];
+ NSEnumerator *enumerator = [result objectEnumerator];
+ NSDictionary *row;
+ while (row = (NSDictionary *)[enumerator nextObject]) {
+ [columnArray addObject:[row objectForKey:[[row allKeys] objectAtIndex:0]]];
+ }
+ return [columnArray autorelease];
+ }
+
+ return nil;
+}
+