forked from tower-archive/tower
-
Notifications
You must be signed in to change notification settings - Fork 0
stores
Lance Pollard edited this page Apr 12, 2012
·
1 revision
There's a unified interface to the different types of stores, so you can use the model and have it transparently manage data. For example, for the browser, you can use the memory store, and for the server, you can use the mongodb store. Redis, PostgreSQL, and Neo4j are in the pipeline.
The Store knows about the Model.
class App.Page extents Tower.Model
@store "mongodb"
User.store().create(new User(firstName: "Lance"))
User.store().create(firstName: "Lance")
User.store().create([{firstName: "Lance"}, {firstName: "Dane"}])