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

SQL-friendly NULLABLE indicator #30

Open
sir4ur0n opened this issue Apr 17, 2023 · 1 comment
Open

SQL-friendly NULLABLE indicator #30

sir4ur0n opened this issue Apr 17, 2023 · 1 comment

Comments

@sir4ur0n
Copy link

Currently the way to specify that a field is nullable is to suffix the type hint with ?, e.g. SELECT x :: text?.
Unfortunately because this is invalid SQL syntax, it makes it harder to copy/paste SQL queries between an SQL editor/PSQL and Haskell.

Have you already considered an SQL-friendly syntax? E.g. using a comment?

SELECT x :: text /*null*/
@nikita-volkov
Copy link
Owner

I have not and this does sound like a great idea! However this will possibly require some work on the parser, because it likely doesn't support comments for now. I don't have the time for that, so I'm leaving this one open for PRs.

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