mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
Weight-balanced trees.
This commit is contained in:
4
go.mod
4
go.mod
@@ -3,9 +3,9 @@ module github.com/ncruces/go-sqlite3
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/ncruces/aa v0.3.5
|
||||
github.com/ncruces/julianday v1.0.0
|
||||
github.com/ncruces/sort v0.1.5
|
||||
github.com/ncruces/sort v0.1.6
|
||||
github.com/ncruces/wbt v0.1.0
|
||||
github.com/tetratelabs/wazero v1.9.0
|
||||
golang.org/x/sys v0.36.0
|
||||
)
|
||||
|
||||
8
go.sum
8
go.sum
@@ -2,12 +2,12 @@ github.com/dchest/siphash v1.2.3 h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA=
|
||||
github.com/dchest/siphash v1.2.3/go.mod h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/ncruces/aa v0.3.5 h1:zVUBi8FS7Ah0IuoXQv9JPis4KFuQdIzzf48vuOrxiW0=
|
||||
github.com/ncruces/aa v0.3.5/go.mod h1:ctOw1LVqfuqzqg2S9LlR045bLAiXtaTiPMCL3zzl7Ik=
|
||||
github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M=
|
||||
github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
|
||||
github.com/ncruces/sort v0.1.5 h1:fiFWXXAqKI8QckPf/6hu/bGFwcEPrirIOFaJqWujs4k=
|
||||
github.com/ncruces/sort v0.1.5/go.mod h1:obJToO4rYr6VWP0Uw5FYymgYGt3Br4RXcs/JdKaXAPk=
|
||||
github.com/ncruces/sort v0.1.6 h1:TrsJfGRH1AoWoaeB4/+gCohot9+cA6u/INaH5agIhNk=
|
||||
github.com/ncruces/sort v0.1.6/go.mod h1:obJToO4rYr6VWP0Uw5FYymgYGt3Br4RXcs/JdKaXAPk=
|
||||
github.com/ncruces/wbt v0.1.0 h1:DnekGqKcV3qnItd59CwldIAwvbosmWNddPPJSp9t2jk=
|
||||
github.com/ncruces/wbt v0.1.0/go.mod h1:DtF92amvMxH69EmBFUSFWRDAlo6hOEfoNQnClxj9C/c=
|
||||
github.com/psanford/httpreadat v0.1.0 h1:VleW1HS2zO7/4c7c7zNl33fO6oYACSagjJIyMIwZLUE=
|
||||
github.com/psanford/httpreadat v0.1.0/go.mod h1:Zg7P+TlBm3bYbyHTKv/EdtSJZn3qwbPwpfZ/I9GKCRE=
|
||||
github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I=
|
||||
|
||||
@@ -4,6 +4,8 @@ set -euo pipefail
|
||||
cd -P -- "$(dirname -- "$0")"
|
||||
|
||||
curl -#OL "https://sqlite.org/2025/sqlite-amalgamation-3500400.zip"
|
||||
openssl dgst -sha3-256 sqlite-amalgamation-*.zip | \
|
||||
grep f131b68e6ba5fb891cc13ebb5ff9555054c77294cb92d8d1268bad5dba4fa2a1
|
||||
unzip -d . sqlite-amalgamation-*.zip
|
||||
mv sqlite-amalgamation-*/sqlite3.c .
|
||||
mv sqlite-amalgamation-*/sqlite3.h .
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ncruces/aa"
|
||||
"github.com/ncruces/go-sqlite3"
|
||||
"github.com/ncruces/go-sqlite3/util/vfsutil"
|
||||
"github.com/ncruces/go-sqlite3/vfs"
|
||||
"github.com/ncruces/wbt"
|
||||
)
|
||||
|
||||
type mvccVFS struct{}
|
||||
@@ -68,9 +68,9 @@ func (mvccVFS) FullPathname(name string) (string, error) {
|
||||
}
|
||||
|
||||
type mvccDB struct {
|
||||
data *aa.Tree[int64, string] // +checklocks:mtx
|
||||
owner *mvccFile // +checklocks:mtx
|
||||
waiter *sync.Cond // +checklocks:mtx
|
||||
data *wbt.Tree[int64, string] // +checklocks:mtx
|
||||
owner *mvccFile // +checklocks:mtx
|
||||
waiter *sync.Cond // +checklocks:mtx
|
||||
|
||||
name string
|
||||
refs int // +checklocks:memoryMtx
|
||||
@@ -97,7 +97,7 @@ func (m *mvccDB) fork() *mvccDB {
|
||||
|
||||
type mvccFile struct {
|
||||
*mvccDB
|
||||
data *aa.Tree[int64, string]
|
||||
data *wbt.Tree[int64, string]
|
||||
lock vfs.LockLevel
|
||||
readOnly bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user