neumino / thinky

JavaScript ORM for RethinkDB
http://justonepixel.com/thinky/
Other
1.12k stars 128 forks source link

Support states for changefeeds #541

Open neumino opened 8 years ago

neumino commented 8 years ago

Now thinky is silently dropping them. We should figure out a way to surface these.

xfg commented 8 years ago

Also the problem is this that the AtomFeed doesn't work properly with includeStates: true because that the result.next gets the {state: 'initializing'} message or {state: 'ready'} message if the includeInitial: false instead of query result https://github.com/neumino/thinky/blob/master/lib/query.js#L180

and also unhandled exception will be within document.js because feed.each gets the {state: 'initializing'} or {state: 'ready'} messages and runs self._merge(undefined) at line 1773 and then within Document#_merge tries to handle undefined[key] at line 1723 and as a result gets the unhandled exception.