sqlite

package
v0.1450.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sqlite provides access to the SQLite library, version 3.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrError      error = Errno(1)   //    /* SQL error or missing database */
	ErrInternal   error = Errno(2)   //    /* Internal logic error in SQLite */
	ErrPerm       error = Errno(3)   //    /* Access permission denied */
	ErrAbort      error = Errno(4)   //    /* Callback routine requested an abort */
	ErrBusy       error = Errno(5)   //    /* The database file is locked */
	ErrLocked     error = Errno(6)   //    /* A table in the database is locked */
	ErrNoMem      error = Errno(7)   //    /* A malloc() failed */
	ErrReadOnly   error = Errno(8)   //    /* Attempt to write a readonly database */
	ErrInterrupt  error = Errno(9)   //    /* Operation terminated by sqlite3_interrupt()*/
	ErrIOErr      error = Errno(10)  //    /* Some kind of disk I/O error occurred */
	ErrCorrupt    error = Errno(11)  //    /* The database disk image is malformed */
	ErrFull       error = Errno(13)  //    /* Insertion failed because database is full */
	ErrCantOpen   error = Errno(14)  //    /* Unable to open the database file */
	ErrEmpty      error = Errno(16)  //    /* Database is empty */
	ErrSchema     error = Errno(17)  //    /* The database schema changed */
	ErrTooBig     error = Errno(18)  //    /* String or BLOB exceeds size limit */
	ErrConstraint error = Errno(19)  //    /* Abort due to constraint violation */
	ErrMismatch   error = Errno(20)  //    /* Data type mismatch */
	ErrMisuse     error = Errno(21)  //    /* Library used incorrectly */
	ErrNolfs      error = Errno(22)  //    /* Uses OS features not supported on host */
	ErrAuth       error = Errno(23)  //    /* Authorization denied */
	ErrFormat     error = Errno(24)  //    /* Auxiliary database format error */
	ErrRange      error = Errno(25)  //    /* 2nd parameter to sqlite3_bind out of range */
	ErrNotDB      error = Errno(26)  //    /* File opened that is not a database file */
	Row                 = Errno(100) //   /* sqlite3_step() has another row ready */
	Done                = Errno(101) //   /* sqlite3_step() has finished executing */
)

Functions

func Version

func Version() string

Types

type Backup

type Backup struct {
	// contains filtered or unexported fields
}

func NewBackup

func NewBackup(dst *Conn, dstTable string, src *Conn, srcTable string) (*Backup, error)

func (*Backup) Close

func (b *Backup) Close() error

func (*Backup) Run

func (b *Backup) Run(npage int, period time.Duration, c chan<- BackupStatus) error

func (*Backup) Status

func (b *Backup) Status() BackupStatus

func (*Backup) Step

func (b *Backup) Step(npage int) error

type BackupStatus

type BackupStatus struct {
	Remaining int
	PageCount int
}

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*Conn, error)

func (*Conn) BusyTimeout

func (c *Conn) BusyTimeout(ms int) error

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Exec

func (c *Conn) Exec(cmd string, args ...interface{}) error

func (*Conn) Prepare

func (c *Conn) Prepare(cmd string) (*Stmt, error)

type Errno

type Errno int

func (Errno) Error

func (e Errno) Error() string

type Stmt

type Stmt struct {
	// contains filtered or unexported fields
}

func (*Stmt) Error

func (s *Stmt) Error() error

func (*Stmt) Exec

func (s *Stmt) Exec(args ...interface{}) error

func (*Stmt) Finalize

func (s *Stmt) Finalize() error

func (*Stmt) Nanoseconds

func (s *Stmt) Nanoseconds() int64

func (*Stmt) Next

func (s *Stmt) Next() bool

func (*Stmt) Reset

func (s *Stmt) Reset() error

func (*Stmt) SQL

func (s *Stmt) SQL() string

func (*Stmt) Scan

func (s *Stmt) Scan(args ...interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL