renamed exaples to playground, edited README

This commit is contained in:
2025-07-26 20:16:50 +05:30
parent d340db6dfd
commit f5350292fc
19 changed files with 135 additions and 61 deletions

View File

@@ -0,0 +1,18 @@
package playground
import (
"testing"
"code.patial.tech/go/pgm/playground/db"
"code.patial.tech/go/pgm/playground/db/user"
)
func TestDelete(t *testing.T) {
expected := "DELETE FROM users WHERE users.id = $1 AND users.status_id NOT IN($2)"
got := db.User.Delete().
Where(user.ID.Eq(1), user.StatusID.NotIn(1, 2, 3)).
String()
if got != expected {
t.Errorf("got %q, want %q", got, expected)
}
}