I think I got it. Isn't it another mistake in documentation?
Here 
<https://github.com/orientechnologies/orientdb/wiki/Graph-Database-Tinkerpop>you
 
have in *SQL Commands* section:

int modified = graph.command(
          new OCommandSQL("update Customer set local = true where 
out('lives').name = 'Rome'")).execute());

But here  <https://github.com/orientechnologies/orientdb/wiki/SQL-Methods>in 
*[]* section it is said that:

select from Profile where contacts[phone].left(3) = '+39'

I tried the first approach. It didn't work for me. Should only *[]* be used 
for collections in where clause?

On Wednesday, 9 July 2014 01:26:11 UTC+1, Andrey Kovalev wrote:
>
> Thanks!
> Could you clarify a related question?
> Are these statements true?
>
>    1. By default lightweight edges are used
>    2. In that case out([<label-1>][,<label-n>]*) function doesn't work 
>    like this 
> *select * from Cat where out('Eats').name = 'Jerry' *but *select * from 
>    Cat where out_Eats.name = 'Jerry' *works if I want to query all cats 
>    who eat a mouse with name Jerry.
>
>
> On Wednesday, 9 July 2014 01:03:54 UTC+1, Lvc@ wrote:
>>
>> Hi Andrey,
>> It was a typo, just fixed. The labels are relative to the Edges.
>>
>> Lvc@
>>
>>
>> On 8 July 2014 21:35, Andrey Kovalev <[email protected]> wrote:
>>
>>> Documentation here 
>>> <https://github.com/orientechnologies/orientdb/wiki/SQL-Functions#in>says 
>>> that in([<label-1>][,<label-n>]*)
>>>
>>>> Gets the adjacent incoming vertices starting from the current record as 
>>>> Vertex.
>>>
>>>
>>> Then below you put an example
>>>
>>>> Get all the incoming vertices of type Car ad Moto from all the Vehicle 
>>>> vertices:
>>>> SELECT in('Car','Moto') from Vehicle
>>>
>>> From this example it seems that we query incoming vertices of type Car 
>>> and Moto. 
>>>
>>> I tried to run a similar query in a database console and it seems that 
>>> 'Car' and 'Moto' must be an Edge type not a Vertex type. Am I right?
>>> If not could you explain why I may get the following exception:
>>>
>>>> Type error. The class User does not extend class 'E' and therefore 
>>>> cannot be considered an Edge
>>>>
>>>  -- 
>>>
>>> --- 
>>> 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 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