Skip to content

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

@nerilau

Description

@nerilau

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions