mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
SQLITE_FCNTL_BUSYHANDLER.
This commit is contained in:
@@ -46,8 +46,8 @@ func WrapPersistWAL(f vfs.File) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// WrapSetPersistentWAL helps wrap [vfs.FilePersistWAL].
|
||||
func WrapSetPersistentWAL(f vfs.File, keepWAL bool) {
|
||||
// WrapSetPersistWAL helps wrap [vfs.FilePersistWAL].
|
||||
func WrapSetPersistWAL(f vfs.File, keepWAL bool) {
|
||||
if f, ok := f.(vfs.FilePersistWAL); ok {
|
||||
f.SetPersistWAL(keepWAL)
|
||||
}
|
||||
@@ -99,6 +99,14 @@ func WrapOverwrite(f vfs.File) error {
|
||||
return sqlite3.NOTFOUND
|
||||
}
|
||||
|
||||
// WrapSyncSuper helps wrap [vfs.FileSync].
|
||||
func WrapSyncSuper(f vfs.File, super string) error {
|
||||
if f, ok := f.(vfs.FileSync); ok {
|
||||
return f.SyncSuper(super)
|
||||
}
|
||||
return sqlite3.NOTFOUND
|
||||
}
|
||||
|
||||
// WrapCommitPhaseTwo helps wrap [vfs.FileCommitPhaseTwo].
|
||||
func WrapCommitPhaseTwo(f vfs.File) error {
|
||||
if f, ok := f.(vfs.FileCommitPhaseTwo); ok {
|
||||
@@ -153,6 +161,13 @@ func WrapPragma(f vfs.File, name, value string) (string, error) {
|
||||
return "", sqlite3.NOTFOUND
|
||||
}
|
||||
|
||||
// WrapBusyHandler helps wrap [vfs.FilePragma].
|
||||
func WrapBusyHandler(f vfs.File, handler func() bool) {
|
||||
if f, ok := f.(vfs.FileBusyHandler); ok {
|
||||
f.BusyHandler(handler)
|
||||
}
|
||||
}
|
||||
|
||||
// WrapSharedMemory helps wrap [vfs.FileSharedMemory].
|
||||
func WrapSharedMemory(f vfs.File) vfs.SharedMemory {
|
||||
if f, ok := f.(vfs.FileSharedMemory); ok {
|
||||
|
||||
Reference in New Issue
Block a user