Skip to content

feat(mssqlserver): support GO as default batch separator#11587

Open
dahyvuun wants to merge 1 commit intotestcontainers:mainfrom
dahyvuun:fix/mssql-go-batch-separator
Open

feat(mssqlserver): support GO as default batch separator#11587
dahyvuun wants to merge 1 commit intotestcontainers:mainfrom
dahyvuun:fix/mssql-go-batch-separator

Conversation

@dahyvuun
Copy link
Copy Markdown

MSSQL tooling (e.g. sqlcmd) uses GO as the default batch separator instead of ;.
This caused issues when passing MSSQL scripts directly to Testcontainers, requiring manual preprocessing.

This change:

  • Adds a getStatementSeparator() method to JdbcDatabaseContainer (defaults to ;)
  • Overrides it in MSSQLServerContainer to return GO
  • Adds a runInitScript overload in ScriptUtils that accepts a custom separator

Closes #11231

Signed-off-by: dahyvuun <dahyvuun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Support the default GO batch separator for MSSQL

1 participant