mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Upgrade to SQLite 3.50 (#4218)
# Description Upgrades ncruces/go-sqlite3 to 0.26 which includes SQLite 3.50. ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [ ] I/we have performed a self-review of added code. - [ ] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4218 Co-authored-by: Daenney <daenney@noreply.codeberg.org> Co-committed-by: Daenney <daenney@noreply.codeberg.org>
This commit is contained in:
2
go.mod
2
go.mod
@@ -54,7 +54,7 @@ require (
|
|||||||
github.com/miekg/dns v1.1.66
|
github.com/miekg/dns v1.1.66
|
||||||
github.com/minio/minio-go/v7 v7.0.92
|
github.com/minio/minio-go/v7 v7.0.92
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/ncruces/go-sqlite3 v0.25.2
|
github.com/ncruces/go-sqlite3 v0.26.0
|
||||||
github.com/oklog/ulid v1.3.1
|
github.com/oklog/ulid v1.3.1
|
||||||
github.com/pquerna/otp v1.5.0
|
github.com/pquerna/otp v1.5.0
|
||||||
github.com/rivo/uniseg v0.4.7
|
github.com/rivo/uniseg v0.4.7
|
||||||
|
2
go.sum
generated
2
go.sum
generated
@@ -328,6 +328,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
|||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
github.com/ncruces/go-sqlite3 v0.25.2 h1:suu3C7y92hPqozqO8+w3K333Q1VhWyN6K3JJKXdtC2U=
|
github.com/ncruces/go-sqlite3 v0.25.2 h1:suu3C7y92hPqozqO8+w3K333Q1VhWyN6K3JJKXdtC2U=
|
||||||
github.com/ncruces/go-sqlite3 v0.25.2/go.mod h1:46HIzeCQQ+aNleAxCli+vpA2tfh7ttSnw24kQahBc1o=
|
github.com/ncruces/go-sqlite3 v0.25.2/go.mod h1:46HIzeCQQ+aNleAxCli+vpA2tfh7ttSnw24kQahBc1o=
|
||||||
|
github.com/ncruces/go-sqlite3 v0.26.0 h1:dY6ASfuhSEbtSge6kJwjyJVC7bXCpgEVOycmdboKJek=
|
||||||
|
github.com/ncruces/go-sqlite3 v0.26.0/go.mod h1:46HIzeCQQ+aNleAxCli+vpA2tfh7ttSnw24kQahBc1o=
|
||||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||||
github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M=
|
github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M=
|
||||||
|
29
vendor/github.com/ncruces/go-sqlite3/README.md
generated
vendored
29
vendor/github.com/ncruces/go-sqlite3/README.md
generated
vendored
@@ -30,10 +30,10 @@ db.QueryRow(`SELECT sqlite_version()`).Scan(&version)
|
|||||||
|
|
||||||
- [`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3)
|
- [`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3)
|
||||||
wraps the [C SQLite API](https://sqlite.org/cintro.html)
|
wraps the [C SQLite API](https://sqlite.org/cintro.html)
|
||||||
([example usage](https://pkg.go.dev/github.com/ncruces/go-sqlite3#example-package)).
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3#example-package)).
|
||||||
- [`github.com/ncruces/go-sqlite3/driver`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver)
|
- [`github.com/ncruces/go-sqlite3/driver`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver)
|
||||||
provides a [`database/sql`](https://pkg.go.dev/database/sql) driver
|
provides a [`database/sql`](https://pkg.go.dev/database/sql) driver
|
||||||
([example usage](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#example-package)).
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#example-package)).
|
||||||
- [`github.com/ncruces/go-sqlite3/embed`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/embed)
|
- [`github.com/ncruces/go-sqlite3/embed`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/embed)
|
||||||
embeds a build of SQLite into your application.
|
embeds a build of SQLite into your application.
|
||||||
- [`github.com/ncruces/go-sqlite3/vfs`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs)
|
- [`github.com/ncruces/go-sqlite3/vfs`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs)
|
||||||
@@ -44,12 +44,19 @@ db.QueryRow(`SELECT sqlite_version()`).Scan(&version)
|
|||||||
### Advanced features
|
### Advanced features
|
||||||
|
|
||||||
- [incremental BLOB I/O](https://sqlite.org/c3ref/blob_open.html)
|
- [incremental BLOB I/O](https://sqlite.org/c3ref/blob_open.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/blobio#example-package))
|
||||||
- [nested transactions](https://sqlite.org/lang_savepoint.html)
|
- [nested transactions](https://sqlite.org/lang_savepoint.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#example-Savepoint))
|
||||||
- [custom functions](https://sqlite.org/c3ref/create_function.html)
|
- [custom functions](https://sqlite.org/c3ref/create_function.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3#example-Conn.CreateFunction))
|
||||||
- [virtual tables](https://sqlite.org/vtab.html)
|
- [virtual tables](https://sqlite.org/vtab.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3#example-CreateModule))
|
||||||
- [custom VFSes](https://sqlite.org/vfs.html)
|
- [custom VFSes](https://sqlite.org/vfs.html)
|
||||||
|
([examples](vfs/README.md#custom-vfses))
|
||||||
- [online backup](https://sqlite.org/backup.html)
|
- [online backup](https://sqlite.org/backup.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#Conn))
|
||||||
- [JSON support](https://sqlite.org/json1.html)
|
- [JSON support](https://sqlite.org/json1.html)
|
||||||
|
([example](https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#example-package-Json))
|
||||||
- [math functions](https://sqlite.org/lang_mathfunc.html)
|
- [math functions](https://sqlite.org/lang_mathfunc.html)
|
||||||
- [full-text search](https://sqlite.org/fts5.html)
|
- [full-text search](https://sqlite.org/fts5.html)
|
||||||
- [geospatial search](https://sqlite.org/geopoly.html)
|
- [geospatial search](https://sqlite.org/geopoly.html)
|
||||||
@@ -57,7 +64,6 @@ db.QueryRow(`SELECT sqlite_version()`).Scan(&version)
|
|||||||
- [statistics functions](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats)
|
- [statistics functions](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats)
|
||||||
- [encryption at rest](vfs/adiantum/README.md)
|
- [encryption at rest](vfs/adiantum/README.md)
|
||||||
- [many extensions](ext/README.md)
|
- [many extensions](ext/README.md)
|
||||||
- [custom VFSes](vfs/README.md#custom-vfses)
|
|
||||||
- [and more…](embed/README.md)
|
- [and more…](embed/README.md)
|
||||||
|
|
||||||
### Caveats
|
### Caveats
|
||||||
@@ -77,10 +83,19 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and
|
|||||||
[wazero's](https://tetrate.io/blog/introducing-wazero-from-tetrate/#:~:text=Rock%2Dsolid%20test%20approach)
|
[wazero's](https://tetrate.io/blog/introducing-wazero-from-tetrate/#:~:text=Rock%2Dsolid%20test%20approach)
|
||||||
thorough testing.
|
thorough testing.
|
||||||
|
|
||||||
Every commit is [tested](https://github.com/ncruces/go-sqlite3/wiki/Support-matrix) on
|
Every commit is tested on:
|
||||||
Linux (amd64/arm64/386/riscv64/ppc64le/s390x), macOS (arm64/amd64),
|
* Linux: amd64, arm64, 386, riscv64, ppc64le, s390x
|
||||||
Windows (amd64), FreeBSD (amd64/arm64), OpenBSD (amd64), NetBSD (amd64/arm64),
|
* macOS: amd64, arm64
|
||||||
DragonFly BSD (amd64), illumos (amd64), and Solaris (amd64).
|
* Windows: amd64
|
||||||
|
* BSD:
|
||||||
|
* FreeBSD: amd64, arm64
|
||||||
|
* OpenBSD: amd64
|
||||||
|
* NetBSD: amd64, arm64
|
||||||
|
* DragonFly BSD: amd64
|
||||||
|
* illumos: amd64
|
||||||
|
* Solaris: amd64
|
||||||
|
|
||||||
|
Certain operating system and CPU combinations have some limitations. See the [support matrix](https://github.com/ncruces/go-sqlite3/wiki/Support-matrix) for a complete overview.
|
||||||
|
|
||||||
The Go VFS is tested by running SQLite's
|
The Go VFS is tested by running SQLite's
|
||||||
[mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).
|
[mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).
|
||||||
|
2
vendor/github.com/ncruces/go-sqlite3/config.go
generated
vendored
2
vendor/github.com/ncruces/go-sqlite3/config.go
generated
vendored
@@ -109,7 +109,7 @@ func (c *Conn) FileControl(schema string, op FcntlOpcode, arg ...any) (any, erro
|
|||||||
default:
|
default:
|
||||||
return nil, MISUSE
|
return nil, MISUSE
|
||||||
|
|
||||||
case FCNTL_RESET_CACHE:
|
case FCNTL_RESET_CACHE, FCNTL_NULL_IO:
|
||||||
rc = res_t(c.call("sqlite3_file_control",
|
rc = res_t(c.call("sqlite3_file_control",
|
||||||
stk_t(c.handle), stk_t(schemaPtr),
|
stk_t(c.handle), stk_t(schemaPtr),
|
||||||
stk_t(op), 0))
|
stk_t(op), 0))
|
||||||
|
1
vendor/github.com/ncruces/go-sqlite3/const.go
generated
vendored
1
vendor/github.com/ncruces/go-sqlite3/const.go
generated
vendored
@@ -280,6 +280,7 @@ const (
|
|||||||
FCNTL_DATA_VERSION FcntlOpcode = 35
|
FCNTL_DATA_VERSION FcntlOpcode = 35
|
||||||
FCNTL_RESERVE_BYTES FcntlOpcode = 38
|
FCNTL_RESERVE_BYTES FcntlOpcode = 38
|
||||||
FCNTL_RESET_CACHE FcntlOpcode = 42
|
FCNTL_RESET_CACHE FcntlOpcode = 42
|
||||||
|
FCNTL_NULL_IO FcntlOpcode = 43
|
||||||
)
|
)
|
||||||
|
|
||||||
// LimitCategory are the available run-time limit categories.
|
// LimitCategory are the available run-time limit categories.
|
||||||
|
7
vendor/github.com/ncruces/go-sqlite3/context.go
generated
vendored
7
vendor/github.com/ncruces/go-sqlite3/context.go
generated
vendored
@@ -177,12 +177,15 @@ func (ctx Context) ResultPointer(ptr any) {
|
|||||||
//
|
//
|
||||||
// https://sqlite.org/c3ref/result_blob.html
|
// https://sqlite.org/c3ref/result_blob.html
|
||||||
func (ctx Context) ResultJSON(value any) {
|
func (ctx Context) ResultJSON(value any) {
|
||||||
data, err := json.Marshal(value)
|
err := json.NewEncoder(callbackWriter(func(p []byte) (int, error) {
|
||||||
|
ctx.ResultRawText(p[:len(p)-1]) // remove the newline
|
||||||
|
return 0, nil
|
||||||
|
})).Encode(value)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ResultError(err)
|
ctx.ResultError(err)
|
||||||
return // notest
|
return // notest
|
||||||
}
|
}
|
||||||
ctx.ResultRawText(data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResultValue sets the result of the function to a copy of [Value].
|
// ResultValue sets the result of the function to a copy of [Value].
|
||||||
|
2
vendor/github.com/ncruces/go-sqlite3/embed/README.md
generated
vendored
2
vendor/github.com/ncruces/go-sqlite3/embed/README.md
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Embeddable Wasm build of SQLite
|
# Embeddable Wasm build of SQLite
|
||||||
|
|
||||||
This folder includes an embeddable Wasm build of SQLite 3.49.2 for use with
|
This folder includes an embeddable Wasm build of SQLite 3.50.0 for use with
|
||||||
[`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3).
|
[`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3).
|
||||||
|
|
||||||
The following optional features are compiled in:
|
The following optional features are compiled in:
|
||||||
|
12
vendor/github.com/ncruces/go-sqlite3/embed/build.sh
generated
vendored
12
vendor/github.com/ncruces/go-sqlite3/embed/build.sh
generated
vendored
@@ -14,9 +14,9 @@ trap 'rm -f sqlite3.tmp' EXIT
|
|||||||
-o sqlite3.wasm "$ROOT/sqlite3/main.c" \
|
-o sqlite3.wasm "$ROOT/sqlite3/main.c" \
|
||||||
-I"$ROOT/sqlite3/libc" -I"$ROOT/sqlite3" \
|
-I"$ROOT/sqlite3/libc" -I"$ROOT/sqlite3" \
|
||||||
-mexec-model=reactor \
|
-mexec-model=reactor \
|
||||||
-msimd128 -mmutable-globals -mmultivalue \
|
-mmutable-globals -mnontrapping-fptoint \
|
||||||
-mbulk-memory -mreference-types \
|
-msimd128 -mbulk-memory -msign-ext \
|
||||||
-mnontrapping-fptoint -msign-ext \
|
-mreference-types -mmultivalue \
|
||||||
-fno-stack-protector -fno-stack-clash-protection \
|
-fno-stack-protector -fno-stack-clash-protection \
|
||||||
-Wl,--stack-first \
|
-Wl,--stack-first \
|
||||||
-Wl,--import-undefined \
|
-Wl,--import-undefined \
|
||||||
@@ -28,6 +28,6 @@ trap 'rm -f sqlite3.tmp' EXIT
|
|||||||
"$BINARYEN/wasm-ctor-eval" -g -c _initialize sqlite3.wasm -o sqlite3.tmp
|
"$BINARYEN/wasm-ctor-eval" -g -c _initialize sqlite3.wasm -o sqlite3.tmp
|
||||||
"$BINARYEN/wasm-opt" -g --strip --strip-producers -c -O3 \
|
"$BINARYEN/wasm-opt" -g --strip --strip-producers -c -O3 \
|
||||||
sqlite3.tmp -o sqlite3.wasm --low-memory-unused \
|
sqlite3.tmp -o sqlite3.wasm --low-memory-unused \
|
||||||
--enable-simd --enable-mutable-globals --enable-multivalue \
|
--enable-mutable-globals --enable-nontrapping-float-to-int \
|
||||||
--enable-bulk-memory --enable-reference-types \
|
--enable-simd --enable-bulk-memory --enable-sign-ext \
|
||||||
--enable-nontrapping-float-to-int --enable-sign-ext
|
--enable-reference-types --enable-multivalue
|
BIN
vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm
generated
vendored
BIN
vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm
generated
vendored
Binary file not shown.
12
vendor/github.com/ncruces/go-sqlite3/stmt.go
generated
vendored
12
vendor/github.com/ncruces/go-sqlite3/stmt.go
generated
vendored
@@ -367,11 +367,9 @@ func (s *Stmt) BindPointer(param int, ptr any) error {
|
|||||||
//
|
//
|
||||||
// https://sqlite.org/c3ref/bind_blob.html
|
// https://sqlite.org/c3ref/bind_blob.html
|
||||||
func (s *Stmt) BindJSON(param int, value any) error {
|
func (s *Stmt) BindJSON(param int, value any) error {
|
||||||
data, err := json.Marshal(value)
|
return json.NewEncoder(callbackWriter(func(p []byte) (int, error) {
|
||||||
if err != nil {
|
return 0, s.BindRawText(param, p[:len(p)-1]) // remove the newline
|
||||||
return err
|
})).Encode(value)
|
||||||
}
|
|
||||||
return s.BindRawText(param, data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BindValue binds a copy of value to the prepared statement.
|
// BindValue binds a copy of value to the prepared statement.
|
||||||
@@ -751,3 +749,7 @@ func (s *Stmt) columns(count int64) ([]byte, ptr_t, error) {
|
|||||||
|
|
||||||
return util.View(s.c.mod, typePtr, count), dataPtr, nil
|
return util.View(s.c.mod, typePtr, count), dataPtr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type callbackWriter func(p []byte) (int, error)
|
||||||
|
|
||||||
|
func (fn callbackWriter) Write(p []byte) (int, error) { return fn(p) }
|
||||||
|
3
vendor/github.com/ncruces/go-sqlite3/vfs/const.go
generated
vendored
3
vendor/github.com/ncruces/go-sqlite3/vfs/const.go
generated
vendored
@@ -234,6 +234,7 @@ const (
|
|||||||
_FCNTL_CKSM_FILE _FcntlOpcode = 41
|
_FCNTL_CKSM_FILE _FcntlOpcode = 41
|
||||||
_FCNTL_RESET_CACHE _FcntlOpcode = 42
|
_FCNTL_RESET_CACHE _FcntlOpcode = 42
|
||||||
_FCNTL_NULL_IO _FcntlOpcode = 43
|
_FCNTL_NULL_IO _FcntlOpcode = 43
|
||||||
|
_FCNTL_BLOCK_ON_CONNECT _FcntlOpcode = 44
|
||||||
)
|
)
|
||||||
|
|
||||||
// https://sqlite.org/c3ref/c_shm_exclusive.html
|
// https://sqlite.org/c3ref/c_shm_exclusive.html
|
||||||
@@ -246,6 +247,6 @@ const (
|
|||||||
_SHM_EXCLUSIVE _ShmFlag = 8
|
_SHM_EXCLUSIVE _ShmFlag = 8
|
||||||
|
|
||||||
_SHM_NLOCK = 8
|
_SHM_NLOCK = 8
|
||||||
_SHM_BASE = 120
|
_SHM_BASE = (22 + _SHM_NLOCK) * 4
|
||||||
_SHM_DMS = _SHM_BASE + _SHM_NLOCK
|
_SHM_DMS = _SHM_BASE + _SHM_NLOCK
|
||||||
)
|
)
|
||||||
|
24
vendor/github.com/ncruces/go-sqlite3/vfs/file.go
generated
vendored
24
vendor/github.com/ncruces/go-sqlite3/vfs/file.go
generated
vendored
@@ -13,22 +13,28 @@ import (
|
|||||||
type vfsOS struct{}
|
type vfsOS struct{}
|
||||||
|
|
||||||
func (vfsOS) FullPathname(path string) (string, error) {
|
func (vfsOS) FullPathname(path string) (string, error) {
|
||||||
path, err := filepath.Abs(path)
|
link, err := evalSymlinks(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return path, testSymlinks(filepath.Dir(path))
|
full, err := filepath.Abs(link)
|
||||||
|
if err == nil && link != path {
|
||||||
|
err = _OK_SYMLINK
|
||||||
|
}
|
||||||
|
return full, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func testSymlinks(path string) error {
|
func evalSymlinks(path string) (string, error) {
|
||||||
p, err := filepath.EvalSymlinks(path)
|
var file string
|
||||||
|
_, err := os.Lstat(path)
|
||||||
|
if errors.Is(err, fs.ErrNotExist) {
|
||||||
|
path, file = filepath.Split(path)
|
||||||
|
}
|
||||||
|
path, err = filepath.EvalSymlinks(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return "", err
|
||||||
}
|
}
|
||||||
if p != path {
|
return filepath.Join(path, file), nil
|
||||||
return _OK_SYMLINK
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vfsOS) Delete(path string, syncDir bool) error {
|
func (vfsOS) Delete(path string, syncDir bool) error {
|
||||||
|
5
vendor/github.com/ncruces/go-sqlite3/vfs/memdb/memdb.go
generated
vendored
5
vendor/github.com/ncruces/go-sqlite3/vfs/memdb/memdb.go
generated
vendored
@@ -28,9 +28,8 @@ func (memVFS) Open(name string, flags vfs.OpenFlag) (vfs.File, vfs.OpenFlag, err
|
|||||||
//
|
//
|
||||||
// We refuse to open all other file types,
|
// We refuse to open all other file types,
|
||||||
// but returning OPEN_MEMORY means SQLite won't ask us to.
|
// but returning OPEN_MEMORY means SQLite won't ask us to.
|
||||||
const types = vfs.OPEN_MAIN_DB |
|
const types = vfs.OPEN_MAIN_DB | vfs.OPEN_TEMP_DB |
|
||||||
vfs.OPEN_TEMP_DB |
|
vfs.OPEN_TRANSIENT_DB | vfs.OPEN_TEMP_JOURNAL
|
||||||
vfs.OPEN_TEMP_JOURNAL
|
|
||||||
if flags&types == 0 {
|
if flags&types == 0 {
|
||||||
// notest // OPEN_MEMORY
|
// notest // OPEN_MEMORY
|
||||||
return nil, flags, sqlite3.CANTOPEN
|
return nil, flags, sqlite3.CANTOPEN
|
||||||
|
1
vendor/github.com/ncruces/go-sqlite3/vfs/shm_windows.go
generated
vendored
1
vendor/github.com/ncruces/go-sqlite3/vfs/shm_windows.go
generated
vendored
@@ -26,7 +26,6 @@ type vfsShm struct {
|
|||||||
ptrs []ptr_t
|
ptrs []ptr_t
|
||||||
stack [1]stk_t
|
stack [1]stk_t
|
||||||
fileLock bool
|
fileLock bool
|
||||||
blocking bool
|
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
vendor/github.com/ncruces/go-sqlite3/vfs/vfs.go
generated
vendored
4
vendor/github.com/ncruces/go-sqlite3/vfs/vfs.go
generated
vendored
@@ -381,6 +381,10 @@ func vfsFileControlImpl(ctx context.Context, mod api.Module, file File, op _Fcnt
|
|||||||
file.SetDB(ctx.Value(util.ConnKey{}))
|
file.SetDB(ctx.Value(util.ConnKey{}))
|
||||||
return _OK
|
return _OK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case _FCNTL_NULL_IO:
|
||||||
|
file.Close()
|
||||||
|
return _OK
|
||||||
}
|
}
|
||||||
|
|
||||||
return _NOTFOUND
|
return _NOTFOUND
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -713,7 +713,7 @@ github.com/modern-go/reflect2
|
|||||||
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
||||||
## explicit
|
## explicit
|
||||||
github.com/munnerz/goautoneg
|
github.com/munnerz/goautoneg
|
||||||
# github.com/ncruces/go-sqlite3 v0.25.2
|
# github.com/ncruces/go-sqlite3 v0.26.0
|
||||||
## explicit; go 1.23.0
|
## explicit; go 1.23.0
|
||||||
github.com/ncruces/go-sqlite3
|
github.com/ncruces/go-sqlite3
|
||||||
github.com/ncruces/go-sqlite3/driver
|
github.com/ncruces/go-sqlite3/driver
|
||||||
|
Reference in New Issue
Block a user