Versions in this module Expand all Collapse all v1 v1.1.1 Nov 7, 2019 v1.1.0 Dec 1, 2018 Changes in this version + const CachePages + var CollateFuncs = map[string]func(string, string) int + var DefaultCollate = "binary" + var ErrCorrupted = errors.New("database corrupted") + var ErrEncoding = errors.New("unsupported encoding") + var ErrHotJournal = errors.New("crashed transaction present") + var ErrIncompatible = errors.New("incompatible database version") + var ErrInvalidDef = errors.New("invalid object definition") + var ErrInvalidMagic = errors.New("invalid magic number") + var ErrInvalidPageSize = errors.New("invalid page size") + var ErrNoSuchIndex = errors.New("no such index") + var ErrNoSuchTable = errors.New("no such table") + var ErrRecursion = errors.New("tree is too deep") + var ErrReservedSpace = errors.New("unsupported database (encrypted?)") + var ErrWAL = errors.New("WAL journal mode is unsupported") + func Equals(key Key, r Record) bool + func Fuzz(data []byte) int + func Search(key Key, r Record) bool + type Database struct + func OpenFile(f string) (*Database, error) + func (db *Database) Close() error + func (db *Database) Index(name string) (*Index, error) + func (db *Database) Indexes() ([]string, error) + func (db *Database) Info() (string, error) + func (db *Database) NonRowidTable(name string) (*Index, error) + func (db *Database) RLock() error + func (db *Database) RUnlock() error + func (db *Database) Schema(table string) (*Schema, error) + func (db *Database) Table(name string) (*Table, error) + func (db *Database) Tables() ([]string, error) + type Index struct + func (in *Index) Scan(cb RecordCB) error + func (in *Index) ScanEq(key Key, cb RecordCB) error + func (in *Index) ScanMin(from Key, cb RecordCB) error + func (in *Index) ScanRange(from, to Key, cb RecordCB) error + func (t *Index) Def() (*sql.CreateIndexStmt, error) + type IndexColumn struct + Collate string + Column string + Expression string + SortOrder sql.SortOrder + type Key []KeyCol + type KeyCol struct + Collate string + Desc bool + V interface{} + type Record []interface + func ChompRowid(rec Record) (int64, Record, error) + type RecordCB func(Record) bool + type Schema struct + Columns []TableColumn + Indexes []SchemaIndex + PK []IndexColumn + PrimaryKey string + RowidPK bool + Table string + WithoutRowid bool + func (st *Schema) Column(name string) int + func (st *Schema) NamedIndex(name string) *SchemaIndex + type SchemaIndex struct + Columns []IndexColumn + Index string + func (si *SchemaIndex) Column(name string) int + type Table struct + func (t *Table) Def() (*sql.CreateTableStmt, error) + func (t *Table) Rowid(rowid int64) (Record, error) + func (t *Table) Scan(cb TableScanCB) error + type TableColumn struct + Collate string + Column string + Default interface{} + Null bool + Rowid bool + Type string + type TableScanCB func(int64, Record) bool