Thank you Luca for the answer, but I'm sorry; I can understand my examples are 
misleading.

My question was about dot notation; independently by "out" function.

if I create a vertex that way:

create vertex V set name = "test", test = {"@type": "d", "a": 3, "b": {"1": 
"one", "two": 
2}}

and then I try to get what is the value of key test.b.1:

select test.b.1 from V where name = "test"

if stricSql is disabled I get as expected "one".

With stricSql enabled I get a parser error.

To get the right result I have to change my query to:

select test.b[1] from V where name = "test"

with square brackets.

But if I run 

select test.b.two from V where name = "test"

I get "2", not matter if strictSql is enabled or not (as expected).

So, my question is: It is right I have to write two different syntaxes 
dependently by if 
there is a key composed of just numeric charcters or not?

Notice there are no collections in my example, just an embedded document.

Thanks again


In data sabato 8 agosto 2015 15:39:10, Luca Garulli ha scritto:


Hi Gianluigi,


This is correct. out() function return a collection of values.


Best Regards,


Luca Garulli

Founder & CEO
OrientDB[1]




On 8 August 2015 at 11:54, Gianluigi Belli <[email protected][2]> wrote:




{
"@type": "d",
"@version": 0,
"type": "document",
"apps": {
"main": {
"0": "2",
"9": "1"
},
"tommy": {
"0": "0",
"32": "0"
},
"jericho": {
"1": "0"
}
}
}


select out('hasSysUsersRole').sa_rules.apps.main.0 from #12:2


*com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on 
parsing command at position #0: Encountered " <FLOATING_POINT_LITERAL> ".0 "" 
at 
line 1, column 49. Was expecting one of: <EOF> <TIMEOUT> ... <AS> ... 
<FETCHPLAN> ... <LOCK> ... <LET> ... <NOCACHE> ... <PARALLEL> ... <UNWIND> 
... ";" ... "," ... <AS> ... "," ... *

select out('hasSysUsersRole').sa_rules.apps.main[0] from #12:2




-- 

--- 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][3].For more 
options, visit https://groups.google.com/d/optout[4].




-- 

--- 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/S30oSwo9bgI/unsubscribe[5].To 
unsubscribe from this group and all its topics, send an email to orient-
[email protected][3].For more options, visit 
https://groups.google.com/d/optout[4].




-- 
 _________________________________________ 
( Superior ability breeds superior        )
( ambition.                               )
(                                         )
( -- Spock, "Space Seed", stardate 3141.9 )
 ----------------------------------------- 
        o   ^__^
         o  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

-- 

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