Permalink
Browse files

renamed getCollectionNamesInDatabase: to collectionNamesInDatabase:

  • Loading branch information...
1 parent b873e6b commit 0a5a94e2683d69544c2eef00afbf0f6f6c9b1c90 Tim Burks committed Sep 26, 2010
Showing with 5 additions and 3 deletions.
  1. +2 −0 objc/NuMongoDB.h
  2. +1 −1 objc/NuMongoDB.m
  3. +2 −2 test/test_access.nu
View
@@ -85,6 +85,8 @@ limitations under the License.
- (int) countWithCondition:(id) condition inCollection:(NSString *) collection inDatabase:(NSString *) database;
/*! Run an arbitrary database command. */
- (id) runCommand:(id) command inDatabase:(NSString *) database;
+/*! Get the names of the collections in a database. */
+- (id) collectionNamesInDatabase:(NSString *) database;
/*! Remove a collection. */
- (BOOL) dropCollection:(NSString *) collection inDatabase:(NSString *) database;
/*! Create a collection if it doesn't already exist. */
View
@@ -206,7 +206,7 @@ - (BOOL) dropCollection:(NSString *) collection inDatabase:(NSString *) database
NULL);
}
-- (id) getCollectionNamesInDatabase:(NSString *) database
+- (id) collectionNamesInDatabase:(NSString *) database
{
NSArray *names = [self findArray:nil inCollection:[database stringByAppendingString:@".system.namespaces"]];
NSMutableArray *result = [NSMutableArray array];
View
@@ -177,12 +177,12 @@
(collectionNames each:
(do (collectionName)
(mongo insertObject:(dict x:0) intoCollection:(+ database "." collectionName))))
- (set actualCollectionNames (mongo getCollectionNamesInDatabase:database))
+ (set actualCollectionNames (mongo collectionNamesInDatabase:database))
(collectionNames each:
(do (collectionName)
(assert_true (actualCollectionNames containsObject:collectionName))))
(mongo dropDatabase:database)
- (set actualCollectionNames (mongo getCollectionNamesInDatabase:database))
+ (set actualCollectionNames (mongo collectionNamesInDatabase:database))
(collectionNames each:
(do (collectionName)
(assert_false (actualCollectionNames containsObject:collectionName)))))

0 comments on commit 0a5a94e

Please sign in to comment.