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

Function TestDeleteStatementSQL

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

Source from the content-addressed store, hash-verified

168}
169
170func TestDeleteStatementSQL(t *testing.T) {
171 stmt := &DeleteStatement{
172 TableName: "users",
173 Where: &BinaryExpression{Left: &Identifier{Name: "id"}, Operator: "=", Right: &LiteralValue{Value: 1, Type: "INTEGER"}},
174 }
175 want := "DELETE FROM users WHERE id = 1"
176 if got := stmt.SQL(); got != want {
177 t.Errorf("SQL() = %s, want %s", got, want)
178 }
179}
180
181func TestCreateTableStatementSQL(t *testing.T) {
182 stmt := &CreateTableStatement{

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected