github.com/kunlun-qilian/sqlx/v3@v3.0.0/builder/stmt_delete_test.go (about) 1 package builder_test 2 3 import ( 4 "testing" 5 6 . "github.com/kunlun-qilian/sqlx/v3/builder" 7 . "github.com/kunlun-qilian/sqlx/v3/builder/buidertestingutils" 8 "github.com/onsi/gomega" 9 ) 10 11 func TestStmtDelete(t *testing.T) { 12 table := T("T") 13 14 t.Run("delete", func(t *testing.T) { 15 gomega.NewWithT(t).Expect( 16 Delete().From(table, 17 Where(Col("F_a").Eq(1)), 18 Comment("Comment"), 19 ), 20 ).To(BeExpr(` 21 DELETE FROM T 22 WHERE f_a = ? 23 /* Comment */ 24 `, 1)) 25 }) 26 }