Hi, again.
Could anyone just confirm that it is not possible with Blueprints?
Thanks.
On Friday, 11 July 2014 20:50:31 UTC+1, Andrey Kovalev wrote:
>
> Sorry, guys. In my initial post I made a small mistake in a java
> pseudo-code. Probably you misunderstood my question.
> Can you review my question here again and confirm that it is not possible
> with Blueprints (I am deciding whether to go with pure Blueprints or
> OCommandSQL or mixed style)
>
> Can I rewrite this code written with OCommandSQL:
> final Iterable<Vertex> userVxItb = database.command(new OCommandSQL("select
> * from User where @rid = ? and out('Owns')[@rid] = ?")).
> execute(new ORecordId(user.getId()), new ORecordId(
> groupId));
> final Iterator<Vertex> userVxIt = userVxItb.iterator();
> if (userVxIt.hasNext()){//do something}
> with something like this with Blueprints:
> final Iterable<Vertex> userVxItb = database.getVertex(groupId).query().
> direction(Direction.IN).labels("Owns").labels("User").
> has("@rid", user.getId()).vertices();
> final Iterator<Vertex> userVxIt = userVxItb.iterator();
> if (userVxIt.hasNext()){//do something}
>
>
> On Friday, 11 July 2014 00:17:05 UTC+1, Andrey Kovalev wrote:
>>
>> First of all I've already tried to google for a solution but without any
>> luck.
>> I have a simple relation: User->owns->Group. I want to check that a
>> particular group really belongs to a particular user.
>> I am trying to run this query:
>>
>> final Vertex groupVx = database.getVertex(groupId);
>> long count = groupVx.query().direction(Direction.IN).labels("owns").
>> labels("User").has("@rid", userId);
>>
>>
>> 1. The query above fails, because User is not an edge. Is it possible
>> to fix the query above to get a desired result using Blueprints?
>> 2. Am I right that GremlinPipeline is implemented by Tinkerpop and
>> all queries are done in-memory without using native query syntax of
>> OrientDB?
>>
>>
>>
>>
--
---
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.