easy access to mongodb, redis, or ds
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docroot
README
ds.js
dynamo.js
package.json

README

This module sponsored by [Sleepless Inc. (sleepless.com)](http://sleepless.com/)

This will hopefully have a common interface for the
"least common denominator" functions of each NoSQL db soon.

To support:

	AWS DynamoDB
	MongoDB
	JSON
	Filesystem


Interfaces

	authenticate( user, pass, callback() )

	create( data, callback( new_record_id ) )

	read( criteria, callback( records_matched[] )  )

	update( criteria, data, callback( num_updated ) )

	delete( criteria, callback( num_deleted ) )


	Example:

		db.authenticate( "joe", "foo", function( error, dbss ) {
			dbss.create( {name:"bob"}, function( error ) {
				dbss.read( { name: "b.*" }, function( error, records ) {
					records.forEach( function( rec ) {
						print( rec.name )	// "barbara", "bob", "bosworth", etc.
						if( rec.name == "bob" ) {
							rec.name = "robert"
							dbss.update( {id:rec.id}, rec, function( error ) {
								dbss.delete( {id:rec.id}, function( error ) {
									print( "robert rec deleted" )
								})
							})
						}
					})
				})
			})
		})



API
	ListTables
	CreateTable
	DescribeTable
	UpdateTable
	DeleteTable
	PutItem
	GetItem
	UpdateItem
	BatchGetItem
	DeleteItem
	Query
	Scan