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

Add support for multiline comments. #151

Closed
wants to merge 1 commit into from

Conversation

danofsteel32
Copy link

I Changed the _SQL_COMMENT regex in aiosql/query_loader.py to work on single and multiline /* */ style comments. I created a new test for it in tests/test_loading.py to show that it didn't break the previous behavior.

I Changed the _SQL_COMMENT regex in `aiosql/query_loader.py` to work on
single and multiline `/* */` style comments. I added a new test for it
in `tests/test_loading.py` to show that it didn't break the previous
behavior.
@zx80
Copy link
Collaborator

zx80 commented Nov 23, 2022

There is an formatting issue so that black is not happy.

ISTM that the test could try nested stuff /* ... /* ... */, and possibly stuff between comments.

@zx80
Copy link
Collaborator

zx80 commented Dec 19, 2022

The feature does not seem to work, eg with:

/* definition in comment should be ignored
-- name: hello
SELECT 'hello';
*/

seems to create a hello function anyway.

@zx80
Copy link
Collaborator

zx80 commented Jan 8, 2023

Implemented in current dev branch. Will be merged and released later with 8.0.

The implementation is less straightforward than this patch expected.

@zx80 zx80 closed this Jan 8, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants