Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Subquery #1

Open
tommasop opened this issue Nov 2, 2017 · 0 comments
Open

Subquery #1

tommasop opened this issue Nov 2, 2017 · 0 comments
Assignees
Milestone

Comments

@tommasop
Copy link
Owner

tommasop commented Nov 2, 2017

SELECT and SELECT EXPAND queries can have a FROM subquery but it must be initialized before it can be built:

  query = Rorient::Query.select(ODB)
  query.subquery
  query.subquery.from(Event).where{ name('Rorient Conference') }

It would be nice to have a block defining the subquery:

  query = Rorient::Query.select(ODB).subquery{ from(Event).where{ name('Rorient Conference') } }.fields("name","surname").osql
  # => SELECT name,surname FROM (SELECT FROM Entity WHERE name = 'Rorient Conference') /-1
@tommasop tommasop added the bug label Nov 2, 2017
@tommasop tommasop self-assigned this Nov 2, 2017
@tommasop tommasop added enhancement and removed bug labels Nov 2, 2017
@tommasop tommasop added this to the 0.6.0 milestone Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant