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 comments are not consistently supported #236

Open
maybeYouShouldBeTheLawyer opened this issue Feb 16, 2021 · 1 comment
Open
Labels

Comments

@maybeYouShouldBeTheLawyer

Dialect:

SQLite

Problem
Multiline SQL comments (aka, C-style comments: /*...*/) are not consistently supported.

SQLite, MySQL, and PostgreSQL each permit multiline, C-style comments.

Context in which observed
Issue noticed while using Sqldelight in connection with Sqldelight Issue 2166, where inclusion of C-style comments in an .sqm migration file resulted in a parsing failure.

@AlecStrong's comment there notes that single-line SQL comments (--) should be preferred. Filing this issue in case we want to reconsider permitting multi-line comments across the board, should others assume as I did that they're fair game. (But, of course, deferring to the wisdom of the spl-psi contributors.)

By my (perhaps overly artful) phrase 'not consistently supported,' I mean in particular that C-style comments are allowed in Sqldelight's .sq files but not in its .sqm files.

I've filed this issue under sql-psi as directed by the Sqldelight issue tracker.

Build Environment
SQLDelight version: 1.4.5 (pre-release)
OS: Android
Gradle version: 6.8.2
Kotlin version: 1.4.21
AGP Version (if applicable): 4.1.0

@AlecKazakova
Copy link
Collaborator

TIL

if sql supports them, we definitely should 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants