testcontainers / testcontainers/testcontainers-java

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

Open
#11,231 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

modules/mysql type/enhancement
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Module

MSSQLServer

Proposal

Currently the separator is hardcoded here: https://github.com/testcontainers/testcontainers-java/blob/2b53c476a249b58e7f7d827f20dcdb7e6fdf4d0e/modules/database-commons/src/main/java/org/testcontainers/ext/ScriptUtils.java#L232

But almost all MSSQL tooling expects the batch separator to be GO, causing issues when passing the same scripts that can be used with sqlcmd into test containers and currently there's no way around it other than manually preprocessing the scripts beforehand.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ScriptUtils.java at the linked line and inspect how MSSQLServer uses script separators. Determine how the default GO batch separator can be supported without requiring preprocessing, then verify that sqlcmd-compatible scripts execute through the MSSQLServer module as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.