-
Notifications
You must be signed in to change notification settings - Fork 55
Database
This module is wrapper on top of datavore, a lightweight in-browser javascript database. datavore doesnt have an inbuilt event system to register listeners on the data. We use an instance of the Mediator to give datavore a publish/subscribe system. Also, datavore doesnt have in-built memory. It doesnt store/save the tables created by it in the app. This angular wrapper takes care of that too.
To start using, you need to include this module.
mod = angular.module "MyAPP" ,["app.db"]
mod.service "test",[
"database"
(database)->
#code goes here
#database.createTable "foo"
]
database.create(input,tname)
database.addColumn(cname, values, type, iscolumn...,tname)
database.removeColumn(cname,tname)
database.addListener(opts)
database.destroy(tname)
database.rows(tname)
database.cols(tname)
database.get(tname,col,row)
database.exists(tname)
database.query(tname)
database.dense_query(tname)
database.sparse_query(tname)
database.where(tname)