Skip to content

Instantly share code, notes, and snippets.

@tobowers
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobowers/e53068bf52fb26cf5bc7 to your computer and use it in GitHub Desktop.
Save tobowers/e53068bf52fb26cf5bc7 to your computer and use it in GitHub Desktop.
orientdb {db=vitals-test}> select expand(both('Specializes').both('Accepts').name) from Specialty
----+------+-----
# |@CLASS|value
----+------+-----
0 |null |aetna
1 |null |aetna
----+------+-----
2 item(s) found. Query executed in 0.003 sec(s).
orientdb {db=vitals-test}> select * from InsurancePlan
----+-----+-------------+-----+----------
# |@RID |@CLASS |name |in_Accepts
----+-----+-------------+-----+----------
0 |#12:0|InsurancePlan|aetna|[size=1]
----+-----+-------------+-----+----------
1 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=vitals-test}> select expand(both('Specializes').both('Accepts')) from Specialty
----+-----+-------------+-----+----------
# |@RID |@CLASS |name |in_Accepts
----+-----+-------------+-----+----------
0 |#12:0|InsurancePlan|aetna|[size=1]
1 |#12:0|InsurancePlan|aetna|[size=1]
----+-----+-------------+-----+----------
2 item(s) found. Query executed in 0.005 sec(s).
orientdb {db=vitals-test}> select expand(both('Specializes').both('Accepts')) from Specialty where both('Specializes').both('Accepts').name = 'aetna'
0 item(s) found. Query executed in 0.004 sec(s).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment