+2013-03-20 Anton Adamansky. <adamansky@gmail.com>
+ * Python3 binding
+ * Lua binding
+ * Minor bug fixes
+ - Release 1.0.66
+
2013-01-22 Anton Adamansky. <adamansky@gmail.com>
* Collection joins now supported (ticket #43)
- Release 1.0.55
all: fix-changelogs
cd tcejdb && ./configure
+ $(MAKE) -C ./tcejdb version
$(MAKE) -C ./tcejdb
clean:
- rm -rf ./var/*
- rm -f *.upload
- rm -f libtcejdb*.tar.gz libtcejdb*.deb libtcejdb*.changes libtcejdb*.build libtcejdb*.dsc
- - rm -f python*.tar.gz python*.deb python*.changes python*.build python*.dsc
+ - rm -f python*.tar.gz python*.deb python*.changes python*.build python*.dsc
deb-packages: fix-changelogs
cd ./tcejdb && autoconf && ./configure
{
"name" : "ejdb",
- "version" : "1.0.63",
+ "version" : "1.0.64",
"main" : "node/ejdb.js",
"homepage" : "http://ejdb.org",
"description" : "EJDB - Embedded JSON Database engine",
+2013-03-20 Anton Adamansky. <adamansky@gmail.com>
+ * Python3 binding
+ * Lua binding
+ * Minor bug fixes
+ - Release 1.0.66
+
2013-01-22 Anton Adamansky. <adamansky@gmail.com>
* Collection joins now supported (ticket #43)
- Release 1.0.55
#================================================================
-all : version $(LIBRARYFILES) $(COMMANDFILES) $(CGIFILES)
+all : $(LIBRARYFILES) $(COMMANDFILES) $(CGIFILES)
@$(POSTCMD)
@printf '\n'
@printf '#================================================================\n'
./tctmgr importtsv casket words.tsv
-.PHONY : all clean install check check-ejdb deb-packages
+.PHONY : all version clean install check check-ejdb deb-packages
deb-packages :
TCXSTR *cxpath = tcxstrnew2(mdbpath);
tcxstrcat2(cxpath, "_");
tcxstrcat2(cxpath, colname);
- rv = tctdbopen(cdb, tcxstrptr(cxpath), jb->metadb->hdb->omode);
+ uint32_t mode = jb->metadb->hdb->omode;
+ if (mode & (JBOWRITER | JBOCREAT)) {
+ mode |= JBOCREAT;
+ }
+ rv = tctdbopen(cdb, tcxstrptr(cxpath), mode);
*res = rv ? cdb : NULL;
tcxstrdel(cxpath);
return rv;
LIBS = -lz -lpthread -lm -lc -lcunit
RUNENV = LD_LIBRARY_PATH=.:.. DYLD_LIBRARY_PATH=.:..
-TESTS = t1 t2 t3
+TESTS = t1 t2 t3 t4
-check : all check-t1 check-t2 check-t3;
+check : all check-t1 check-t2 check-t3 check-t4;
check-valgrind :
make RUNCMD="valgrind --tool=memcheck --leak-check=full --error-exitcode=1" check
check-valgrind-t3 :
make RUNCMD="valgrind --tool=memcheck --leak-check=full --error-exitcode=1" check-t3
+check-valgrind-t4 :
+ make RUNCMD="valgrind --tool=memcheck --leak-check=full --error-exitcode=1" check-t4
+
check-t1 :
$(RUNENV) $(RUNCMD) ./t1
check-t3 :
$(RUNENV) $(RUNCMD) ./t3
+check-t4 :
+ $(RUNENV) $(RUNCMD) ./t4
+
all : $(TESTS)
t3 : t3.o
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -ltcejdb $(CMDLDFLAGS) $(LIBS)
+t4 : t4.o
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -ltcejdb $(CMDLDFLAGS) $(LIBS)
+
-.PHONY : all clean check run-t1 run-t2 run-t3
+.PHONY : all clean check check-t1 check-t2 check-t3 check-t4
--- /dev/null
+
+#include <locale.h>
+#include <pthread.h>
+#include "ejdb_private.h"
+
+#include "CUnit/Basic.h"
+
+/*
+ * CUnit Test Suite
+ */
+
+static void eprint(EJDB *jb, int line, const char *func) {
+ int ecode = ejdbecode(jb);
+ fprintf(stderr, "%d: %s: error: %d: %s\n",
+ line, func, ecode, ejdberrmsg(ecode));
+}
+
+void testTicket53() {
+ EJDB *jb = ejdbnew();
+ CU_ASSERT_TRUE_FATAL(ejdbopen(jb, "dbt4_53", JBOWRITER | JBOCREAT));
+ ejdbclose(jb);
+ ejdbdel(jb);
+
+ jb = ejdbnew();
+ CU_ASSERT_TRUE_FATAL(ejdbopen(jb, "dbt4_53", JBOWRITER));
+
+ EJCOLL *coll = ejdbcreatecoll(jb, "mycoll", NULL);
+ if (!coll) {
+ eprint(jb, __LINE__, "testTicket53");
+ }
+ CU_ASSERT_TRUE(coll);
+ ejdbclose(jb);
+ ejdbdel(jb);
+}
+
+int init_suite(void) {
+ return 0;
+}
+
+int clean_suite(void) {
+ return 0;
+}
+
+
+int main() {
+ setlocale(LC_ALL, "en_US.UTF-8");
+ CU_pSuite pSuite = NULL;
+
+ /* Initialize the CUnit test registry */
+ if (CUE_SUCCESS != CU_initialize_registry())
+ return CU_get_error();
+
+ /* Add a suite to the registry */
+ pSuite = CU_add_suite("t4", init_suite, clean_suite);
+ if (NULL == pSuite) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ /* Add the tests to the suite */
+ if (
+ (NULL == CU_add_test(pSuite, "testTicket53", testTicket53))
+
+ ) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ /* Run all tests using the CUnit Basic interface */
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_basic_run_tests();
+ int ret = CU_get_error() || CU_get_number_of_failures();
+ CU_cleanup_registry();
+ return ret;
+}