Something like this ..

select out('Friend')*[200..250]* from Profile where name = 'Luca'

which will return the 200-250 records .. or is this already supported ..?

On Thursday, December 19, 2013 11:16:42 AM UTC-5, Lvc@ wrote:
>
> @Damian, documentation is in progress
> @Dodong, what do you mean?
>
> Lvc@
>
>
> On 19 December 2013 15:40, Dodong Juan <[email protected] 
> <javascript:>>wrote:
>
>> This is cool. Can this be extended to do 'paging' ?
>>
>>
>> On Thursday, December 19, 2013 7:05:36 AM UTC-5, Lvc@ wrote:
>>>
>>> Hi all,
>>> in "develop" branch I've just committed a new powerful feature: allow to 
>>> filter collections in chain. To understand it let's go to a couple of 
>>> examples.
>>>
>>> *Examples*
>>>
>>> *Example 1: Get the first friend of mine*
>>>
>>> You can get it by using:
>>>
>>> select expand( out ) from (
>>>   select out('Friend') from Profile where name = 'Luca'
>>> ) limit 1
>>>      
>>> But now you can also do this:
>>>
>>> select out('Friend')*[0]* from Profile where name = 'Luca'
>>>
>>> Much easier and faster on execution!
>>>
>>> *Example 2: from GratefulDeadConcerts database traverse all the out() 
>>> connection and get the first song called 'MONA'*
>>>
>>> select from (
>>>   select expand( out() ) from V
>>> ) where name = 'MONA' and type = 'song' limit 1
>>>
>>>  @rid @version @class name in_followed_by song_type performances 
>>> typeout_followed_byout_sung_byout_written_by 
>>> #9:6<http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:6>19VMONA[2]cover1song[2][1][1]
>>> Executed in 0.455 seconds.
>>>
>>> Now let's use the new way:
>>>
>>> select expand( out()*[name='MONA'][type='song']* ) from V
>>>
>>>  @rid @version @class name in_followed_by song_type performances 
>>> typeout_followed_byout_sung_byout_written_by 
>>> #9:6<http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:6>19VMONA[2]cover1song[2][1][1]
>>> Executed in 0.106 seconds.
>>>
>>> Note last execution, in this case, is 4x faster!
>>>
>>> Squared brackets [] allows:
>>> - filtering by one index, example out()[0]
>>> - filtering by multiple indexes, example out()[0,2,4]
>>> - filtering by ranges, example out()[0-9]
>>> - filtering by equal conditions (only equals is supported), example 
>>> out()[@class = 'Person']
>>>
>>> Brackets [] can be chained, in this case it's like filtering by AND 
>>> operator. Look at the Example 2.
>>>
>>> For more information about the issue: https://github.com/
>>> orientechnologies/orientdb/issues/1888
>>>
>>>
>>> Luca Garulli
>>> CEO at Orient Technologies
>>> the Company behind OrientDB
>>> http://about.me/luca.garulli
>>>
>>>  -- 
>>  
>> --- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to