/dikdik

An Erlang and json interface for PostgreSQL hstore.

Primary LanguageErlangApache License 2.0Apache-2.0

Dikdik

README

Authors: Tristan Sloughter tristan.sloughter@gmail.com Jordan Wilberding jwilberding@gmail.com

Website: http://blog.erlware.org

dikdik is a an Erlang and json interface for PostgreSQL hstore

Quick Start

Build

$ make

Examples

$ make shell
Erlang R15B03 (erts-5.9.3.1) [source] [smp:4:4] [async-threads:30] [hipe] [kernel-poll:true]

Eshell V5.9.3.1  (abort with ^G)
(dikdik@five9s-MacBook-Air-2.local)1> dikdik:new(<<"wutang">>).
ok
(dikdik@five9s-MacBook-Air-2.local)2> dikdik:insert(<<"wutang">>, <<"doc1">>, <<"{\"type\":{\"test\":\"testmore\"},\"name\":5}">>).
ok
(dikdik@five9s-MacBook-Air-2.local)3> dikdik:find(<<"wutang">>, <<"doc1">>).
<<"{\"type\":{\"test\":\"testmore\"},\"name\":5}">>

Testing

Edit Common Test Config

$ cat test/ct.config
%{database_url, "postgres://<username>:<password>@<host>:<port>/<database>"}.

Uncomment this line and set the postgres url.

Run Tests

$ make ct