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

Function TestTruncateStatementSQL

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

Source from the content-addressed store, hash-verified

267}
268
269func TestTruncateStatementSQL(t *testing.T) {
270 stmt := &TruncateStatement{Tables: []string{"users", "orders"}, RestartIdentity: true, CascadeType: "CASCADE"}
271 want := "TRUNCATE TABLE users, orders RESTART IDENTITY CASCADE"
272 if got := stmt.SQL(); got != want {
273 t.Errorf("SQL() = %s, want %s", got, want)
274 }
275}
276
277func TestAST_SQL_Method(t *testing.T) {
278 a := AST{Statements: []Statement{

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected