summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--vendor/modernc.org/sqlite/AUTHORS1
-rw-r--r--vendor/modernc.org/sqlite/CONTRIBUTORS1
-rw-r--r--vendor/modernc.org/sqlite/Makefile2
-rw-r--r--vendor/modernc.org/sqlite/doc.go7
-rw-r--r--vendor/modernc.org/sqlite/sqlite.go37
-rw-r--r--vendor/modules.txt2
8 files changed, 49 insertions, 7 deletions
diff --git a/go.mod b/go.mod
index 02303ed9f..b5f1f21ae 100644
--- a/go.mod
+++ b/go.mod
@@ -73,7 +73,7 @@ require (
golang.org/x/text v0.14.0
gopkg.in/mcuadros/go-syslog.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.1
- modernc.org/sqlite v1.27.0
+ modernc.org/sqlite v1.28.0
mvdan.cc/xurls/v2 v2.5.0
)
diff --git a/go.sum b/go.sum
index f74bd4c07..08e729321 100644
--- a/go.sum
+++ b/go.sum
@@ -1019,8 +1019,8 @@ modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
-modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8=
-modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
+modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
+modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=
diff --git a/vendor/modernc.org/sqlite/AUTHORS b/vendor/modernc.org/sqlite/AUTHORS
index e724f81cb..580af028f 100644
--- a/vendor/modernc.org/sqlite/AUTHORS
+++ b/vendor/modernc.org/sqlite/AUTHORS
@@ -8,6 +8,7 @@
#
# Please keep the list sorted.
+Angus Dippenaar <angusdippenaar@gmail.com>
Artyom Pervukhin <github@artyom.dev>
Dan Kortschak <dan@kortschak.io>
Dan Peterson <danp@danp.net>
diff --git a/vendor/modernc.org/sqlite/CONTRIBUTORS b/vendor/modernc.org/sqlite/CONTRIBUTORS
index ba51f0568..108a09dbb 100644
--- a/vendor/modernc.org/sqlite/CONTRIBUTORS
+++ b/vendor/modernc.org/sqlite/CONTRIBUTORS
@@ -8,6 +8,7 @@
Alexander Menzhinsky <amenzhinsky@gmail.com>
Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
+Angus Dippenaar <angusdippenaar@gmail.com>
Artyom Pervukhin <github@artyom.dev>
Dan Kortschak <dan@kortschak.io>
Dan Peterson <danp@danp.net>
diff --git a/vendor/modernc.org/sqlite/Makefile b/vendor/modernc.org/sqlite/Makefile
index 0ce355fbb..2e3ad1de9 100644
--- a/vendor/modernc.org/sqlite/Makefile
+++ b/vendor/modernc.org/sqlite/Makefile
@@ -201,7 +201,7 @@ cpu: clean
edit:
@touch log
- @if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile *.go & fi
+ @if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile all_test.go sqlite.go & fi
editor:
gofmt -l -s -w *.go
diff --git a/vendor/modernc.org/sqlite/doc.go b/vendor/modernc.org/sqlite/doc.go
index 923a8db74..620bc262f 100644
--- a/vendor/modernc.org/sqlite/doc.go
+++ b/vendor/modernc.org/sqlite/doc.go
@@ -94,6 +94,13 @@
//
// # Changelog
//
+// 2023-12-14 v1.28.0:
+//
+// (*Driver).RegisterConnectionHook: added
+// ConnectionHookFn: added
+// ExecQuerierContext: added
+// RegisterConnectionHook: added
+//
// 2023-08-03 v1.25.0: enable SQLITE_ENABLE_DBSTAT_VTAB.
//
// 2023-07-11 v1.24.0:
diff --git a/vendor/modernc.org/sqlite/sqlite.go b/vendor/modernc.org/sqlite/sqlite.go
index ec5b2c0f9..9763713fa 100644
--- a/vendor/modernc.org/sqlite/sqlite.go
+++ b/vendor/modernc.org/sqlite/sqlite.go
@@ -1844,17 +1844,32 @@ func (b *Backup) Finish() error {
}
}
+type ExecQuerierContext interface {
+ driver.ExecerContext
+ driver.QueryerContext
+}
+
+// ConnectionHookFn function type for a connection hook on the Driver. Connection
+// hooks are called after the connection has been set up.
+type ConnectionHookFn func(
+ conn ExecQuerierContext,
+ dsn string,
+) error
+
// Driver implements database/sql/driver.Driver.
type Driver struct {
// user defined functions that are added to every new connection on Open
udfs map[string]*userDefinedFunction
// collations that are added to every new connection on Open
collations map[string]*collation
+ // connection hooks are called after a connection is opened
+ connectionHooks []ConnectionHookFn
}
var d = &Driver{
- udfs: make(map[string]*userDefinedFunction, 0),
- collations: make(map[string]*collation, 0),
+ udfs: make(map[string]*userDefinedFunction, 0),
+ collations: make(map[string]*collation, 0),
+ connectionHooks: make([]ConnectionHookFn, 0),
}
func newDriver() *Driver { return d }
@@ -1909,6 +1924,12 @@ func (d *Driver) Open(name string) (conn driver.Conn, err error) {
return nil, err
}
}
+ for _, connHookFn := range d.connectionHooks {
+ if err = connHookFn(c, name); err != nil {
+ c.Close()
+ return nil, fmt.Errorf("connection hook: %w", err)
+ }
+ }
return c, nil
}
@@ -2063,6 +2084,18 @@ func registerFunction(
return nil
}
+// RegisterConnectionHook registers a function to be called after each connection
+// is opened. This is called after all the connection has been set up.
+func (d *Driver) RegisterConnectionHook(fn ConnectionHookFn) {
+ d.connectionHooks = append(d.connectionHooks, fn)
+}
+
+// RegisterConnectionHook registers a function to be called after each connection
+// is opened. This is called after all the connection has been set up.
+func RegisterConnectionHook(fn ConnectionHookFn) {
+ d.RegisterConnectionHook(fn)
+}
+
func origin(skip int) string {
pc, fn, fl, _ := runtime.Caller(skip)
f := runtime.FuncForPC(pc)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 171b4ed72..ca5d272fa 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1118,7 +1118,7 @@ modernc.org/memory
# modernc.org/opt v0.1.3
## explicit; go 1.13
modernc.org/opt
-# modernc.org/sqlite v1.27.0
+# modernc.org/sqlite v1.28.0
## explicit; go 1.19
modernc.org/sqlite
modernc.org/sqlite/lib