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.
};
/**
*/
EJDB_EXPORT bool ejdbexport(EJDB *jb, const char *path, TCLIST *cnames, int flags);
-
/**
- *
+ * TODO
* @param jb
* @param path
* @param cnames
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");