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

Function TestParserWithDialectOption

pkg/sql/parser/dialect_test.go:25–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestParserWithDialectOption(t *testing.T) {
26 p := NewParser(WithDialect("mysql"))
27 if p.Dialect() != "mysql" {
28 t.Errorf("expected mysql, got %s", p.Dialect())
29 }
30
31 p2 := NewParser()
32 if p2.Dialect() != "postgresql" {
33 t.Errorf("expected postgresql default, got %s", p2.Dialect())
34 }
35}
36
37func TestTokenizerWithDialect(t *testing.T) {
38 tkz, err := tokenizer.NewWithDialect(keywords.DialectMySQL)

Callers

nothing calls this directly

Calls 4

DialectMethod · 0.95
WithDialectFunction · 0.85
NewParserFunction · 0.70
ErrorfMethod · 0.65

Tested by

no test coverage detected