Closed hliyan closed 9 years ago
Dispatching events are expensive and won't emit unless requested during database initialisation.
See installable events section http://dev.yathit.com/ydn-db/doc/setup/events.html
Using events for application logic are not encouraged. There should be better alternative.
just noticed the return type of add()
. can i do it this way:
var req = db.add('users', theObject, theId);
req.done = function() {
};
req.fail = function() {
};
looks like i should have looked at the doc closer: http://dev.yathit.com/api/ydn/db/request.html
your request already implements a then(success, fail)
sorry
from what i understand of the docs, the following adds a single event listener for all update events:
how do i get a callback for the last update event, or a specific one? i'm trying to wrap YDN with something like this: