Source File
const.go
Belonging Package
github.com/ncruces/go-sqlite3/vfs
package vfsimportconst (_MAX_NAME = 1e6 // Self-imposed limit for most NUL terminated strings._MAX_SQL_LENGTH = 1e9_MAX_PATHNAME = 1024_DEFAULT_SECTOR_SIZE = 4096ptrlen = util.PtrLen)type (stk_t = util.Stk_tptr_t = util.Ptr_t)// https://sqlite.org/rescode.htmltype _ErrorCode uint32func ( _ErrorCode) () string {return util.ErrorCodeString(uint32())}const (_OK _ErrorCode = util.OK_ERROR _ErrorCode = util.ERROR_PERM _ErrorCode = util.PERM_BUSY _ErrorCode = util.BUSY_READONLY _ErrorCode = util.READONLY_IOERR _ErrorCode = util.IOERR_NOTFOUND _ErrorCode = util.NOTFOUND_FULL _ErrorCode = util.FULL_CANTOPEN _ErrorCode = util.CANTOPEN_IOERR_READ _ErrorCode = util.IOERR_READ_IOERR_SHORT_READ _ErrorCode = util.IOERR_SHORT_READ_IOERR_WRITE _ErrorCode = util.IOERR_WRITE_IOERR_FSYNC _ErrorCode = util.IOERR_FSYNC_IOERR_DIR_FSYNC _ErrorCode = util.IOERR_DIR_FSYNC_IOERR_TRUNCATE _ErrorCode = util.IOERR_TRUNCATE_IOERR_FSTAT _ErrorCode = util.IOERR_FSTAT_IOERR_UNLOCK _ErrorCode = util.IOERR_UNLOCK_IOERR_RDLOCK _ErrorCode = util.IOERR_RDLOCK_IOERR_DELETE _ErrorCode = util.IOERR_DELETE_IOERR_ACCESS _ErrorCode = util.IOERR_ACCESS_IOERR_CHECKRESERVEDLOCK _ErrorCode = util.IOERR_CHECKRESERVEDLOCK_IOERR_LOCK _ErrorCode = util.IOERR_LOCK_IOERR_CLOSE _ErrorCode = util.IOERR_CLOSE_IOERR_SHMOPEN _ErrorCode = util.IOERR_SHMOPEN_IOERR_SHMSIZE _ErrorCode = util.IOERR_SHMSIZE_IOERR_SHMLOCK _ErrorCode = util.IOERR_SHMLOCK_IOERR_SHMMAP _ErrorCode = util.IOERR_SHMMAP_IOERR_SEEK _ErrorCode = util.IOERR_SEEK_IOERR_DELETE_NOENT _ErrorCode = util.IOERR_DELETE_NOENT_IOERR_GETTEMPPATH _ErrorCode = util.IOERR_GETTEMPPATH_IOERR_BEGIN_ATOMIC _ErrorCode = util.IOERR_BEGIN_ATOMIC_IOERR_COMMIT_ATOMIC _ErrorCode = util.IOERR_COMMIT_ATOMIC_IOERR_ROLLBACK_ATOMIC _ErrorCode = util.IOERR_ROLLBACK_ATOMIC_IOERR_DATA _ErrorCode = util.IOERR_DATA_IOERR_CORRUPTFS _ErrorCode = util.IOERR_CORRUPTFS_BUSY_SNAPSHOT _ErrorCode = util.BUSY_SNAPSHOT_CANTOPEN_FULLPATH _ErrorCode = util.CANTOPEN_FULLPATH_CANTOPEN_ISDIR _ErrorCode = util.CANTOPEN_ISDIR_READONLY_CANTINIT _ErrorCode = util.READONLY_CANTINIT_READONLY_DIRECTORY _ErrorCode = util.READONLY_DIRECTORY_OK_SYMLINK _ErrorCode = util.OK_SYMLINK)// OpenFlag is a flag for the [VFS] Open method.//// https://sqlite.org/c3ref/c_open_autoproxy.htmltype OpenFlag uint32const (OPEN_READONLY OpenFlag = 0x00000001 /* Ok for sqlite3_open_v2() */OPEN_READWRITE OpenFlag = 0x00000002 /* Ok for sqlite3_open_v2() */OPEN_CREATE OpenFlag = 0x00000004 /* Ok for sqlite3_open_v2() */OPEN_DELETEONCLOSE OpenFlag = 0x00000008 /* VFS only */OPEN_EXCLUSIVE OpenFlag = 0x00000010 /* VFS only */OPEN_AUTOPROXY OpenFlag = 0x00000020 /* VFS only */OPEN_URI OpenFlag = 0x00000040 /* Ok for sqlite3_open_v2() */OPEN_MEMORY OpenFlag = 0x00000080 /* Ok for sqlite3_open_v2() */OPEN_MAIN_DB OpenFlag = 0x00000100 /* VFS only */OPEN_TEMP_DB OpenFlag = 0x00000200 /* VFS only */OPEN_TRANSIENT_DB OpenFlag = 0x00000400 /* VFS only */OPEN_MAIN_JOURNAL OpenFlag = 0x00000800 /* VFS only */OPEN_TEMP_JOURNAL OpenFlag = 0x00001000 /* VFS only */OPEN_SUBJOURNAL OpenFlag = 0x00002000 /* VFS only */OPEN_SUPER_JOURNAL OpenFlag = 0x00004000 /* VFS only */OPEN_NOMUTEX OpenFlag = 0x00008000 /* Ok for sqlite3_open_v2() */OPEN_FULLMUTEX OpenFlag = 0x00010000 /* Ok for sqlite3_open_v2() */OPEN_SHAREDCACHE OpenFlag = 0x00020000 /* Ok for sqlite3_open_v2() */OPEN_PRIVATECACHE OpenFlag = 0x00040000 /* Ok for sqlite3_open_v2() */OPEN_WAL OpenFlag = 0x00080000 /* VFS only */OPEN_NOFOLLOW OpenFlag = 0x01000000 /* Ok for sqlite3_open_v2() */_FLAG_ATOMIC OpenFlag = 0x10000000_FLAG_KEEP_WAL OpenFlag = 0x20000000_FLAG_PSOW OpenFlag = 0x40000000_FLAG_SYNC_DIR OpenFlag = 0x80000000)// AccessFlag is a flag for the [VFS] Access method.//// https://sqlite.org/c3ref/c_access_exists.htmltype AccessFlag uint32const (ACCESS_EXISTS AccessFlag = 0ACCESS_READWRITE AccessFlag = 1 /* Used by PRAGMA temp_store_directory */ACCESS_READ AccessFlag = 2 /* Unused */)// SyncFlag is a flag for the [File] Sync method.//// https://sqlite.org/c3ref/c_sync_dataonly.htmltype SyncFlag uint32const (SYNC_NORMAL SyncFlag = 0x00002SYNC_FULL SyncFlag = 0x00003SYNC_DATAONLY SyncFlag = 0x00010)// LockLevel is a value used with [File] Lock and Unlock methods.//// https://sqlite.org/c3ref/c_lock_exclusive.htmltype LockLevel uint32const (// 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.LOCK_NONE LockLevel = 0 /* xUnlock() only */// 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.LOCK_SHARED LockLevel = 1 /* xLock() or xUnlock() */// 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.LOCK_RESERVED LockLevel = 2 /* xLock() only */// 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.LOCK_PENDING LockLevel = 3 /* internal use only */// 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.LOCK_EXCLUSIVE LockLevel = 4 /* xLock() only */)// DeviceCharacteristic is a flag retuned by the [File] DeviceCharacteristics method.//// https://sqlite.org/c3ref/c_iocap_atomic.htmltype DeviceCharacteristic uint32const (IOCAP_ATOMIC DeviceCharacteristic = 0x00000001IOCAP_ATOMIC512 DeviceCharacteristic = 0x00000002IOCAP_ATOMIC1K DeviceCharacteristic = 0x00000004IOCAP_ATOMIC2K DeviceCharacteristic = 0x00000008IOCAP_ATOMIC4K DeviceCharacteristic = 0x00000010IOCAP_ATOMIC8K DeviceCharacteristic = 0x00000020IOCAP_ATOMIC16K DeviceCharacteristic = 0x00000040IOCAP_ATOMIC32K DeviceCharacteristic = 0x00000080IOCAP_ATOMIC64K DeviceCharacteristic = 0x00000100IOCAP_SAFE_APPEND DeviceCharacteristic = 0x00000200IOCAP_SEQUENTIAL DeviceCharacteristic = 0x00000400IOCAP_UNDELETABLE_WHEN_OPEN DeviceCharacteristic = 0x00000800IOCAP_POWERSAFE_OVERWRITE DeviceCharacteristic = 0x00001000IOCAP_IMMUTABLE DeviceCharacteristic = 0x00002000IOCAP_BATCH_ATOMIC DeviceCharacteristic = 0x00004000IOCAP_SUBPAGE_READ DeviceCharacteristic = 0x00008000)// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.htmltype _FcntlOpcode uint32const (_FCNTL_LOCKSTATE _FcntlOpcode = 1_FCNTL_GET_LOCKPROXYFILE _FcntlOpcode = 2_FCNTL_SET_LOCKPROXYFILE _FcntlOpcode = 3_FCNTL_LAST_ERRNO _FcntlOpcode = 4_FCNTL_SIZE_HINT _FcntlOpcode = 5_FCNTL_CHUNK_SIZE _FcntlOpcode = 6_FCNTL_FILE_POINTER _FcntlOpcode = 7_FCNTL_SYNC_OMITTED _FcntlOpcode = 8_FCNTL_WIN32_AV_RETRY _FcntlOpcode = 9_FCNTL_PERSIST_WAL _FcntlOpcode = 10_FCNTL_OVERWRITE _FcntlOpcode = 11_FCNTL_VFSNAME _FcntlOpcode = 12_FCNTL_POWERSAFE_OVERWRITE _FcntlOpcode = 13_FCNTL_PRAGMA _FcntlOpcode = 14_FCNTL_BUSYHANDLER _FcntlOpcode = 15_FCNTL_TEMPFILENAME _FcntlOpcode = 16_FCNTL_MMAP_SIZE _FcntlOpcode = 18_FCNTL_TRACE _FcntlOpcode = 19_FCNTL_HAS_MOVED _FcntlOpcode = 20_FCNTL_SYNC _FcntlOpcode = 21_FCNTL_COMMIT_PHASETWO _FcntlOpcode = 22_FCNTL_WIN32_SET_HANDLE _FcntlOpcode = 23_FCNTL_WAL_BLOCK _FcntlOpcode = 24_FCNTL_ZIPVFS _FcntlOpcode = 25_FCNTL_RBU _FcntlOpcode = 26_FCNTL_VFS_POINTER _FcntlOpcode = 27_FCNTL_JOURNAL_POINTER _FcntlOpcode = 28_FCNTL_WIN32_GET_HANDLE _FcntlOpcode = 29_FCNTL_PDB _FcntlOpcode = 30_FCNTL_BEGIN_ATOMIC_WRITE _FcntlOpcode = 31_FCNTL_COMMIT_ATOMIC_WRITE _FcntlOpcode = 32_FCNTL_ROLLBACK_ATOMIC_WRITE _FcntlOpcode = 33_FCNTL_LOCK_TIMEOUT _FcntlOpcode = 34_FCNTL_DATA_VERSION _FcntlOpcode = 35_FCNTL_SIZE_LIMIT _FcntlOpcode = 36_FCNTL_CKPT_DONE _FcntlOpcode = 37_FCNTL_RESERVE_BYTES _FcntlOpcode = 38_FCNTL_CKPT_START _FcntlOpcode = 39_FCNTL_EXTERNAL_READER _FcntlOpcode = 40_FCNTL_CKSM_FILE _FcntlOpcode = 41_FCNTL_RESET_CACHE _FcntlOpcode = 42_FCNTL_NULL_IO _FcntlOpcode = 43_FCNTL_BLOCK_ON_CONNECT _FcntlOpcode = 44)// https://sqlite.org/c3ref/c_shm_exclusive.htmltype _ShmFlag uint32const (_SHM_UNLOCK _ShmFlag = 1_SHM_LOCK _ShmFlag = 2_SHM_SHARED _ShmFlag = 4_SHM_EXCLUSIVE _ShmFlag = 8_SHM_NLOCK = 8_SHM_BASE = (22 + _SHM_NLOCK) * 4_SHM_DMS = _SHM_BASE + _SHM_NLOCK)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |