-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 BULK INSERT to tsql #3861
base: master
Are you sure you want to change the base?
Add BULK INSERT to tsql #3861
Conversation
@JannikDeuschelQC there are some merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution and welcome ANTLR grammars repository!
But please fix review comments and add/expand examples that covers suggested changes in the examples directory.
Also, fix merge conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess all newly added tokens should be also added to the keyword list to allow they be identifiers if needed:
BATCHSIZE
CHECK_CONSTRAINTS
CODEPAGE
DATAFILETYPE
ERRORFILE
ERRORFILE_DATA_SOURCE
FIELDTERMINATOR
FIELDQUOTE
FIRE_TRIGGERS
FIRSTROW
FORMATFILE
FORMATFILE_DATA_SOURCE
KEEPNULLS
KILOBYTES_PER_BATCH
LASTROW
MAXERRORS
ROWS_PER_BATCH
ROWTERMINATOR
: BULK INSERT | ||
ddl_object | ||
FROM STRING | ||
(WITH LR_BRACKET (bulk_insert_option (COMMA bulk_insert_option)*) RR_BRACKET)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove useless parentheses:
(WITH LR_BRACKET (bulk_insert_option (COMMA bulk_insert_option)*) RR_BRACKET)? | |
(WITH LR_BRACKET bulk_insert_option (COMMA bulk_insert_option)* RR_BRACKET)? |
: BATCHSIZE EQUAL DECIMAL | ||
| CHECK_CONSTRAINTS | ||
| CODEPAGE EQUAL STRING | ||
| DATAFILETYPE EQUAL STRING | ||
| DATA_SOURCE EQUAL STRING | ||
| ERRORFILE EQUAL STRING | ||
| ERRORFILE_DATA_SOURCE EQUAL STRING | ||
| FIRSTROW EQUAL DECIMAL | ||
| FIRE_TRIGGERS | ||
| FORMATFILE_DATA_SOURCE EQUAL STRING | ||
| KEEPIDENTITY | ||
| KEEPNULLS | ||
| KILOBYTES_PER_BATCH EQUAL DECIMAL | ||
| LASTROW EQUAL DECIMAL | ||
| MAXERRORS EQUAL DECIMAL | ||
| ORDER LR_BRACKET column_name_list_with_order RR_BRACKET | ||
| ROWS_PER_BATCH EQUAL DECIMAL | ||
| ROWTERMINATOR EQUAL STRING | ||
| TABLOCK | ||
| FORMAT EQUAL STRING | ||
| FIELDQUOTE EQUAL STRING | ||
| FORMATFILE EQUAL STRING | ||
| FIELDTERMINATOR EQUAL STRING | ||
| ROWTERMINATOR EQUAL STRING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract common parts:
: BATCHSIZE EQUAL DECIMAL | |
| CHECK_CONSTRAINTS | |
| CODEPAGE EQUAL STRING | |
| DATAFILETYPE EQUAL STRING | |
| DATA_SOURCE EQUAL STRING | |
| ERRORFILE EQUAL STRING | |
| ERRORFILE_DATA_SOURCE EQUAL STRING | |
| FIRSTROW EQUAL DECIMAL | |
| FIRE_TRIGGERS | |
| FORMATFILE_DATA_SOURCE EQUAL STRING | |
| KEEPIDENTITY | |
| KEEPNULLS | |
| KILOBYTES_PER_BATCH EQUAL DECIMAL | |
| LASTROW EQUAL DECIMAL | |
| MAXERRORS EQUAL DECIMAL | |
| ORDER LR_BRACKET column_name_list_with_order RR_BRACKET | |
| ROWS_PER_BATCH EQUAL DECIMAL | |
| ROWTERMINATOR EQUAL STRING | |
| TABLOCK | |
| FORMAT EQUAL STRING | |
| FIELDQUOTE EQUAL STRING | |
| FORMATFILE EQUAL STRING | |
| FIELDTERMINATOR EQUAL STRING | |
| ROWTERMINATOR EQUAL STRING | |
: ( BATCHSIZE | |
| FIRSTROW | |
| KILOBYTES_PER_BATCH | |
| LASTROW | |
| MAXERRORS | |
| ROWS_PER_BATCH | |
) EQUAL DECIMAL | |
| ( CODEPAGE | |
| DATAFILETYPE | |
| DATA_SOURCE | |
| ERRORFILE | |
| ERRORFILE_DATA_SOURCE | |
| FORMATFILE_DATA_SOURCE | |
| ROWTERMINATOR | |
| FORMAT | |
| FIELDQUOTE | |
| FORMATFILE | |
| FIELDTERMINATOR | |
| ROWTERMINATOR | |
) EQUAL STRING | |
| CHECK_CONSTRAINTS | |
| FIRE_TRIGGERS | |
| KEEPIDENTITY | |
| KEEPNULLS | |
| ORDER LR_BRACKET column_name_list_with_order RR_BRACKET | |
| TABLOCK |
Closes #3850