Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ANY() and ALL() operators to match with any or all the fields of the document [moved] #25

Closed
lvca opened this issue Dec 10, 2012 · 0 comments

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 25 moved from a Google Code project.
Added by 2010-04-20T09:16:08.000Z by l.garu...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Enhancement, Priority-High, query, sql

Original description

Since Orient can be used as schema-less document database, the application
couldn't know at priori the fields of a document. We need some keywork to
represent fields in generic way.

ANY([<field>]*): any of the fields expressed or any of the document's
fields if they are not expressed. ANY works in OR.

ALL([<field>]*): all the fields expressed or all the document's fields if
they are not expressed must satisfy the condition. ALL works in AND.

Examples:

(1) Find all the documents where ANY field is NULL:

select from person where any() is NULL

(2) Find all the documents where ALL the fields are NULL:

select from person where all() is NULL

(3) Find all the people where any address is in 'Rome' city:

select from person where any(homeAddress.city.name,workAddress.city.name) =
'Rome'

that it means:

select from person where homeAddress.city.name = 'Rome' or
workAddress.city.name = 'Rome'
@lvca lvca closed this as completed Dec 10, 2012
lvca added a commit that referenced this issue Oct 16, 2015
DatabaseMetadata getColumns return all columns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant