summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/api.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-10-25 16:09:18 +0000
committerLibravatar GitHub <noreply@github.com>2024-10-25 16:09:18 +0000
commit51cb6cae166388110388b128953cd01c781660d8 (patch)
tree5526ecd37d1d60a3394b8a796191407c8cf093c5 /vendor/github.com/ncruces/go-sqlite3/vfs/api.go
parent[bugfix] incorrect /api/v_/instance domain uri fields (#3477) (diff)
downloadgotosocial-51cb6cae166388110388b128953cd01c781660d8.tar.xz
update go-sqlite3 => v0.20.0 (#3483)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/api.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/api.go80
1 files changed, 49 insertions, 31 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/api.go b/vendor/github.com/ncruces/go-sqlite3/vfs/api.go
index e133e8be9..330e8a2b1 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/api.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/api.go
@@ -49,6 +49,13 @@ type File interface {
DeviceCharacteristics() DeviceCharacteristic
}
+// FileUnwrap should be implemented by a File
+// that wraps another File implementation.
+type FileUnwrap interface {
+ File
+ Unwrap() File
+}
+
// FileLockState extends File to implement the
// SQLITE_FCNTL_LOCKSTATE file control opcode.
//
@@ -58,6 +65,26 @@ type FileLockState interface {
LockState() LockLevel
}
+// FilePersistentWAL extends File to implement the
+// SQLITE_FCNTL_PERSIST_WAL file control opcode.
+//
+// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
+type FilePersistentWAL interface {
+ File
+ PersistentWAL() bool
+ SetPersistentWAL(bool)
+}
+
+// FilePowersafeOverwrite extends File to implement the
+// SQLITE_FCNTL_POWERSAFE_OVERWRITE file control opcode.
+//
+// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpowersafeoverwrite
+type FilePowersafeOverwrite interface {
+ File
+ PowersafeOverwrite() bool
+ SetPowersafeOverwrite(bool)
+}
+
// FileChunkSize extends File to implement the
// SQLITE_FCNTL_CHUNK_SIZE file control opcode.
//
@@ -94,26 +121,6 @@ type FileOverwrite interface {
Overwrite() error
}
-// FilePersistentWAL extends File to implement the
-// SQLITE_FCNTL_PERSIST_WAL file control opcode.
-//
-// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
-type FilePersistentWAL interface {
- File
- PersistentWAL() bool
- SetPersistentWAL(bool)
-}
-
-// FilePowersafeOverwrite extends File to implement the
-// SQLITE_FCNTL_POWERSAFE_OVERWRITE file control opcode.
-//
-// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpowersafeoverwrite
-type FilePowersafeOverwrite interface {
- File
- PowersafeOverwrite() bool
- SetPowersafeOverwrite(bool)
-}
-
// FileCommitPhaseTwo extends File to implement the
// SQLITE_FCNTL_COMMIT_PHASETWO file control opcode.
//
@@ -135,15 +142,6 @@ type FileBatchAtomicWrite interface {
RollbackAtomicWrite() error
}
-// FilePragma extends File to implement the
-// SQLITE_FCNTL_PRAGMA file control opcode.
-//
-// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpragma
-type FilePragma interface {
- File
- Pragma(name, value string) (string, error)
-}
-
// FileCheckpoint extends File to implement the
// SQLITE_FCNTL_CKPT_START and SQLITE_FCNTL_CKPT_DONE
// file control opcodes.
@@ -151,8 +149,17 @@ type FilePragma interface {
// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlckptstart
type FileCheckpoint interface {
File
- CheckpointDone() error
- CheckpointStart() error
+ CheckpointStart()
+ CheckpointDone()
+}
+
+// FilePragma extends File to implement the
+// SQLITE_FCNTL_PRAGMA file control opcode.
+//
+// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpragma
+type FilePragma interface {
+ File
+ Pragma(name, value string) (string, error)
}
// FileSharedMemory extends File to possibly implement
@@ -171,5 +178,16 @@ type SharedMemory interface {
shmMap(context.Context, api.Module, int32, int32, bool) (uint32, _ErrorCode)
shmLock(int32, int32, _ShmFlag) _ErrorCode
shmUnmap(bool)
+ shmBarrier()
io.Closer
}
+
+type blockingSharedMemory interface {
+ SharedMemory
+ shmEnableBlocking(block bool)
+}
+
+type fileControl interface {
+ File
+ fileControl(ctx context.Context, mod api.Module, op _FcntlOpcode, pArg uint32) _ErrorCode
+}