Hi Anthony,


2016-10-12 19:46 GMT+02:00 Anthony <abasta...@gmail.com>:

> @Luigi, thanks so much for your detailed response. Overall, these are
> encouraging comments. A few follow-up queries, if I may:
>
>>
>>>>    - Are there any limitations on the types of queries with which
>>>>    LiveQuery works? Can you put "LIVE" in front of any "SELECT" command and
>>>>    get a working LiveQuery?
>>>>
>>>> Not actually, current LiveQuery implementation only supports
>> non-aggregate queries (eg. max() + GROUP BY) and does not allow ORDER BY.
>>
>
> Is support for aggregates and orderby (which presumably would have to be
> accompanied by a limit, as in RethinkDB) planned?
>

Yes, it's planned, but I cannot give you a specific ETA. I think it will be
in the 3.0 just because it's a new feature and 2.2.x is in hotfix process.

>
>>>>    - More specifically, does LiveQuery work on queries involving
>>>>    links? For example, suppose you have a query that retrieves a set of 
>>>> blog
>>>>    posts and their linked comments -- does the LiveQuery send a change
>>>>    notification when a linked comment is inserted/updated/deleted in the
>>>>    LINKLIST?
>>>>
>>>> The query mechanism is triggered by the change of the target object, so
>> the short answer is YES for insert/delete of elements in the linklist, but
>> NO for the update of the internal status of linked objects (eg. if you
>> change a comment's text)
>>
>
> I suppose it would be difficult to track changes on comment updates, as
> there are no links from comments to posts. What if using a Graph model,
> with edges (regular or lightweight) connecting posts to comments -- in that
> case, presumably it would be easier to register changes on any connected
> posts, no? Would that currently work, or is it something that might be
> added in the future?
>

That's right, using edges you can do the live query on the comment and then
fetch the post navigating the edge backwards. It already works.

>
>>>>    - In RethinkDB, changefeeds involving orderby and limit can be
>>>>    configured to send the old and new offset of each change (via the
>>>>    include_offsets option) so you can easily insert the change into the 
>>>> proper
>>>>    place within the previously returned set of records. Is this possible 
>>>> with
>>>>    LiveQuery, or do you have to manage the ordering manually on the client?
>>>>
>>>> Not yet, but it's in our todo list
>>
>
> Just to clarify, are you saying it already supports orderby/limit, and 
> *providing
> the offsets* is on the todo list, or that you still need to add
> order/limit support (which will include an offset option)?
>
>

No, unfortunately it's all to be implemented. The LiveQuery result sends
back single records, so it just lacks the information about the position in
the sorted result. We have to do some little changes on that.


> Thanks.
>
> Anthony
>
>
Thanks

Luigi


> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to