-
Notifications
You must be signed in to change notification settings - Fork 1
API Reference
Joel Felsinger edited this page Apr 10, 2015
·
5 revisions
Methods
- CouchCushion.connect - a proxy to access the installed adapter's connect function.
- CouchCushion.get - get a document via the installed adapter
- CouchCushion.getModel - get a model from the model list.
- CouchCushion.getOption - get the value of an option.
- CouchCushion.install - load an adapter or plugin for use.
- CouchCushion.model - create or return a model.
- CouchCushion.save - save documents to the installed adapter.
- CouchCushion.setOption - set the value of an option.
Methods
- Model - construct the model.
- Model.set - set all of the model's field data.
-
Model.primeData - alias for
Model.set. - Model.save - save the doc.
- Model.getValue - get a simple value representative of the model and its data.
Properties
- Model.options - the options that are set to the model.
- Model._id - readonly, the value that will be used as the key when saving to a database adapter.
Methods
- Field - construct the field with given options.
- Field.get - get the value of the field.
- Field.set - set the value of the field.
- Field.allowOptions - allow options to be set on the field when constructing.
Properties
- Field.options - The different options that are set for the field.
- Schema - construct the schema.
- Schema.compute - add a computed property.
- Schema.method - add a schema method.
Properties
- Schema.schema - object representation of the base schema.
- Schema.computed - computed properties for the schema.
- Schema.methods - schema methods.