MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestTSQL_AtAtStillWorksInPostgreSQL

Function TestTSQL_AtAtStillWorksInPostgreSQL

pkg/sql/tokenizer/tsql_test.go:151–164  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

149}
150
151func TestTSQL_AtAtStillWorksInPostgreSQL(t *testing.T) {
152 // In PostgreSQL dialect, @@ should still be TokenTypeAtAt
153 tkz, err := NewWithDialect(keywords.DialectPostgreSQL)
154 if err != nil {
155 t.Fatalf("NewWithDialect error = %v", err)
156 }
157 tokens := tokenize(t, tkz, "@@")
158 if len(tokens) != 1 {
159 t.Fatalf("expected 1 token, got %d", len(tokens))
160 }
161 if tokens[0].Token.Type != models.TokenTypeAtAt {
162 t.Errorf("expected TokenTypeAtAt, got %v", tokens[0].Token.Type)
163 }
164}
165
166func TestTSQL_NationalStringLiteral(t *testing.T) {
167 tkz := newSQLServerTokenizer(t)

Callers

nothing calls this directly

Calls 4

NewWithDialectFunction · 0.85
tokenizeFunction · 0.85
FatalfMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected