OK, got it, if you only need the RIDs of the involved elements, you can do the following:
MATCH{as:user} -Performs-> {as:process} -Uses->{class:Application, as:app, where:(applicationName = ?)} -RunsOn-> {class:Server, as:server, where:(osType = ?)}RETURN user, process, app, serverIf you also want all the details in line, you can use an outer SELECT:SELECT user.* as user_, process.* as process_, app.* as app_, server.* as server_ FROM (MATCH{as:user} -Performs-> {as:process} -Uses->{class:Application, as:app, where:(applicationName = ?)} -RunsOn-> {class:Server, as:server, where:(osType = ?)})The "as xxx_" will add a prefix to attributes, this is useful to avoid collisions, eg. if you have user.name and server.name, this way you will have "user_name" and "server_name"If you don't need all the patterns, but you only need single records that are part of the result, you can try the following:
MATCH{as:user} -Performs-> {as:process} -Uses->{class:Application, as:app, where:(applicationName = ?)} -RunsOn-> {class:Server, as:server, where:(osType = ?)}RETURN $elementsThanksLuigi2017-04-18 14:30 GMT+02:00 Chaitanya deep singh Jhala <chaita...@gmail.com>:Hi Luigi
Thanks for your quick response.
Actually I don't want to mention any details related to the Vertex.
Suppose for User vertex I have 5 attributes, same as for Process vertex I have 3 attributes, So, If these two Vertex are related to osType and applicationName then i want all the details of Vertex attributes without mentioning attribute details.
Example :
In simple sql query we are writing Select * from User and we will get all the details of User.
Hope you are understand what I am actually looking for.
Thanks
Chaitanya
On Tuesday, April 18, 2017 at 5:42:31 PM UTC+5:30, Luigi Dell'Aquila wrote:Hi,A MATCH statement is what you need:MATCH{as:user} -Performs-> {as:process} -Uses->{class:Application, as:app, where:(applicationName = ?)} -RunsOn-> {class:Server, as:server, where:(osType = ?)}/* just add here all the info you need */Full reference here http://orientdb.com/docs/2.2.x/SQL-Match.htmlI hope it helpsThanksLuigi2017-04-18 14:00 GMT+02:00 Chaitanya deep singh Jhala <chaita...@gmail.com>:Hi--
I have some doubts related to the queries in orientdb. I have below scenario :
Example :
Performs Uses RunsOn
User --> Process --> Application --> Server
Here , User/Process/Application/Server are Vertex Names
Performs/Uses/RunsOn are Edge Names
Now, I want all the related combination result as per the input.if input is like osType of Server and applicationName of Application then i want all the details related to this two inputs like user and process and whatever is related to this applicationName and osType.
It is possible in orientdb to fetch out all this details in a single query ??
Thanks & Regards
Chaitanya
---
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-databa...@googlegroups.com.
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.