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

Function TestDropStatementSQL

pkg/sql/ast/sql_test.go:261–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

259}
260
261func TestDropStatementSQL(t *testing.T) {
262 stmt := &DropStatement{ObjectType: "TABLE", IfExists: true, Names: []string{"users"}, CascadeType: "CASCADE"}
263 want := "DROP TABLE IF EXISTS users CASCADE"
264 if got := stmt.SQL(); got != want {
265 t.Errorf("SQL() = %s, want %s", got, want)
266 }
267}
268
269func TestTruncateStatementSQL(t *testing.T) {
270 stmt := &TruncateStatement{Tables: []string{"users", "orders"}, RestartIdentity: true, CascadeType: "CASCADE"}

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected