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

Does it support subquery and table alias? #5

Open
sekarpdkt opened this issue Apr 20, 2019 · 2 comments
Open

Does it support subquery and table alias? #5

sekarpdkt opened this issue Apr 20, 2019 · 2 comments

Comments

@sekarpdkt
Copy link

Does it support sub query and table alias?

select f.col1 A, f.col2 B, s.colx C
from foo f, ( select colx from bar where colx=123) s
where f.colx=s.colx
@janosimas
Copy link

Alias should not be a problem, since the from method only stores a string,
I imagine this should work:

...
  .from("foo f")
...

About sub queries, this is one of the reasons I'm still thinking about using this lib.

@tomlankhorst
Copy link

If aliases work because the from is stored as a string, then I feel like subqueries should work too.

.from("("+subquery.str()+") sub")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants