Versions in this module Expand all Collapse all v0 v0.8.6 Jul 25, 2024 v0.8.5 Jul 22, 2024 Changes in this version + const AccessModeMemory + const AccessModeRWC + const BigCacheSize + const DefaultBusyTimeout + const DefaultQueryTimeout + const InMemoryDBName + const JournalModeMemory + const JournalModeOff + const JournalModeWAL + const NormalCacheSize + const SQLiteDriver + const SyncNormal + const SyncOff + var DefaultDatabase = "scrape_data/scrape.db" + var ErrDatabaseExists = errors.New("database already exists") + var ErrIsInMemory = errors.New("file path is in-memory DB (':memory:')") + var MigrationFS embed.FS + type AccessMode string + type FilesystemStats struct + AvailMB uint + FreeMB uint + Path string + TotalMB uint + UsedMB uint + type JournalMode string + type Option func(*config) error + func Defaults() Option + func File(filename string) Option + func InMemoryDB() Option + func WithQueryTimeout(timeout time.Duration) Option + func WithoutAutoCreate() Option + type SQLite struct + func MustNew(options ...Option) *SQLite + func New(options ...Option) (*SQLite, error) + func (s *SQLite) AfterOpen(dbh *database.DBHandle) error + func (s *SQLite) Maintain(dbh *database.DBHandle) error + func (s *SQLite) Stats(dbh *database.DBHandle) (any, error) + func (s SQLite) DSNSource() database.DataSource + func (s SQLite) Driver() string + func (s SQLite) MigrationFS() *embed.FS + type Stats struct + DBStats any + Filesystem *FilesystemStats + MaxPageCount int + PageCount int + PageSize int + SqliteVersion string + UnusedPages int + func (s *Stats) DatabaseSizeMB() int + type SyncMode string