Hi,
try use the top clause limit.

Bye, Alessandro

Il giorno mercoledì 13 maggio 2015 01:14:37 UTC+2, z0mbie42 ha scritto:
>
> Hi all,
>
> I have a model like this :
> (User)->[SentMessage]->(message)->[MessageTo]->(ChatRoom)
>
> and i want to retrieve only the 10 last messages In a given ChatRoom
>
> for now i have the following request : 
> SELECT out.date AS date, out.body AS body, out.senderId AS senderId, 
> out.@this AS MessageId, in.@this AS ChatRoomId
> FROM (SELECT EXPAND(INE()) FROM ChatRooms WHERE '#12:29' IN members) ORDER 
> BY date DESC
>
> How to limit the selected messages to 10 by Chatroom ?
>
> Or maybe there is a better model for a multi-user chat ? But i'm new with 
> graph databases and i'm unable to find it
>
> cheers,
> Z0mbie42
>  
>

-- 

--- 
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