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

Function TestTSQL_TempTableNotInPostgreSQL

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

Source from the content-addressed store, hash-verified

96}
97
98func TestTSQL_TempTableNotInPostgreSQL(t *testing.T) {
99 // In PostgreSQL dialect, #temp should NOT be a single identifier
100 tkz, err := NewWithDialect(keywords.DialectPostgreSQL)
101 if err != nil {
102 t.Fatalf("NewWithDialect error = %v", err)
103 }
104 tokens := tokenize(t, tkz, "#temp")
105 // Should be SHARP + IDENTIFIER (2 tokens)
106 if len(tokens) != 2 {
107 t.Fatalf("expected 2 tokens for PostgreSQL #temp, got %d", len(tokens))
108 }
109 if tokens[0].Token.Type != models.TokenTypeSharp {
110 t.Errorf("expected TokenTypeSharp, got %v", tokens[0].Token.Type)
111 }
112}
113
114func TestTSQL_GlobalVariables(t *testing.T) {
115 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