aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_opt_preupdate_omit.go
diff options
context:
space:
mode:
authorG.J.R. Timmer <gjr.timmer@gmail.com>2019-08-21 23:04:45 +0200
committerGert-Jan Timmer <gjr.timmer@gmail.com>2019-08-22 10:59:46 +0200
commit2ea5857c0eb3179b078ce5fb881ace11eb28f285 (patch)
tree0d2286de5b9dd161c149dcfe43534b1c6e73cc64 /sqlite3_opt_preupdate_omit.go
parentMerge pull request #734 from gwd/out/fix-libsqlite3-darwin-build (diff)
downloadgolite-2ea5857c0eb3179b078ce5fb881ace11eb28f285.tar.gz
golite-2ea5857c0eb3179b078ce5fb881ace11eb28f285.tar.xz
Closes #597
Diffstat (limited to 'sqlite3_opt_preupdate_omit.go')
-rw-r--r--sqlite3_opt_preupdate_omit.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/sqlite3_opt_preupdate_omit.go b/sqlite3_opt_preupdate_omit.go
new file mode 100644
index 0000000..fae9645
--- /dev/null
+++ b/sqlite3_opt_preupdate_omit.go
@@ -0,0 +1,21 @@
+// Copyright (C) 2019 G.J.R. Timmer <gjr.timmer@gmail.com>.
+// Copyright (C) 2018 segment.com <friends@segment.com>
+
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
+// +build !sqlite_preupdate_hook
+
+package sqlite3
+
+// RegisterPreUpdateHook sets the pre-update hook for a connection.
+//
+// The callback is passed a SQLitePreUpdateData struct with the data for
+// the update, as well as methods for fetching copies of impacted data.
+//
+// If there is an existing update hook for this connection, it will be
+// removed. If callback is nil the existing hook (if any) will be removed
+// without creating a new one.
+func (c *SQLiteConn) RegisterPreUpdateHook(callback func(SQLitePreUpdateData)) {
+ // NOOP
+}