*.upload
*.rock
*.so
+*.so.*
*.a
*.dll
*.exe
*.def
*.exp
*.lib
+*.zip
.dep.inc
-
addressbook*
autom4te.cache/
config.log
/npm-debug.log
/.idea/workspace.xml
+/tcejdb/i686-w64*
+/tcejdb/x86_64-w64*
/tcejdb/tools/win32
/tcejdb/Makefile
/tcejdb/libtcejdb.a
*.o
*.vlog
-*.iml
+*.dylib
*.upload
+*.rock
+*.so
+*.so.*
+*.a
+*.dll
+*.exe
+*.sdf
+*.suo
+*.def
+*.exp
+*.lib
+*.zip
+.dep.inc
-nbproject/
+addressbook*
+autom4te.cache/
+config.log
+config.status
-/misc
-/node/nodejs
-/.idea
-/tcejdb/static
+/npm-debug.log
+/.idea/workspace.xml
-/tcejdb/tools
-/tcejdb/doc
-/tcejdb/deb
+/tcejdb/i686-w64*
+/tcejdb/x86_64-w64*
+/tcejdb/tools/win32
/tcejdb/Makefile
-/tcejdb/autom4te.cache
-/tcejdb/config.log
-/tcejdb/config.status
/tcejdb/libtcejdb.a
/tcejdb/libtcejdb.so
/tcejdb/libtcejdb.so.9
/tcejdb/tcumttest
/tcejdb/tcutest
/tcejdb/tcejdb.pc
+
+/tcejdb/nbproject/private
+/tcejdb/static
/tcejdb/check.in
/tcejdb/check.out
/tcejdb/casket*
/tcejdb/samples/sample1/sample1
/tcejdb/samples/sample1/addressbook*
+/tcejdb/samples/sample1_win32/Debug
+/tcejdb/samples/sample1_win32/Release
+/tcejdb/samples/sample1_win32/sample1_win32/Debug
+/tcejdb/samples/sample1_win32/sample1_win32/Release
+/tcejdb/samples/sample1_win32/ipch
+/tcejdb/samples/sample1_mingw/nbproject/private
+/tcejdb/testejdb/Makefile
/tcejdb/testejdb/dbt*
/tcejdb/testejdb/t1
/tcejdb/testejdb/t2
/tcejdb/testejdb/t3
+/tcejdb/testejdb/t4
+
+*/nbproject/private/*
/build
/var
+/node/samples/sample1/zoo*
+
+
+libtcejdb9*.deb
+libtcejdb_*.dsc
+libtcejdb_*.tar.gz
+libtcejdb_*.build
+libtcejdb_*.changes
+
+
+tcejdb/debian/files
+tcejdb/debian/*.log
+tcejdb/debian/*.substvars
+tcejdb/debian/libtcejdb9*/
+tcejdb/debian/tmp/*
+tcejdb/debian/*.debhelper
+
+/pyejdb/build/
+/pyejdb/test/__pycache__
+/pyejdb/testdb*
+/pyejdb/dist/
+/pyejdb/pyejdb.egg-info/
+
+
+/pyejdb/debian/files
+/pyejdb/debian/python3-ejdb.debhelper.log
+/pyejdb/debian/python3-ejdb.postinst.debhelper
+/pyejdb/debian/python3-ejdb.prerm.debhelper
+/pyejdb/debian/python3-ejdb.substvars
+/pyejdb/debian/python3-ejdb/
+/pyejdb/debian/tmp/
+/python-ejdb_*.build
+/python-ejdb_*.dsc
+/python-ejdb_*.gz
+/python-ejdb_*.build
+/python-ejdb_*.changes
+/python3-ejdb_*.deb
+
+/luaejdb/debian/files
+/luaejdb/test/testdb*
+/luaejdb/debian/lua51-ejdb*
+/luaejdb/debian/*.log
+/lua-ejdb_*.build
+/lua-ejdb_*.dsc
+/lua-ejdb_*.gz
+/lua-ejdb_*.build
+/lua-ejdb_*.changes
+/lua51-ejdb_*.deb
+
+
+/jejdb/build
+/jejdb/target
+/jejdb/*.so
+/jejdb/*.so.*
+/jejdb/Makefile
+
+/build
+/var
/*.deb
/*.dsc
/*.tar.gz
/*.build
/*.changes
-
/tcejdb/debian/
-
/pyejdb
/luaejdb
/jejdb
-
-
TODO
------------------------------------
* Collect collection index statistic
-* Windows port
Related software
------------------------------------
# Generic settings
SHELL = @SHELL@
+HOST_NAME = @host@
+HOST_CPU = @host_cpu@
+HOST_OS = @host_os@
# Package information
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
PACKAGEDIR = $(PACKAGE)-$(VERSION)
-PACKAGETGZ = $(PACKAGE)-$(VERSION).tar.gz
+PACKAGEBASE = $(PACKAGE)-$(VERSION)-$(HOST_OS)-$(HOST_CPU)
+PACKAGETGZ = $(PACKAGEBASE).tar.gz
+
LIBVER = @MYLIBVER@
LIBREV = @MYLIBREV@
FORMATVER = @MYFORMATVER@
+ifeq ($(HOST_CPU),x86_64)
+MACHINE = X64
+else
+MACHINE = X86
+endif
+
# Targets
HEADERFILES = @MYHEADERFILES@
LIBRARYFILES = @MYLIBRARYFILES@
[ -f tcutil.h~ ] && mv -f tcutil.h~ tcutil.h
-untabify :
- ls *.c *.h *.idl | while read name ; \
- do \
- sed -e 's/\t/ /g' -e 's/ *$$//' $$name > $$name~; \
- [ -f $$name~ ] && mv -f $$name~ $$name ; \
- done
-
-
install :
$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE) \
$(DESTDIR)$(LIBDIR) \
$(DESTDIR)$(DATADIR) \
$(DESTDIR)$(PCDIR) \
$(DESTDIR)$(MAN3DIR)
- $(INSTALL) -m 644 $(HEADERFILES) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
+
+ $(foreach HF,$(HEADERFILES), \
+ $(INSTALL) -m 644 -D $(HF) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/$(HF); \
+ )
$(INSTALL) -m 755 $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 644 $(DOCUMENTFILES) $(DESTDIR)$(DATADIR)
$(INSTALL) -m 644 $(PCFILES) $(DESTDIR)$(PCDIR)
@printf '# Thanks for using Tokyo Cabinet EJDB edition.\n'
@printf '#================================================================\n'
-
-install-strip :
- make DESTDIR=$(DESTDIR) install
- cd $(DESTDIR)$(BINDIR) && strip $(COMMANDFILES)
-
+win-archive : install
+ cd $(HOST_NAME) && zip -r ../$(PACKAGEBASE).zip ./*
uninstall :
- - cd $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE) && rm -f $(HEADERFILES)
+ - cd $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE) && rm -rf $(HEADERFILES)
- cd $(DESTDIR)$(LIBDIR) && rm -f $(LIBRARYFILES)
## cd $(DESTDIR)$(BINDIR) && rm -f $(COMMANDFILES)
## cd $(DESTDIR)$(LIBEXECDIR) && rm -f $(CGIFILES)
dist :
make version
- make untabify
make distclean
cd .. && tar cvf - $(PACKAGEDIR) | gzip -c > $(PACKAGETGZ)
sync ; sync
$(LIBOBJFILES) $(LDFLAGS) $(LIBS)
tcejdbdll.lib tcejdbdll.exp : tcejdbdll.dll libtcejdbdll.a tcejdbdll.def
- wine tools/win32/lib.exe /def:tcejdbdll.def
+ wine tools/win32/lib.exe /def:tcejdbdll.def /machine:$(MACHINE)
tcutest : tcutest.o $(LIBRARYFILES)
Embedded JSON Database engine
====================================
-It aims to be a fast [MongoDB](http://mongodb.org)-like library **which can be embedded into C/C++ and [NodeJS](http://nodejs.org/) applications under terms of LGPL license.**
+It aims to be a fast [MongoDB](http://mongodb.org)-like library **which can be embedded into C/C++/NodeJS/Python/Lua/Java applications under terms of LGPL license.**
EJDB is the C library based on modified version of [Tokyo Cabinet](http://fallabs.com/tokyocabinet/).
JSON representation of queries and data implemented with API based on [C BSON](https://github.com/mongodb/mongo-c-driver/tree/master/src/)
+News
+===============================
+* `2013-04-03` **[Java API binding available](https://github.com/Softmotions/ejdb/blob/master/jejdb/)**
+* `2013-03-20` **[Lua binding available](https://github.com/Softmotions/ejdb/blob/master/luaejdb/)**
+* `2013-02-15` **[EJDB Python3 binding available](https://github.com/Softmotions/ejdb/blob/master/pyejdb/)**
+* `2013-02-07` **[Debian packages provided](https://github.com/Softmotions/ejdb/wiki/Debian-Ubuntu-installation)**
+* `2013-01-22` **[Collection joins now supported](https://github.com/Softmotions/ejdb/wiki/Collection-joins)**
+
Features
================================
* LGPL license allows you to embed this library into proprietary software.
* Collection level transactions.
* String token matching queries: ```$stror``` ```$strand```
* [Node.js](http://nodejs.org) binding
-
-
-Documentation
-================================
-
-* **[EJDB Command line interface](https://github.com/Softmotions/ejdb/wiki/EJDB-Command-line-interface)**
-* **[NodeJS binding](#nodejs-binding)**
- * [Installation](#installation)
- * [Samples](#ejdb-nodejs-samples)
- * [NodeJS API](#ejdb-nodejs-api)
-* **[EJDB C Library](#ejdb-c-library)**
- * [Building & Installation](#building--installation)
- * [Samples](#ejdb-c-samples)
- * [C API](#c-api)
-
-Community
-================================
-We use [EJDB Google group](http://groups.google.com/group/ejdb) as our mailing list.
+* [Collection joins](https://github.com/Softmotions/ejdb/wiki/Collection-joins)
+* Python binding
+* Lua binding
+* Java binding
EJDB C Library
==================================
EJQ *q1 = ejdbcreatequery(jb, &bq1, NULL, 0, NULL);
uint32_t count;
- TCLIST *res = ejdbqrysearch(coll, q1, &count, 0, NULL);
+ TCLIST *res = ejdbqryexecute(coll, q1, &count, 0, NULL);
fprintf(stderr, "\n\nRecords found: %d\n", count);
//Now print the result set records
```sh
gcc -std=c99 -Wall -pedantic -c -o csnippet.o csnippet.c
-gcc -std=c99 -Wall -pedantic -o csnippet csnippet.o -ltcejdb
+gcc -o csnippet csnippet.o -ltcejdb
```
Building & Installation
--------------------------------
-Prerequisites
---------------------------------
-**System libraries:**
+[Installing on Debian/Ubuntu](https://github.com/Softmotions/ejdb/wiki/Debian-Ubuntu-installation)
-* gcc
-* zlib
+Manual installation
+-------------------------------
-On Debian/Ubuntu linux you can install it as follows:
+### Prerequisites
+**System libraries:**
-```sh
- sudo apt-get install gcc zlib1g zlib1g-dev
-```
+* gcc
+* zlib-dev
-Building
---------------------------------
+### Build and install
~~~~~~
cd ./tcejdb
TODO
------------------------------------
* Collect collection index statistic
-* Windows port
Related software
------------------------------------
[Connect session store backed by EJDB database](https://github.com/Softmotions/connect-session-ejdb)
+
+
test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
# Package name
-AC_INIT(tcejdb, 1.0.68)
+AC_INIT(tcejdb, 1.1.0)
AC_CANONICAL_HOST
# Package information
MYCPPFLAGS="$MYCPPFLAGS -D_DEBUG -UNDEBUG -DEJDB_STATIC"
MYCMDLDFLAGS="$MYCMDLDFLAGS -static"
enables="$enables (debug)"
+else
+ MYLDFLAGS="$MYLDFLAGS -s"
fi
# Developping mode
#================================================================
# Export variables
+AC_SUBST(host)
+AC_SUBST(host_cpu)
+AC_SUBST(host_os)
AC_SUBST(MYLIBVER)
AC_SUBST(MYLIBREV)
AC_SUBST(MYFORMATVER)
set -x
autoconf
./configure --host="${HOST}" --prefix=${PREFIX} ${CONFLAGS}
-make clean
+#make clean
make
+make win-archive
if (hourp) *hourp = 0;
if (minp) *minp = 0;
if (secp) *secp = 0;
+ } else {
+ if (yearp) *yearp = ts.tm_year + 1900;
+ if (monp) *monp = ts.tm_mon + 1;
+ if (dayp) *dayp = ts.tm_mday;
+ if (hourp) *hourp = ts.tm_hour;
+ if (minp) *minp = ts.tm_min;
+ if (secp) *secp = ts.tm_sec;
}
- if (yearp) *yearp = ts.tm_year + 1900;
- if (monp) *monp = ts.tm_mon + 1;
- if (dayp) *dayp = ts.tm_mday;
- if (hourp) *hourp = ts.tm_hour;
- if (minp) *minp = ts.tm_min;
- if (secp) *secp = ts.tm_sec;
}
/* Format a date as a string in W3CDTF. */