Versions in this module Expand all Collapse all v0 v0.16.0 Dec 25, 2023 Changes in this version + var IsNotFoundError = errs.IsNotFoundError + func IsAlreadyExistsError(err error) bool + type DB struct + DB *database.Database + func Open(path string) (*DB, error) + func (db *DB) Begin(writable bool) (*Tx, error) + func (db *DB) Close() error + func (db *DB) Exec(q string, args ...any) error + func (db *DB) Prepare(q string) (*Statement, error) + func (db *DB) Query(q string, args ...any) (*Result, error) + func (db *DB) QueryRow(q string, args ...any) (*Row, error) + func (db *DB) Update(fn func(tx *Tx) error) error + func (db *DB) View(fn func(tx *Tx) error) error + func (db DB) WithContext(ctx context.Context) *DB + type Result struct + func (r *Result) Close() (err error) + func (r *Result) Columns() []string + func (r *Result) GetFirst() (*Row, error) + func (r *Result) Iterate(fn func(r *Row) error) error + func (r *Result) MarshalJSON() ([]byte, error) + func (r *Result) MarshalJSONTo(w io.Writer) error + type Row struct + func (r *Row) Clone() *Row + func (r *Row) Columns() ([]string, error) + func (r *Row) GetColumnType(column string) (string, error) + func (r *Row) Iterate(fn func(column string, value types.Value) error) error + func (r *Row) MapScan(dest map[string]any) error + func (r *Row) MarshalJSON() ([]byte, error) + func (r *Row) Object() types.Object + func (r *Row) Scan(dest ...any) error + func (r *Row) ScanColumn(column string, dest any) error + func (r *Row) StructScan(dest any) error + type Statement struct + func (s *Statement) Exec(args ...any) (err error) + func (s *Statement) Query(args ...any) (*Result, error) + func (s *Statement) QueryRow(args ...any) (r *Row, err error) + type Tx struct + func (tx *Tx) Commit() error + func (tx *Tx) Exec(q string, args ...any) (err error) + func (tx *Tx) Prepare(q string) (*Statement, error) + func (tx *Tx) Query(q string, args ...any) (*Result, error) + func (tx *Tx) QueryRow(q string, args ...any) (*Row, error) + func (tx *Tx) Rollback() error