Hi Guilherme,
You can create an index against the class Action, both properties started
and ended:

CREATE PROPERTY Action.started DATETIMECREATE PROPERTY Action.ended DATETIME
CREATE INDEX Action.started_ended ON Action (started, ended) *NOT*UNIQUE

And then you can query them with:

SELECT FROM Action Where started >= '2014-01-01 00:00:00.000' and
ended < '2015-01-01 00:00:00.000'

To have V1:

SELECT outV() FROM Action Where started >= '2014-01-01 00:00:00.000'
and ended < '2015-01-01 00:00:00.000'

To have V2:

SELECT inV() FROM Action Where started >= '2014-01-01 00:00:00.000'
and ended < '2015-01-01 00:00:00.000'



Lvc@



On 17 July 2014 15:15, Guilherme Moreira <[email protected]>
wrote:

> Hello. We are evaluating OrientDB to use in our new project. We need to
> record whenever a action started and finished between two vertex. This
> action can happen multiple times. We tought in creating a edge that
> contains the started and ended datetime as properties and register each
> action as new edge between two vertex.
>
> Example:
> V1 --[class:Action, started: '2014-17-07 00:00:00', ended: '2014-17-07
> 01:00:00']--> V2
> The same relationship can happen multiple times in same vertex.
>
> How can I quickly query this information later, like finding out which
> Vertexs had benn updated in a given time by example. A index would be
> improve this? If so, how shoud I create this index.
>
> --
>
> ---
> 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