Constructordojox.data.CouchDBRestStore

dojo.require("dojox.rpc.CouchDBRestStore");
defined in dojox/rpc/CouchDBRestStore.js

Usage

function ()
parametertypedescription
options  

Jump to PropertiesFunctionsBack to top

FunctioncontainsValue(item: Object, attribute: String, value)
Checks to see if 'item' has 'value' at 'attribute'
FunctiondeleteItem(item, parentInfo: Array)
deletes item any references to that item from the store.
Functionfetch(args)
This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count
fetch an item by its identity. fetch and fetchItemByIdentity work exactly the same
FunctiongenerateSMD(couchServerUrl)
Gets the available attributes of an item's 'property' and returns it as an array.
return the store feature set
FunctiongetValue(item: Object, property, lazyCallback)
Gets the value of an item's 'property'
FunctiongetValues(item: Object, property)
Gets the value of an item's 'property' and returns it. If this value is an array it is just returned, if not, the value is added to an array and that is returned.
FunctionhasAttribute(item: Object, attribute: String)
Checks to see if item has attribute
FunctionisItem(item: Object)
Checks to see if a passed 'item' is really a JsonRestStore item.
FunctionloadItem(item)
Loads an item that has not been loaded yet. Lazy loading should happen through getValue, and if used properly, this should never need to be called
FunctionnewItem(data: Object, parentInfo)
adds a new item to the store at the specified point. Takes two parameters, data, and options.
notification of the revert event..not part of the notification api, but probably should be.
FunctiononSave(items)
notification of the save event..not part of the notification api, but probably should be. console.log("onSave() ", items);
Functionsave(kwArgs)
Saves the dirty data using REST Ajax methods
FunctionsetValue(item, attribute, value)
sets 'attribute' on 'item' to 'value'
FunctionsetValues(item, attribute, values)
sets 'attribute' on 'item' to 'value' value must be an array.
FunctionunsetAttribute(item, attribute)
unsets 'attribute' on 'item'
Function_commitAppend(listId, item)
Function_getParent(parentInfo)
Function_loadById(id, callback)
Function_setDirty(item)
adds an item to the list of dirty items. This item contains a reference to the item itself as well as a cloned and trimmed version of old item for use with revert.
Function_walk(value, forEach)

Jump to FunctionsPropertiesBack to top

*/ Defaults to 'id'. The name of the attribute that holds an objects id. This can be a preexisting id provided by the server. If an ID isn't already provided when an object is fetched or added to the store, the autoIdentity system will generate an id for it and add it to the index.