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

Function TestTSQL_TempTableStandaloneHash

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

Source from the content-addressed store, hash-verified

84}
85
86func TestTSQL_TempTableStandaloneHash(t *testing.T) {
87 // In SQL Server dialect, a standalone # (not followed by identifier) should still be TokenTypeSharp
88 tkz := newSQLServerTokenizer(t)
89 tokens := tokenize(t, tkz, "# ")
90 if len(tokens) != 1 {
91 t.Fatalf("expected 1 token, got %d", len(tokens))
92 }
93 if tokens[0].Token.Type != models.TokenTypeSharp {
94 t.Errorf("expected TokenTypeSharp, got %v", tokens[0].Token.Type)
95 }
96}
97
98func TestTSQL_TempTableNotInPostgreSQL(t *testing.T) {
99 // In PostgreSQL dialect, #temp should NOT be a single identifier

Callers

nothing calls this directly

Calls 4

newSQLServerTokenizerFunction · 0.85
tokenizeFunction · 0.85
FatalfMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected