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

Function TestClickHouseDialectKeywords

pkg/sql/keywords/clickhouse_test.go:23–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestClickHouseDialectKeywords(t *testing.T) {
24 kws := keywords.DialectKeywords(keywords.DialectClickHouse)
25 if len(kws) == 0 {
26 t.Fatal("expected ClickHouse keywords, got none")
27 }
28 found := map[string]bool{}
29 for _, kw := range kws {
30 found[kw.Word] = true
31 }
32 required := []string{"PREWHERE", "FINAL", "ENGINE", "GLOBAL", "ASOF", "TTL", "FORMAT"}
33 for _, w := range required {
34 if !found[w] {
35 t.Errorf("missing expected ClickHouse keyword: %s", w)
36 }
37 }
38}
39
40func TestClickHouseInAllDialects(t *testing.T) {
41 found := false

Callers

nothing calls this directly

Calls 2

DialectKeywordsFunction · 0.92
ErrorfMethod · 0.65

Tested by

no test coverage detected