-
authoradam <adamansky@gmail.com>
Mon, 15 Jul 2013 13:56:50 +0000 (20:56 +0700)
committeradam <adamansky@gmail.com>
Mon, 15 Jul 2013 13:56:50 +0000 (20:56 +0700)
tcejdb/ejdb.h
tcejdb/testejdb/t4.c

index 92c24f6..979631d 100644 (file)
@@ -501,12 +501,11 @@ EJDB_EXPORT bool ejdbtranstatus(EJCOLL *jcoll, bool *txactive);
 EJDB_EXPORT bson* ejdbmeta(EJDB *jb);
 
 
-/** Export settings */
+/** Export/Import settings used in `ejdbexport()` and `ejdbimport()` functions. */
 enum {
-    JBJSONEXPORT = 1, //If set json collection data will be exported into JSON instead of BSON.
+    JBJSONEXPORT = 1, //If set json collection data will be exported as JSON files instead of BSON.
     JBIMPORTUPDATE = 2, //Update existing collection entries with imported ones. Collection options are ignored.
-    JBIMPORTREPLACE = 3 //Recreate existing collections and replace all collection entries with imported data.
-
+    JBIMPORTREPLACE = 3 //Recreate existing collections and replace all collection data with imported entries.
 };
 
 /**
@@ -519,9 +518,8 @@ enum {
  */
 EJDB_EXPORT bool ejdbexport(EJDB *jb, const char *path, TCLIST *cnames, int flags);
 
-
 /**
- * 
+ * TODO
  * @param jb
  * @param path
  * @param cnames
index 0c2847e..414f674 100644 (file)
@@ -57,6 +57,7 @@ void testBSONExportImport() {
         eprint(jb, __LINE__, "testBSONExportImport");
     }
     CU_ASSERT_TRUE(coll != NULL);
+    CU_ASSERT_TRUE(ejdbsetindex(coll, "f", JBIDXSTR | JBIDXNUM));
     bson_init(&bv1);
     bson_append_int(&bv1, "e", 1);
     bson_append_string(&bv1, "f", "g");