aboutsummaryrefslogtreecommitdiff
path: root/oblast.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-05-13 00:39:22 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-05-13 00:40:24 +0200
commit2fe6a5a42ccb663211f4f4804b78fff3bd9ebdc0 (patch)
tree08fe0bcc17dcd617d08a14847375710b80d86d8d /oblast.go
parenta86a346ecceb7ad409f116474c1593b201012cf2 (diff)
downloadgo-oblast-2fe6a5a42ccb663211f4f4804b78fff3bd9ebdc0.tar.gz
Insert, Upsert, Update, Delete: do not panic on indirection through nil pointer
Diffstat (limited to 'oblast.go')
-rw-r--r--oblast.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/oblast.go b/oblast.go
index 35b51e2..5adb33e 100644
--- a/oblast.go
+++ b/oblast.go
@@ -25,17 +25,19 @@
// Then use it many times to perform load and store operations:
//
// func doStuff(db *sql.DB) error {
+// dbh := oblast.Wrap(db)
+//
// newEntry := LogEntry{
// CreatedAt: time.Now(),
// Message: "Hello World.",
// }
-// err := logEntryStore.Insert(db, &newEntry)
+// err := logEntryStore.Insert(dbh, &newEntry)
// if err != nil {
// return err
// }
// fmt.Printf("created log entry %d", newEntry.ID)
//
-// allEntries, err := logEntryStore.SelectWhere(db, `created_at < NOW()`)
+// allEntries, err := logEntryStore.SelectWhere(dbh, `created_at < NOW()`)
// if err != nil {
// return err
// }