MCPcopy Index your code
hub / github.com/github/gh-ost / TestSanitizeQuotesFromAlterStatement

Function TestSanitizeQuotesFromAlterStatement

go/sql/parser_test.go:136–148  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

134}
135
136func TestSanitizeQuotesFromAlterStatement(t *testing.T) {
137 parser := NewAlterTableParser()
138 {
139 alterStatement := "add column e enum('a','b','c')"
140 strippedStatement := parser.sanitizeQuotesFromAlterStatement(alterStatement)
141 require.Equal(t, "add column e enum('','','')", strippedStatement)
142 }
143 {
144 alterStatement := "change column i int 'some comment, with comma'"
145 strippedStatement := parser.sanitizeQuotesFromAlterStatement(alterStatement)
146 require.Equal(t, "change column i int ''", strippedStatement)
147 }
148}
149
150func TestParseAlterStatementDroppedColumns(t *testing.T) {
151 {

Callers

nothing calls this directly

Calls 2

NewAlterTableParserFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…