https://github.com/orientechnologies/orientdb/issues/3416

On Saturday, January 17, 2015 at 12:32:21 PM UTC, syshex wrote:
>
> Sure, will do that.
>
> On 16 January 2015 at 23:20, Luca Garulli   wrote:
>
>> Hi guys,
>> I think you are right: first shouldn't return one record at all, but 
>> rather return the first element in a multi-value (array, list, set, map).
>>
>> Please could you open a new issue for that?
>>
>> Lvc@
>>
>>
>> On 16 January 2015 at 20:09, syshex   wrote:
>>
>>> Hi Marcel
>>>
>>> The [0] notation works  like you said 
>>>
>>> The other try, with the null being passed as an argument fails with an 
>>> exception :
>>>
>>> com.orientechnologies.orient.core.exception.OCommandExecutionException: 
>>> Syntax error: function 'first' needs 1 argument(s) while has been received 2
>>>
>>> apparently  first only accepts one argument. 
>>>
>>> the [x]  notation will do for now. It just surprised me to see first() 
>>> behaving like that. 
>>>
>>> Thanks so much for your help
>>>
>>>
>>> On Friday, January 16, 2015 at 2:34:51 PM UTC, Marcel Pitch wrote:
>>>>
>>>> In my first queries, I've encountered the same problem. That's why I 
>>>> use now the '[0]' code.
>>>>
>>>> But I was just reading the OrientDB *Functions *documentation.
>>>>
>>>> And I saw that : 
>>>>
>>>> "In case you need to use a function as inline when you've only one 
>>>> parameter, then add a second one like "null":
>>>>
>>>>
>>>> SELECT first( out('friends').name, null ) as firstFriend FROM Profiles
>>>>
>>>>
>>>>
>>>> In this case first() function doesn't aggregate everything in only one 
>>>> record, but returns one record per Profile where the firstFriend is the 
>>>> first item of the collection received as parameter."
>>>>
>>>>
>>>> Maybe you could try it ?
>>>>
>>>  -- 
>>>
>>> --- 
>>> 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/d/optout.
>>>
>>
>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "OrientDB" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/orient-database/fbZEimTyJjM/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to