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

Please remove the AS keyword for table alias when using Oracle DB, since it is illegal in Oracle #1519

Open
auricleau opened this issue Feb 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@auricleau
Copy link

Describe the bug
A clear and concise description of what the bug is.

Have you read the Contributing Guidelines?

Yes

To Reproduce
Steps to reproduce the behavior:

  1. User TypeOrm and Oracle
  2. Create Entity with relationships
  3. Query through graphql

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Node Version [e.g. 14.14.0]
  • Nestjs-query Version [e.g. v0.21.0]

Additional context

Since AS keyword for table alias is illegal in Oracle and it can be omitted for most DB, I suggest adding a checking on current DB type, or completely remove the AS keyword.
As far as I can see, this only occurs in relation-query.builder.ts

@auricleau auricleau added the bug Something isn't working label Feb 11, 2022
@smolinari
Copy link
Collaborator

smolinari commented Feb 11, 2022

Can you show a reference where AS for aliases isn't allowed with Oracle? It's standard SQL.

I found this and it is showing AS is possible.

https://www.oracletutorial.com/oracle-basics/oracle-alias/

Scott

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants