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

Remove PoundSignSingleLineComment and add DoubleSlashSingleLineComment #959

Merged
merged 2 commits into from Nov 21, 2018

Conversation

Projects
None yet
2 participants
@igitur
Contributor

igitur commented Nov 20, 2018

Hash signs are not comments on SQL Server. The PoundSignSingleLineComment (pound?) was stripping out references to temporary tables in my migration scripts.

Same for SQLite https://www.sqlite.org/lang_comment.html

I see it's used in SqlAnywhereBatchParser too, but i'm unsure about whether a hash sign represents a comment on SQL Anywhere. From what I could find at http://dcx.sybase.com/1200/en/dbreference/syco.html it seems hash signs aren't comments, but double slashes are. So I added a commit for SqlAnywhere too.

Let me know if I need to change anything. Would be awesome if this could be released in a 3.1.4 version.

@fubar-coder

Can you please create a unit test to verify the behavior of the SQL batch parser for // single line comments?

@igitur

This comment has been minimized.

Contributor

igitur commented Nov 21, 2018

// is not a valid singe line comment token for MS SQL Server. I have already added the SqlAnywhereBatchParserTests.cs file to test the double slash on SQL Anywhere.

@igitur

This comment has been minimized.

Contributor

igitur commented Nov 21, 2018

Or do you mean you want an explicit test for MS SQL Server that // is not treated as a comment?

@fubar-coder

Dang, my bad. The PR is 100% fine. Thank you. 👍

@fubar-coder fubar-coder merged commit 104fb4a into fluentmigrator:master Nov 21, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@igitur igitur deleted the igitur:remove-PoundSignSingleLineComment-from-SqlServerBatchParser branch Nov 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment