diff options
author | 2024-09-14 16:36:25 +0200 | |
---|---|---|
committer | 2024-09-14 16:36:25 +0200 | |
commit | 4fa0d412023ffdefc4ba63eecccd4b74e712ff7d (patch) | |
tree | 02ad2eb48c195eb52e22e6152909f45c7cae58f6 /vendor/github.com/ncruces/go-sqlite3/config.go | |
parent | [feature/frontend] Add dark version of brutalist theme (#3294) (diff) | |
download | gotosocial-4fa0d412023ffdefc4ba63eecccd4b74e712ff7d.tar.xz |
[chore] Update go-sqlite3 to 0.18.3 (#3295)
* [chore] Update go-sqlite3 to 0.18.3
* [chore] Fix getting the sqlite3.Conn
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/config.go')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/config.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/config.go b/vendor/github.com/ncruces/go-sqlite3/config.go index 3f60b8fe9..c1154b2f5 100644 --- a/vendor/github.com/ncruces/go-sqlite3/config.go +++ b/vendor/github.com/ncruces/go-sqlite3/config.go @@ -294,3 +294,17 @@ func autoVacuumCallback(ctx context.Context, mod api.Module, pApp, zSchema, nDbP schema := util.ReadString(mod, zSchema, _MAX_NAME) return uint32(fn(schema, uint(nDbPage), uint(nFreePage), uint(nBytePerPage))) } + +// SoftHeapLimit imposes a soft limit on heap size. +// +// https://sqlite.org/c3ref/hard_heap_limit64.html +func (c *Conn) SoftHeapLimit(n int64) int64 { + return int64(c.call("sqlite3_soft_heap_limit64", uint64(n))) +} + +// SoftHeapLimit imposes a hard limit on heap size. +// +// https://sqlite.org/c3ref/hard_heap_limit64.html +func (c *Conn) HardHeapLimit(n int64) int64 { + return int64(c.call("sqlite3_hard_heap_limit64", uint64(n))) +} |