dbhash_open - Open a database of type key/data.
dbhash_open (file:string, [,mode:integer,bnum:integer]);
This function is used to open a key/data(nosql) database. The advantage of a key/data database over a relationnal database is the speed.
The disavantage is that a key/data does not support SQL.
The following definitions could be used for key/data operation:
%define GDBM_READER 0; /* A reader. */
%define GDBM_WRITER 1; /* A writer. */
%define GDBM_WRCREAT 2; /* A writer. Create the db if needed. */
%define GDBM_NEWDB 3; /* A writer. Always create a new db. */
%define GDBM_FAST 0x10; /* Write fast! => No fsyncs. OBSOLETE. */
%define GDBM_SYNC 0x20; /* Sync operations to the disk. */
%define GDBM_NOLOCK 0x40; /* Don't do file locking operations. */
%define GDBM_INSERT 0; /* Never replace old data with new. */
%define GDBM_REPLACE 1; /* Always replace old data with new. */
To use this module, you must specify the following in /usr/local/website/site.conf:
Module hash { Library : "/usr/local/lib/libsndbhash.so" Init : "sndbhash_init" }
hash = dbhash_open("/hash/test.db");
Written by Pierre Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com