Documentation
¶
Overview ¶
Package mattn provides a Zstandard VFS adapter for mattn/go-sqlite3. This adapter enables read-only access to Zstandard-compressed SQLite databases using the CGO-based mattn/go-sqlite3 driver.
Note: This requires CGO to be enabled.
Usage:
import _ "github.com/paulstuart/sqlitezstd/driver/mattn"
db, err := sql.Open("sqlite3", "database.sqlite.zst?vfs=zstd")
Index ¶
- type ZstdFile
- func (z *ZstdFile) CheckReservedLock() (bool, error)
- func (z *ZstdFile) Close() error
- func (z *ZstdFile) DeviceCharacteristics() sqlite3vfs.DeviceCharacteristic
- func (z *ZstdFile) FileSize() (int64, error)
- func (z *ZstdFile) Lock(elock sqlite3vfs.LockType) error
- func (z *ZstdFile) ReadAt(p []byte, off int64) (int, error)
- func (z *ZstdFile) SectorSize() int64
- func (z *ZstdFile) Sync(flag sqlite3vfs.SyncType) error
- func (z *ZstdFile) Truncate(size int64) error
- func (z *ZstdFile) Unlock(elock sqlite3vfs.LockType) error
- func (z *ZstdFile) WriteAt(p []byte, off int64) (int, error)
- type ZstdVFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZstdFile ¶
type ZstdFile struct {
// contains filtered or unexported fields
}
ZstdFile represents an open Zstandard compressed database file for mattn driver.
func (*ZstdFile) CheckReservedLock ¶
func (*ZstdFile) DeviceCharacteristics ¶
func (z *ZstdFile) DeviceCharacteristics() sqlite3vfs.DeviceCharacteristic
func (*ZstdFile) SectorSize ¶
type ZstdVFS ¶
type ZstdVFS struct{}
ZstdVFS implements the VFS interface for Zstandard compressed databases.
func (*ZstdVFS) Access ¶
func (z *ZstdVFS) Access(name string, flags sqlite3vfs.AccessFlag) (bool, error)
Access checks whether a file exists and can be accessed with the specified permissions.
func (*ZstdVFS) FullPathname ¶
FullPathname returns the full pathname of a file.
func (*ZstdVFS) Open ¶
func (z *ZstdVFS) Open(name string, flags sqlite3vfs.OpenFlag) (sqlite3vfs.File, sqlite3vfs.OpenFlag, error)
Open opens a compressed database file for reading.
Click to show internal directories.
Click to hide internal directories.