package vfs

Import Path
	github.com/ncruces/go-sqlite3/vfs (on go.dev)

Dependency Relation
	imports 23 packages, and imported by 2 packages


Package-Level Type Names (total 25)
/* sort by: | */
AccessFlag is a flag for the [VFS] Access method. https://sqlite.org/c3ref/c_access_exists.html func VFS.Access(name string, flags AccessFlag) (bool, error) func VFSFilename.Access(name string, flags AccessFlag) (bool, error) const ACCESS_EXISTS const ACCESS_READ const ACCESS_READWRITE
DeviceCharacteristic is a flag retuned by the [File] DeviceCharacteristics method. https://sqlite.org/c3ref/c_iocap_atomic.html func File.DeviceCharacteristics() DeviceCharacteristic func FileBatchAtomicWrite.DeviceCharacteristics() DeviceCharacteristic func FileBusyHandler.DeviceCharacteristics() DeviceCharacteristic func FileCheckpoint.DeviceCharacteristics() DeviceCharacteristic func FileChunkSize.DeviceCharacteristics() DeviceCharacteristic func FileCommitPhaseTwo.DeviceCharacteristics() DeviceCharacteristic func FileHasMoved.DeviceCharacteristics() DeviceCharacteristic func FileLockState.DeviceCharacteristics() DeviceCharacteristic func FileOverwrite.DeviceCharacteristics() DeviceCharacteristic func FilePersistWAL.DeviceCharacteristics() DeviceCharacteristic func FilePowersafeOverwrite.DeviceCharacteristics() DeviceCharacteristic func FilePragma.DeviceCharacteristics() DeviceCharacteristic func FileSharedMemory.DeviceCharacteristics() DeviceCharacteristic func FileSizeHint.DeviceCharacteristics() DeviceCharacteristic func FileSync.DeviceCharacteristics() DeviceCharacteristic func FileUnwrap.DeviceCharacteristics() DeviceCharacteristic const IOCAP_ATOMIC const IOCAP_ATOMIC16K const IOCAP_ATOMIC1K const IOCAP_ATOMIC2K const IOCAP_ATOMIC32K const IOCAP_ATOMIC4K const IOCAP_ATOMIC512 const IOCAP_ATOMIC64K const IOCAP_ATOMIC8K const IOCAP_BATCH_ATOMIC const IOCAP_IMMUTABLE const IOCAP_POWERSAFE_OVERWRITE const IOCAP_SAFE_APPEND const IOCAP_SEQUENTIAL const IOCAP_SUBPAGE_READ const IOCAP_UNDELETABLE_WHEN_OPEN
A File represents an open file in the OS interface layer. Use sqlite3.ErrorCode or sqlite3.ExtendedErrorCode to return specific error codes to SQLite. In particular, sqlite3.BUSY is necessary to correctly implement lock methods. https://sqlite.org/c3ref/io_methods.html ( File) CheckReservedLock() (bool, error) ( File) Close() error ( File) DeviceCharacteristics() DeviceCharacteristic ( File) Lock(lock LockLevel) error ( File) ReadAt(p []byte, off int64) (n int, err error) ( File) SectorSize() int ( File) Size() (int64, error) ( File) Sync(flags SyncFlag) error ( File) Truncate(size int64) error ( File) Unlock(lock LockLevel) error ( File) WriteAt(p []byte, off int64) (n int, err error) FileBatchAtomicWrite (interface) FileBusyHandler (interface) FileCheckpoint (interface) FileChunkSize (interface) FileCommitPhaseTwo (interface) FileHasMoved (interface) FileLockState (interface) FileOverwrite (interface) FilePersistWAL (interface) FilePowersafeOverwrite (interface) FilePragma (interface) FileSharedMemory (interface) FileSizeHint (interface) FileSync (interface) FileUnwrap (interface) File : github.com/polarsignals/wal/types.ReadableFile File : github.com/prometheus/common/expfmt.Closer File : io.Closer File : io.ReaderAt File : io.WriterAt func (*Filename).DatabaseFile() File func FileUnwrap.Unwrap() File func VFS.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.OpenFilename(name *Filename, flags OpenFlag) (File, OpenFlag, error)
FileBatchAtomicWrite extends File to implement the SQLITE_FCNTL_BEGIN_ATOMIC_WRITE, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE and SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE file control opcodes. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbeginatomicwrite ( FileBatchAtomicWrite) BeginAtomicWrite() error ( FileBatchAtomicWrite) CheckReservedLock() (bool, error) ( FileBatchAtomicWrite) Close() error ( FileBatchAtomicWrite) CommitAtomicWrite() error ( FileBatchAtomicWrite) DeviceCharacteristics() DeviceCharacteristic ( FileBatchAtomicWrite) Lock(lock LockLevel) error ( FileBatchAtomicWrite) ReadAt(p []byte, off int64) (n int, err error) ( FileBatchAtomicWrite) RollbackAtomicWrite() error ( FileBatchAtomicWrite) SectorSize() int ( FileBatchAtomicWrite) Size() (int64, error) ( FileBatchAtomicWrite) Sync(flags SyncFlag) error ( FileBatchAtomicWrite) Truncate(size int64) error ( FileBatchAtomicWrite) Unlock(lock LockLevel) error ( FileBatchAtomicWrite) WriteAt(p []byte, off int64) (n int, err error) FileBatchAtomicWrite : File FileBatchAtomicWrite : github.com/polarsignals/wal/types.ReadableFile FileBatchAtomicWrite : github.com/prometheus/common/expfmt.Closer FileBatchAtomicWrite : io.Closer FileBatchAtomicWrite : io.ReaderAt FileBatchAtomicWrite : io.WriterAt
FileBusyHandler extends File to implement the SQLITE_FCNTL_BUSYHANDLER file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbusyhandler ( FileBusyHandler) BusyHandler(func() bool) ( FileBusyHandler) CheckReservedLock() (bool, error) ( FileBusyHandler) Close() error ( FileBusyHandler) DeviceCharacteristics() DeviceCharacteristic ( FileBusyHandler) Lock(lock LockLevel) error ( FileBusyHandler) ReadAt(p []byte, off int64) (n int, err error) ( FileBusyHandler) SectorSize() int ( FileBusyHandler) Size() (int64, error) ( FileBusyHandler) Sync(flags SyncFlag) error ( FileBusyHandler) Truncate(size int64) error ( FileBusyHandler) Unlock(lock LockLevel) error ( FileBusyHandler) WriteAt(p []byte, off int64) (n int, err error) FileBusyHandler : File FileBusyHandler : github.com/polarsignals/wal/types.ReadableFile FileBusyHandler : github.com/prometheus/common/expfmt.Closer FileBusyHandler : io.Closer FileBusyHandler : io.ReaderAt FileBusyHandler : io.WriterAt
FileCheckpoint extends File to implement the SQLITE_FCNTL_CKPT_START and SQLITE_FCNTL_CKPT_DONE file control opcodes. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlckptstart ( FileCheckpoint) CheckReservedLock() (bool, error) ( FileCheckpoint) CheckpointDone() ( FileCheckpoint) CheckpointStart() ( FileCheckpoint) Close() error ( FileCheckpoint) DeviceCharacteristics() DeviceCharacteristic ( FileCheckpoint) Lock(lock LockLevel) error ( FileCheckpoint) ReadAt(p []byte, off int64) (n int, err error) ( FileCheckpoint) SectorSize() int ( FileCheckpoint) Size() (int64, error) ( FileCheckpoint) Sync(flags SyncFlag) error ( FileCheckpoint) Truncate(size int64) error ( FileCheckpoint) Unlock(lock LockLevel) error ( FileCheckpoint) WriteAt(p []byte, off int64) (n int, err error) FileCheckpoint : File FileCheckpoint : github.com/polarsignals/wal/types.ReadableFile FileCheckpoint : github.com/prometheus/common/expfmt.Closer FileCheckpoint : io.Closer FileCheckpoint : io.ReaderAt FileCheckpoint : io.WriterAt
FileChunkSize extends File to implement the SQLITE_FCNTL_CHUNK_SIZE file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlchunksize ( FileChunkSize) CheckReservedLock() (bool, error) ( FileChunkSize) ChunkSize(size int) ( FileChunkSize) Close() error ( FileChunkSize) DeviceCharacteristics() DeviceCharacteristic ( FileChunkSize) Lock(lock LockLevel) error ( FileChunkSize) ReadAt(p []byte, off int64) (n int, err error) ( FileChunkSize) SectorSize() int ( FileChunkSize) Size() (int64, error) ( FileChunkSize) Sync(flags SyncFlag) error ( FileChunkSize) Truncate(size int64) error ( FileChunkSize) Unlock(lock LockLevel) error ( FileChunkSize) WriteAt(p []byte, off int64) (n int, err error) FileChunkSize : File FileChunkSize : github.com/polarsignals/wal/types.ReadableFile FileChunkSize : github.com/prometheus/common/expfmt.Closer FileChunkSize : io.Closer FileChunkSize : io.ReaderAt FileChunkSize : io.WriterAt
FileCommitPhaseTwo extends File to implement the SQLITE_FCNTL_COMMIT_PHASETWO file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitphasetwo ( FileCommitPhaseTwo) CheckReservedLock() (bool, error) ( FileCommitPhaseTwo) Close() error ( FileCommitPhaseTwo) CommitPhaseTwo() error ( FileCommitPhaseTwo) DeviceCharacteristics() DeviceCharacteristic ( FileCommitPhaseTwo) Lock(lock LockLevel) error ( FileCommitPhaseTwo) ReadAt(p []byte, off int64) (n int, err error) ( FileCommitPhaseTwo) SectorSize() int ( FileCommitPhaseTwo) Size() (int64, error) ( FileCommitPhaseTwo) Sync(flags SyncFlag) error ( FileCommitPhaseTwo) Truncate(size int64) error ( FileCommitPhaseTwo) Unlock(lock LockLevel) error ( FileCommitPhaseTwo) WriteAt(p []byte, off int64) (n int, err error) FileCommitPhaseTwo : File FileCommitPhaseTwo : github.com/polarsignals/wal/types.ReadableFile FileCommitPhaseTwo : github.com/prometheus/common/expfmt.Closer FileCommitPhaseTwo : io.Closer FileCommitPhaseTwo : io.ReaderAt FileCommitPhaseTwo : io.WriterAt
FileHasMoved extends File to implement the SQLITE_FCNTL_HAS_MOVED file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlhasmoved ( FileHasMoved) CheckReservedLock() (bool, error) ( FileHasMoved) Close() error ( FileHasMoved) DeviceCharacteristics() DeviceCharacteristic ( FileHasMoved) HasMoved() (bool, error) ( FileHasMoved) Lock(lock LockLevel) error ( FileHasMoved) ReadAt(p []byte, off int64) (n int, err error) ( FileHasMoved) SectorSize() int ( FileHasMoved) Size() (int64, error) ( FileHasMoved) Sync(flags SyncFlag) error ( FileHasMoved) Truncate(size int64) error ( FileHasMoved) Unlock(lock LockLevel) error ( FileHasMoved) WriteAt(p []byte, off int64) (n int, err error) FileHasMoved : File FileHasMoved : github.com/polarsignals/wal/types.ReadableFile FileHasMoved : github.com/prometheus/common/expfmt.Closer FileHasMoved : io.Closer FileHasMoved : io.ReaderAt FileHasMoved : io.WriterAt
FileLockState extends File to implement the SQLITE_FCNTL_LOCKSTATE file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntllockstate ( FileLockState) CheckReservedLock() (bool, error) ( FileLockState) Close() error ( FileLockState) DeviceCharacteristics() DeviceCharacteristic ( FileLockState) Lock(lock LockLevel) error ( FileLockState) LockState() LockLevel ( FileLockState) ReadAt(p []byte, off int64) (n int, err error) ( FileLockState) SectorSize() int ( FileLockState) Size() (int64, error) ( FileLockState) Sync(flags SyncFlag) error ( FileLockState) Truncate(size int64) error ( FileLockState) Unlock(lock LockLevel) error ( FileLockState) WriteAt(p []byte, off int64) (n int, err error) FileLockState : File FileLockState : github.com/polarsignals/wal/types.ReadableFile FileLockState : github.com/prometheus/common/expfmt.Closer FileLockState : io.Closer FileLockState : io.ReaderAt FileLockState : io.WriterAt
Filename is used by SQLite to pass filenames to the Open method of a VFS. https://sqlite.org/c3ref/filename.html Database returns the name of the corresponding database file. https://sqlite.org/c3ref/filename_database.html DatabaseFile returns the main database [File] corresponding to a journal. https://sqlite.org/c3ref/database_file_object.html Journal returns the name of the corresponding rollback journal file. https://sqlite.org/c3ref/filename_database.html String returns this filename as a string. URIParameter returns the value of a URI parameter. https://sqlite.org/c3ref/uri_boolean.html URIParameters obtains values for URI parameters. https://sqlite.org/c3ref/uri_boolean.html WAL returns the name of the corresponding WAL file. https://sqlite.org/c3ref/filename_database.html *Filename : expvar.Var *Filename : fmt.Stringer func GetFilename(ctx context.Context, mod api.Module, id ptr_t, flags OpenFlag) *Filename func github.com/ncruces/go-sqlite3.(*Conn).Filename(schema string) *Filename func VFSFilename.OpenFilename(name *Filename, flags OpenFlag) (File, OpenFlag, error)
FileOverwrite extends File to implement the SQLITE_FCNTL_OVERWRITE file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntloverwrite ( FileOverwrite) CheckReservedLock() (bool, error) ( FileOverwrite) Close() error ( FileOverwrite) DeviceCharacteristics() DeviceCharacteristic ( FileOverwrite) Lock(lock LockLevel) error ( FileOverwrite) Overwrite() error ( FileOverwrite) ReadAt(p []byte, off int64) (n int, err error) ( FileOverwrite) SectorSize() int ( FileOverwrite) Size() (int64, error) ( FileOverwrite) Sync(flags SyncFlag) error ( FileOverwrite) Truncate(size int64) error ( FileOverwrite) Unlock(lock LockLevel) error ( FileOverwrite) WriteAt(p []byte, off int64) (n int, err error) FileOverwrite : File FileOverwrite : github.com/polarsignals/wal/types.ReadableFile FileOverwrite : github.com/prometheus/common/expfmt.Closer FileOverwrite : io.Closer FileOverwrite : io.ReaderAt FileOverwrite : io.WriterAt
FilePersistWAL extends File to implement the SQLITE_FCNTL_PERSIST_WAL file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal ( FilePersistWAL) CheckReservedLock() (bool, error) ( FilePersistWAL) Close() error ( FilePersistWAL) DeviceCharacteristics() DeviceCharacteristic ( FilePersistWAL) Lock(lock LockLevel) error ( FilePersistWAL) PersistWAL() bool ( FilePersistWAL) ReadAt(p []byte, off int64) (n int, err error) ( FilePersistWAL) SectorSize() int ( FilePersistWAL) SetPersistWAL(bool) ( FilePersistWAL) Size() (int64, error) ( FilePersistWAL) Sync(flags SyncFlag) error ( FilePersistWAL) Truncate(size int64) error ( FilePersistWAL) Unlock(lock LockLevel) error ( FilePersistWAL) WriteAt(p []byte, off int64) (n int, err error) FilePersistWAL : File FilePersistWAL : github.com/polarsignals/wal/types.ReadableFile FilePersistWAL : github.com/prometheus/common/expfmt.Closer FilePersistWAL : io.Closer FilePersistWAL : io.ReaderAt FilePersistWAL : io.WriterAt
FilePowersafeOverwrite extends File to implement the SQLITE_FCNTL_POWERSAFE_OVERWRITE file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpowersafeoverwrite ( FilePowersafeOverwrite) CheckReservedLock() (bool, error) ( FilePowersafeOverwrite) Close() error ( FilePowersafeOverwrite) DeviceCharacteristics() DeviceCharacteristic ( FilePowersafeOverwrite) Lock(lock LockLevel) error ( FilePowersafeOverwrite) PowersafeOverwrite() bool ( FilePowersafeOverwrite) ReadAt(p []byte, off int64) (n int, err error) ( FilePowersafeOverwrite) SectorSize() int ( FilePowersafeOverwrite) SetPowersafeOverwrite(bool) ( FilePowersafeOverwrite) Size() (int64, error) ( FilePowersafeOverwrite) Sync(flags SyncFlag) error ( FilePowersafeOverwrite) Truncate(size int64) error ( FilePowersafeOverwrite) Unlock(lock LockLevel) error ( FilePowersafeOverwrite) WriteAt(p []byte, off int64) (n int, err error) FilePowersafeOverwrite : File FilePowersafeOverwrite : github.com/polarsignals/wal/types.ReadableFile FilePowersafeOverwrite : github.com/prometheus/common/expfmt.Closer FilePowersafeOverwrite : io.Closer FilePowersafeOverwrite : io.ReaderAt FilePowersafeOverwrite : io.WriterAt
FilePragma extends File to implement the SQLITE_FCNTL_PRAGMA file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpragma ( FilePragma) CheckReservedLock() (bool, error) ( FilePragma) Close() error ( FilePragma) DeviceCharacteristics() DeviceCharacteristic ( FilePragma) Lock(lock LockLevel) error ( FilePragma) Pragma(name, value string) (string, error) ( FilePragma) ReadAt(p []byte, off int64) (n int, err error) ( FilePragma) SectorSize() int ( FilePragma) Size() (int64, error) ( FilePragma) Sync(flags SyncFlag) error ( FilePragma) Truncate(size int64) error ( FilePragma) Unlock(lock LockLevel) error ( FilePragma) WriteAt(p []byte, off int64) (n int, err error) FilePragma : File FilePragma : github.com/polarsignals/wal/types.ReadableFile FilePragma : github.com/prometheus/common/expfmt.Closer FilePragma : io.Closer FilePragma : io.ReaderAt FilePragma : io.WriterAt
FileSharedMemory extends File to possibly implement shared-memory for the WAL-index. The same shared-memory instance must be returned for the entire life of the file. It's OK for SharedMemory to return nil. ( FileSharedMemory) CheckReservedLock() (bool, error) ( FileSharedMemory) Close() error ( FileSharedMemory) DeviceCharacteristics() DeviceCharacteristic ( FileSharedMemory) Lock(lock LockLevel) error ( FileSharedMemory) ReadAt(p []byte, off int64) (n int, err error) ( FileSharedMemory) SectorSize() int ( FileSharedMemory) SharedMemory() SharedMemory ( FileSharedMemory) Size() (int64, error) ( FileSharedMemory) Sync(flags SyncFlag) error ( FileSharedMemory) Truncate(size int64) error ( FileSharedMemory) Unlock(lock LockLevel) error ( FileSharedMemory) WriteAt(p []byte, off int64) (n int, err error) FileSharedMemory : File FileSharedMemory : github.com/polarsignals/wal/types.ReadableFile FileSharedMemory : github.com/prometheus/common/expfmt.Closer FileSharedMemory : io.Closer FileSharedMemory : io.ReaderAt FileSharedMemory : io.WriterAt
FileSizeHint extends File to implement the SQLITE_FCNTL_SIZE_HINT file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizehint ( FileSizeHint) CheckReservedLock() (bool, error) ( FileSizeHint) Close() error ( FileSizeHint) DeviceCharacteristics() DeviceCharacteristic ( FileSizeHint) Lock(lock LockLevel) error ( FileSizeHint) ReadAt(p []byte, off int64) (n int, err error) ( FileSizeHint) SectorSize() int ( FileSizeHint) Size() (int64, error) ( FileSizeHint) SizeHint(size int64) error ( FileSizeHint) Sync(flags SyncFlag) error ( FileSizeHint) Truncate(size int64) error ( FileSizeHint) Unlock(lock LockLevel) error ( FileSizeHint) WriteAt(p []byte, off int64) (n int, err error) FileSizeHint : File FileSizeHint : github.com/polarsignals/wal/types.ReadableFile FileSizeHint : github.com/prometheus/common/expfmt.Closer FileSizeHint : io.Closer FileSizeHint : io.ReaderAt FileSizeHint : io.WriterAt
FileSync extends File to implement the SQLITE_FCNTL_SYNC file control opcode. https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsync ( FileSync) CheckReservedLock() (bool, error) ( FileSync) Close() error ( FileSync) DeviceCharacteristics() DeviceCharacteristic ( FileSync) Lock(lock LockLevel) error ( FileSync) ReadAt(p []byte, off int64) (n int, err error) ( FileSync) SectorSize() int ( FileSync) Size() (int64, error) ( FileSync) Sync(flags SyncFlag) error ( FileSync) SyncSuper(super string) error ( FileSync) Truncate(size int64) error ( FileSync) Unlock(lock LockLevel) error ( FileSync) WriteAt(p []byte, off int64) (n int, err error) FileSync : File FileSync : github.com/polarsignals/wal/types.ReadableFile FileSync : github.com/prometheus/common/expfmt.Closer FileSync : io.Closer FileSync : io.ReaderAt FileSync : io.WriterAt
FileUnwrap should be implemented by a File that wraps another File implementation. ( FileUnwrap) CheckReservedLock() (bool, error) ( FileUnwrap) Close() error ( FileUnwrap) DeviceCharacteristics() DeviceCharacteristic ( FileUnwrap) Lock(lock LockLevel) error ( FileUnwrap) ReadAt(p []byte, off int64) (n int, err error) ( FileUnwrap) SectorSize() int ( FileUnwrap) Size() (int64, error) ( FileUnwrap) Sync(flags SyncFlag) error ( FileUnwrap) Truncate(size int64) error ( FileUnwrap) Unlock(lock LockLevel) error ( FileUnwrap) Unwrap() File ( FileUnwrap) WriteAt(p []byte, off int64) (n int, err error) FileUnwrap : File FileUnwrap : github.com/polarsignals/wal/types.ReadableFile FileUnwrap : github.com/prometheus/common/expfmt.Closer FileUnwrap : io.Closer FileUnwrap : io.ReaderAt FileUnwrap : io.WriterAt
LockLevel is a value used with [File] Lock and Unlock methods. https://sqlite.org/c3ref/c_lock_exclusive.html func FileLockState.LockState() LockLevel func File.Lock(lock LockLevel) error func File.Unlock(lock LockLevel) error func FileBatchAtomicWrite.Lock(lock LockLevel) error func FileBatchAtomicWrite.Unlock(lock LockLevel) error func FileBusyHandler.Lock(lock LockLevel) error func FileBusyHandler.Unlock(lock LockLevel) error func FileCheckpoint.Lock(lock LockLevel) error func FileCheckpoint.Unlock(lock LockLevel) error func FileChunkSize.Lock(lock LockLevel) error func FileChunkSize.Unlock(lock LockLevel) error func FileCommitPhaseTwo.Lock(lock LockLevel) error func FileCommitPhaseTwo.Unlock(lock LockLevel) error func FileHasMoved.Lock(lock LockLevel) error func FileHasMoved.Unlock(lock LockLevel) error func FileLockState.Lock(lock LockLevel) error func FileLockState.Unlock(lock LockLevel) error func FileOverwrite.Lock(lock LockLevel) error func FileOverwrite.Unlock(lock LockLevel) error func FilePersistWAL.Lock(lock LockLevel) error func FilePersistWAL.Unlock(lock LockLevel) error func FilePowersafeOverwrite.Lock(lock LockLevel) error func FilePowersafeOverwrite.Unlock(lock LockLevel) error func FilePragma.Lock(lock LockLevel) error func FilePragma.Unlock(lock LockLevel) error func FileSharedMemory.Lock(lock LockLevel) error func FileSharedMemory.Unlock(lock LockLevel) error func FileSizeHint.Lock(lock LockLevel) error func FileSizeHint.Unlock(lock LockLevel) error func FileSync.Lock(lock LockLevel) error func FileSync.Unlock(lock LockLevel) error func FileUnwrap.Lock(lock LockLevel) error func FileUnwrap.Unlock(lock LockLevel) error const LOCK_EXCLUSIVE const LOCK_NONE const LOCK_PENDING const LOCK_RESERVED const LOCK_SHARED
OpenFlag is a flag for the [VFS] Open method. https://sqlite.org/c3ref/c_open_autoproxy.html func VFS.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.OpenFilename(name *Filename, flags OpenFlag) (File, OpenFlag, error) func GetFilename(ctx context.Context, mod api.Module, id ptr_t, flags OpenFlag) *Filename func NewSharedMemory(path string, flags OpenFlag) SharedMemory func VFS.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.Open(name string, flags OpenFlag) (File, OpenFlag, error) func VFSFilename.OpenFilename(name *Filename, flags OpenFlag) (File, OpenFlag, error) const OPEN_AUTOPROXY const OPEN_CREATE const OPEN_DELETEONCLOSE const OPEN_EXCLUSIVE const OPEN_FULLMUTEX const OPEN_MAIN_DB const OPEN_MAIN_JOURNAL const OPEN_MEMORY const OPEN_NOFOLLOW const OPEN_NOMUTEX const OPEN_PRIVATECACHE const OPEN_READONLY const OPEN_READWRITE const OPEN_SHAREDCACHE const OPEN_SUBJOURNAL const OPEN_SUPER_JOURNAL const OPEN_TEMP_DB const OPEN_TEMP_JOURNAL const OPEN_TRANSIENT_DB const OPEN_URI const OPEN_WAL
SharedMemory is a shared-memory WAL-index implementation. Use [NewSharedMemory] to create a shared-memory. ( SharedMemory) Close() error SharedMemory : github.com/prometheus/common/expfmt.Closer SharedMemory : io.Closer func NewSharedMemory(path string, flags OpenFlag) SharedMemory func FileSharedMemory.SharedMemory() SharedMemory
SyncFlag is a flag for the [File] Sync method. https://sqlite.org/c3ref/c_sync_dataonly.html func File.Sync(flags SyncFlag) error func FileBatchAtomicWrite.Sync(flags SyncFlag) error func FileBusyHandler.Sync(flags SyncFlag) error func FileCheckpoint.Sync(flags SyncFlag) error func FileChunkSize.Sync(flags SyncFlag) error func FileCommitPhaseTwo.Sync(flags SyncFlag) error func FileHasMoved.Sync(flags SyncFlag) error func FileLockState.Sync(flags SyncFlag) error func FileOverwrite.Sync(flags SyncFlag) error func FilePersistWAL.Sync(flags SyncFlag) error func FilePowersafeOverwrite.Sync(flags SyncFlag) error func FilePragma.Sync(flags SyncFlag) error func FileSharedMemory.Sync(flags SyncFlag) error func FileSizeHint.Sync(flags SyncFlag) error func FileSync.Sync(flags SyncFlag) error func FileUnwrap.Sync(flags SyncFlag) error const SYNC_DATAONLY const SYNC_FULL const SYNC_NORMAL
A VFS defines the interface between the SQLite core and the underlying operating system. Use sqlite3.ErrorCode or sqlite3.ExtendedErrorCode to return specific error codes to SQLite. https://sqlite.org/c3ref/vfs.html ( VFS) Access(name string, flags AccessFlag) (bool, error) ( VFS) Delete(name string, syncDir bool) error ( VFS) FullPathname(name string) (string, error) ( VFS) Open(name string, flags OpenFlag) (File, OpenFlag, error) VFSFilename (interface) func Find(name string) VFS func Register(name string, vfs VFS)
VFSFilename extends VFS with the ability to use Filename objects for opening files. https://sqlite.org/c3ref/filename.html ( VFSFilename) Access(name string, flags AccessFlag) (bool, error) ( VFSFilename) Delete(name string, syncDir bool) error ( VFSFilename) FullPathname(name string) (string, error) ( VFSFilename) Open(name string, flags OpenFlag) (File, OpenFlag, error) ( VFSFilename) OpenFilename(name *Filename, flags OpenFlag) (File, OpenFlag, error) VFSFilename : VFS
Package-Level Functions (total 6)
ExportHostFunctions is an internal API users need not call directly. ExportHostFunctions registers the required VFS host functions with the provided env module.
Find returns a VFS given its name. If there is no match, nil is returned. If name is empty, the default VFS is returned. https://sqlite.org/c3ref/vfs_find.html
GetFilename is an internal API users should not call directly.
NewSharedMemory returns a shared-memory WAL-index backed by a file with the given path. It will return nil if shared-memory is not supported, or not appropriate for the given flags. Only [OPEN_MAIN_DB] databases may need a WAL-index. You must ensure all concurrent accesses to a database use shared-memory instances created with the same path.
Register registers a VFS. Empty and "os" are reserved names. https://sqlite.org/c3ref/vfs_find.html
Unregister unregisters a VFS. https://sqlite.org/c3ref/vfs_find.html
Package-Level Constants (total 50)
const ACCESS_READ AccessFlag = 2 // Unused
const ACCESS_READWRITE AccessFlag = 1 // Used by PRAGMA temp_store_directory
An EXCLUSIVE lock is needed in order to write to the database file. Only one EXCLUSIVE lock is allowed on the file and no other locks of any kind are allowed to coexist with an EXCLUSIVE lock. In order to maximize concurrency, SQLite works to minimize the amount of time that EXCLUSIVE locks are held.
No locks are held on the database. The database may be neither read nor written. Any internally cached data is considered suspect and subject to verification against the database file before being used. Other processes can read or write the database as their own locking states permit. This is the default state.
A PENDING lock means that the process holding the lock wants to write to the database as soon as possible and is just waiting on all current SHARED locks to clear so that it can get an EXCLUSIVE lock. No new SHARED locks are permitted against the database if a PENDING lock is active, though existing SHARED locks are allowed to continue.
A RESERVED lock means that the process is planning on writing to the database file at some point in the future but that it is currently just reading from the file. Only a single RESERVED lock may be active at one time, though multiple SHARED locks can coexist with a single RESERVED lock. RESERVED differs from PENDING in that new SHARED locks can be acquired while there is a RESERVED lock.
The database may be read but not written. Any number of processes can hold SHARED locks at the same time, hence there can be many simultaneous readers. But no other thread or process is allowed to write to the database file while one or more SHARED locks are active.
const OPEN_AUTOPROXY OpenFlag = 32 // VFS only
const OPEN_CREATE OpenFlag = 4 // Ok for sqlite3_open_v2()
const OPEN_DELETEONCLOSE OpenFlag = 8 // VFS only
const OPEN_EXCLUSIVE OpenFlag = 16 // VFS only
const OPEN_FULLMUTEX OpenFlag = 65536 // Ok for sqlite3_open_v2()
const OPEN_MAIN_DB OpenFlag = 256 // VFS only
const OPEN_MAIN_JOURNAL OpenFlag = 2048 // VFS only
const OPEN_MEMORY OpenFlag = 128 // Ok for sqlite3_open_v2()
const OPEN_NOFOLLOW OpenFlag = 16777216 // Ok for sqlite3_open_v2()
const OPEN_NOMUTEX OpenFlag = 32768 // Ok for sqlite3_open_v2()
const OPEN_PRIVATECACHE OpenFlag = 262144 // Ok for sqlite3_open_v2()
const OPEN_READONLY OpenFlag = 1 // Ok for sqlite3_open_v2()
const OPEN_READWRITE OpenFlag = 2 // Ok for sqlite3_open_v2()
const OPEN_SHAREDCACHE OpenFlag = 131072 // Ok for sqlite3_open_v2()
const OPEN_SUBJOURNAL OpenFlag = 8192 // VFS only
const OPEN_SUPER_JOURNAL OpenFlag = 16384 // VFS only
const OPEN_TEMP_DB OpenFlag = 512 // VFS only
const OPEN_TEMP_JOURNAL OpenFlag = 4096 // VFS only
const OPEN_TRANSIENT_DB OpenFlag = 1024 // VFS only
const OPEN_URI OpenFlag = 64 // Ok for sqlite3_open_v2()
const OPEN_WAL OpenFlag = 524288 // VFS only
SupportsFileLocking is false on platforms that do not support file locking. To open a database file on those platforms, you need to use the [nolock] or [immutable] URI parameters.
SupportsSharedMemory is false on platforms that do not support shared memory. To use [WAL without shared-memory], you need to set [EXCLUSIVE locking mode].
const SYNC_FULL SyncFlag = 3