This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Andreas Bolka (author)
Wed Sep 23 08:43:00 -0700 2009
README
This is a backend for the Helma NG Storable interface based on the Oracle
(formerly Sleepycat) Berkeley DB.
http://www.oracle.com/database/berkeley-db/db/index.html
Requirements
============
It is written against version 4.6 of Berkeley DB which is the default version
installed in current Debian and Ubuntu releases. Berkeleystore uses the native
version of Berkeley DB, but it probably could be rewritten relatively easily
for use with the pure Java Berkeley DB JE as both share most of their API.
Features
========
Like the filestore backend, berkeleystore uses JSON as persistent object format.
Berkeleystore currently has limited query support. All object properties except
for long texts and nested objects but including references and arrays are
automatically indexed so most queries should be pretty efficient.
Functionality
=============
Initializing the store:
include('helma/storage/berkeleystore');
store = new Store(dbpath);
Creating a new Storable class:
Book = store.defineClass('book');
Creating and saving a new Storable instance:
var b = new Book({title: "DBs for dummies"});
b.save();
Retrieving all objects from a db:
var books = Book.all();
Retrieving an object by id:
var book = Book.get(id);
Deleting an object from the db:
book.remove();
Running a query on the database:
Book.query().equals('prop', value).select();
The Query.select() method takes an optional argument to retrieve
just a property rather than the whole object, e.g. '_id' or 'title'.








