Package path refactor.

This commit is contained in:
go-jet 2019-06-21 13:56:57 +02:00
parent 829736279b
commit 83d4c5ad03
72 changed files with 162 additions and 188 deletions

17
delete_statement_test.go Normal file
View file

@ -0,0 +1,17 @@
package jet
import (
"testing"
)
func TestDeleteUnconditionally(t *testing.T) {
assertStatementErr(t, table1.DELETE(), `deleting without a WHERE clause`)
assertStatementErr(t, table1.DELETE().WHERE(nil), `deleting without a WHERE clause`)
}
func TestDeleteWithWhere(t *testing.T) {
assertStatement(t, table1.DELETE().WHERE(table1Col1.EQ(Int(1))), `
DELETE FROM db.table1
WHERE table1.col1 = $1;
`, int64(1))
}