javascript - Listen change feed of complex queries in RethinkDB -
when have query this:
r.db('universe') .table('star') .getall( r.db('universe').table('ship').get(idship)('idcurrentgalaxy'), {index: 'idgalaxy'} ) .changes({includeinitial: true})
i expect update changefeed when
- a selected star gets updated
- the selected ship.idcurrentgalaxy changes
with query, 1. true. if possible, how can change query make 2. true?
the data behind query this:
//stars {id: 1, idgalaxy: 1, name: 'aldhafera'} {id: 2, idgalaxy: 1, name: 'duhr'} {id: 3, idgalaxy: 2, name: 'menchib'} //galaxies {id: 1, name: 'milky way'} {id: 2, name: 'andromeda'} //ships {id: 1, idcurrentgalaxy: 1}
and query above result this:
{id: 1, idgalaxy: 1, name: 'aldhafera'} {id: 2, idgalaxy: 1, name: 'duhr'}
there's no way in rethinkdb; have open 2 changefeeds , stitch them yourself. support added; can track progress @ https://github.com/rethinkdb/rethinkdb/issues/3997 .
Comments
Post a Comment