Re: [orientdb] Orientdb SQL query to check edge properties

2015-07-14 Thread Riccardo Tasso
Hi,

for sensors I would say:

SELECT
FROM Sensor
WHERE isDeleted = true AND
1 in in('DeviceHasSensors').in('UserHasDevices').userId

For devides it's simpler:

SELECT
FROM Device
WHERE isDeleted = true AND
1 in in('UserHasDevices').userId

Cheers,
   Riccardo

2015-07-13 23:25 GMT+02:00 Yasith Lokuge yasi...@gmail.com:

 I have a Graph database with three simple Vertex types, User, Device and
 Sensor. The relationship goes as,

 Edges: UserHasDevices, DeviceHasSensors



 Each edge has a property name isDeleted. When deleting a Vertex, I don't
 make it deleted permanently but make the isDeleted property of the Edge
 as true. Please let me know How to query a list of deleted sensors, and /
 or deleted list of devices, which belongs to a particular user, identified
 by user id.

 --

 ---
 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-database+unsubscr...@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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Orientdb SQL query to check edge properties

2015-07-13 Thread Yasith Lokuge


I have a Graph database with three simple Vertex types, User, Device and 
Sensor. The relationship goes as,

 Edges: UserHasDevices, DeviceHasSensors

 

Each edge has a property name isDeleted. When deleting a Vertex, I don't 
make it deleted permanently but make the isDeleted property of the Edge 
as true. Please let me know How to query a list of deleted sensors, and / 
or deleted list of devices, which belongs to a particular user, identified 
by user id.

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.