From 41ee7432c54eea23c1fa88ac21c5a723414ec5d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:25:23 +0200 Subject: [PATCH] [chore]: Bump modernc.org/sqlite from 1.23.0 to 1.23.1 (#1884) Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.23.0 to 1.23.1. - [Commits](https://gitlab.com/cznic/sqlite/compare/v1.23.0...v1.23.1) --- updated-dependencies: - dependency-name: modernc.org/sqlite dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- vendor/modernc.org/sqlite/sqlite.go | 26 ++++++++++++++++++++++++++ vendor/modules.txt | 2 +- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index fc60553ba..94e343c96 100644 --- a/go.mod +++ b/go.mod @@ -67,7 +67,7 @@ require ( golang.org/x/text v0.9.0 gopkg.in/mcuadros/go-syslog.v2 v2.3.0 gopkg.in/yaml.v3 v3.0.1 - modernc.org/sqlite v1.23.0 + modernc.org/sqlite v1.23.1 mvdan.cc/xurls/v2 v2.5.0 ) diff --git a/go.sum b/go.sum index 3d8ba3ed6..113e05da3 100644 --- a/go.sum +++ b/go.sum @@ -1100,8 +1100,8 @@ modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.23.0 h1:MWTFBI5H1WLnXpNBh/BTruBVqzzoh28DA0iOnlkkRaM= -modernc.org/sqlite v1.23.0/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= +modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= +modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= 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/sqlite.go b/vendor/modernc.org/sqlite/sqlite.go index 4dd876f80..6968da820 100644 --- a/vendor/modernc.org/sqlite/sqlite.go +++ b/vendor/modernc.org/sqlite/sqlite.go @@ -2066,3 +2066,29 @@ func finalTrampoline(tls *libc.TLS, ctx uintptr) { delete(xAggregateContext.m, id) xAggregateContext.ids.reclaim(id) } + +// int sqlite3_limit(sqlite3*, int id, int newVal); +func (c *conn) limit(id int, newVal int) int { + return int(sqlite3.Xsqlite3_limit(c.tls, c.db, int32(id), int32(newVal))) +} + +// Limit calls sqlite3_limit, see the docs at +// https://www.sqlite.org/c3ref/limit.html for details. +// +// To get a sql.Conn from a *sql.DB, use (*sql.DB).Conn(). Limits are bound to +// the particular instance of 'c', so getting a new connection only to pass it +// to Limit is possibly not useful above querying what are the various +// configured default values. +func Limit(c *sql.Conn, id int, newVal int) (r int, err error) { + err = c.Raw(func(driverConn any) error { + switch dc := driverConn.(type) { + case *conn: + r = dc.limit(id, newVal) + return nil + default: + return fmt.Errorf("unexpected driverConn type: %T", driverConn) + } + }) + return r, err + +} diff --git a/vendor/modules.txt b/vendor/modules.txt index b8d6066f4..8f2df6059 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1097,7 +1097,7 @@ modernc.org/memory # modernc.org/opt v0.1.3 ## explicit; go 1.13 modernc.org/opt -# modernc.org/sqlite v1.23.0 +# modernc.org/sqlite v1.23.1 ## explicit; go 1.18 modernc.org/sqlite modernc.org/sqlite/lib