-
Notifications
You must be signed in to change notification settings - Fork 19
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
Returning after Insert statement not parsing in sqlite #1028
Comments
Could you please provide an example of the SQL query and the configuration, if available? The issue is likely with the parser. |
.sqruff
comment.sql -- name: CreateComment :one
INSERT INTO
comment (
name, contact, subject, cc, message, ip, user_agent, referrer, host_page
)
VALUES
(
?, ?, ?, ?, ?, ?, ?, ?, ?
)
RETURNING * ;
-- name: ListComments :many
SELECT *
FROM comment
ORDER BY modified_at DESC
LIMIT ?
OFFSET ? ; If I swap the statements, it unindents the insert columns and question marks. |
I'm sorry, but I've renamed this because the issue is not quite what you've said. The error is two-fold:
-- name: CreateComment :one
INSERT INTO
comment (
name, contact, subject, cc, message, ip, user_agent, referrer, host_page
)
VALUES
(
?, ?, ?, ?, ?, ?, ?, ?, ?
);
-- name: ListComments :many
SELECT *
FROM comment
ORDER BY modified_at DESC
LIMIT ?
OFFSET ?;
|
In that case, it seems like a bug if it thinks the syntax is invalid but it doesn’t return an error. |
What would you like to see?
If I have more than one statement in a .sql file, sqruff only lints the first statement.
Checked issues
The text was updated successfully, but these errors were encountered: