gitee.com/eden-framework/sqlx@v0.0.3/builder/stmt_delete_test.go (about) 1 package builder_test 2 3 import ( 4 "testing" 5 6 . "gitee.com/eden-framework/sqlx/builder" 7 . "gitee.com/eden-framework/sqlx/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 }