PossibleDB is a Database Server built with DataScript, RethinkDB, Clojure, ClojureScript, and NodeJS.
WARNING: HIGHLY ALPHA
PossibleDB demo video
Active Developement Branch
Installing Latest Version
Download Releases
Clojure Client API for all versions
Documentation
Change Log
Important Links
License
1)git clone https://github.com/runexec/PossibleDB
2)cd PossibleDB/possibledb/
3)npm install rethinkdb
4)chmod +x possibledb.js
5)./possibledb.js {optional port}
All releases are located here
Leiningen Install
[possibledb-client "1.6"]
API Documentation
(:require [possibledb-client.core :as db])
(db/connect!
"Connect to a PossibleDB server"
[host port])
(db/get
"Returns an entire database."
[^:String db-name])
(db/q
"Same q call as in DataScript"
[^:String db-name
query-coll])
(db/transact!
"Same transact! call as in DataScript"
[^:String db-name
data-coll])
(db/create-db!
"Create a PossibleDB db. If schema, same as DataScript."
([^:String db-name])
([^:String db-name
^:HashMap schema]))
(db/destroy-db!
"Remove a DB and all of it's data"
[^:String db-name])
(db/backup-db!
"Writes an EDN representation of a DB to a file"
[^:String db-name
^:String save-file-path])
(db/spawn-db!
"Create a new database with all the data from original-db-name"
[^:String original-db-name
^:String new-db-name])
(db/reset-db!
"Destroy a DB and create it again"
([^:String db-name])
([^:String db-name
^:HashMap schema]))
Leiningen Install
[possibledb-client "1.0"]
API Documentation
(:require [possibledb-client.core :as db])
(db/connect! [host port])
(db/q
"Same q call as in DataScript"
[^:String db-name
query-coll])
(db/transact!
"Same transact! call as in DataScript"
[^:String db-name
data-coll])
(db/create-db!
"Create a PossibleDB db"
[^:String db-name])
PossibleDB is the bridge between DataScript and RethinkDB. Please refer to https://github.com/tonsky/datascript
Running Tests
cd possibledb/
npm install chai
lein do cljsbuild clean, cljsbuild once test
chmod +x test.js; ./test.js
Tests are located in possibledb/test/core.cljs. A mini-framework based on latte-chai is used.
Datomic - http://docs.datomic.com/
DataScript - https://github.com/tonsky/datascript
RethinkDB - http://rethinkdb.com/
Latte Chai - https://github.com/contentjon/chai-latte
Eclipse Public License - v 1.0