MCPcopy Create free account
hub / github.com/araddon/qlbridge / TestSqlDrop

Function TestSqlDrop

rel/parse_sql_test.go:662–673  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

660}
661
662func TestSqlDrop(t *testing.T) {
663 t.Parallel()
664 sql := `DROP TABLE articles;`
665 req, err := rel.ParseSql(sql)
666 assert.Equal(t, nil, err)
667 assert.NotEqual(t, nil, req)
668 ds, ok := req.(*rel.SqlDrop)
669 assert.True(t, ok, "wanted SqlDrop got %T", req)
670 assert.Equal(t, lex.TokenDrop, ds.Keyword(), "Has keyword DROP")
671 assert.Equal(t, "TABLE", ds.Tok.V, "Wanted TABLE: got %q", ds.Tok.V)
672 assert.Equal(t, "articles", ds.Identity, "has articles: %v", ds.Identity)
673}
674
675func TestWithNameValue(t *testing.T) {
676 t.Parallel()

Callers

nothing calls this directly

Calls 3

ParseSqlFunction · 0.92
EqualMethod · 0.65
KeywordMethod · 0.65

Tested by

no test coverage detected