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

Query object columns are not detected ("SELECT statement not found") #10

Open
nerilau opened this issue Jan 30, 2023 · 0 comments
Open

Comments

@nerilau
Copy link

nerilau commented Jan 30, 2023

There are cases when the column is made from the expression. In my case, I have a query that looks like this:

SELECT
  (
    (
      TRUE = TRUE OR
      FALSE = FALSE
    ) AND
    TRUE = FALSE
  ) AS test

I wrote a simple script that looks like this:

query = Query("""
    SELECT
      (
        (
          TRUE = TRUE OR
          FALSE = FALSE
        ) AND
        TRUE = FALSE
      ) AS test
    """)

for c in query.columns:
    print(c.__dict__)

And it returns an error: raise ValueError("SELECT statement not found") ValueError: SELECT statement not found
I think it would be nice to implement that functionality because there are cases when you cannot avoid using nested parenthesis.

@nerilau nerilau changed the title Query object columns are not detected Query object columns are not detected ("SELECT statement not found") Jan 30, 2023
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

1 participant