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

Multiline SQL statements #54

Open
bryaan opened this issue May 29, 2023 · 2 comments
Open

Multiline SQL statements #54

bryaan opened this issue May 29, 2023 · 2 comments

Comments

@bryaan
Copy link

bryaan commented May 29, 2023

Is it possible to have multiline sql statements?

        df = Repo.query([
            SELECT (e.name, e.age) FROM MyTable 
            WHERE e.data_source==dataSource 
        ])
@wookay
Copy link
Owner

wookay commented May 29, 2023

that code throws ArgumentError like.

ERROR: LoadError: ArgumentError: number of columns of each array must match (got (4, 2))

because you should follow the array syntax of julia,

julia> [
        1 1 1 1
        1 1
       ]
ERROR: ArgumentError: argument count does not match specified shape (expected 8, got 6)

so you could make (2,3) array

df = Repo.query([
    SELECT (e.name, e.age)
    FROM MyTable
    WHERE e.data_source==dataSource
])

@bryaan
Copy link
Author

bryaan commented Jun 5, 2023

Looks like its due to the julia autoformatter in VSCode. Will have to dig in to file an issue there.

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

2 participants