Documentation ¶
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 */ ErrNotFound error = ErrNo(12) /* Unknown opcode in sqlite3_file_control() */ ErrFull error = ErrNo(13) /* Insertion failed because database is full */ ErrCantOpen error = ErrNo(14) /* Unable to open the database file */ ErrProtocol error = ErrNo(15) /* Database lock protocol error */ 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 */ ErrNotADB error = ErrNo(26) /* File opened that is not a database file */ ErrNotice error = ErrNo(27) /* Notifications from sqlite3_log() */ ErrWarning error = ErrNo(28) /* Warnings from sqlite3_log() */ )
result codes from http://www.sqlite.org/c3ref/c_abort.html
View Source
var SQLiteTimestampFormats = []string{
"2006-01-02 15:04:05.999999999",
"2006-01-02T15:04:05.999999999",
"2006-01-02 15:04:05",
"2006-01-02T15:04:05",
"2006-01-02 15:04",
"2006-01-02T15:04",
"2006-01-02",
}
Timestamp formats understood by both this module and SQLite. The first format in the slice will be used when saving time values into the database. When parsing a string from a timestamp or datetime column, the formats are tried in order.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code ErrNo /* The error code returned by SQLite */ // contains filtered or unexported fields }
type SQLiteConn ¶
type SQLiteConn struct {
// contains filtered or unexported fields
}
Conn struct.
func (*SQLiteConn) AutoCommit ¶
func (c *SQLiteConn) AutoCommit() bool
AutoCommit return which currently auto commit or not.
func (*SQLiteConn) Backup ¶
func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*Backup, error)
type SQLiteDriver ¶
type SQLiteDriver struct { Extensions []string ConnectHook func(*SQLiteConn) error }
Driver struct.
type SQLiteResult ¶
type SQLiteResult struct {
// contains filtered or unexported fields
}
Result struct.
func (*SQLiteResult) LastInsertId ¶
func (r *SQLiteResult) LastInsertId() (int64, error)
Return last inserted ID.
func (*SQLiteResult) RowsAffected ¶
func (r *SQLiteResult) RowsAffected() (int64, error)
Return how many rows affected.
type SQLiteStmt ¶
type SQLiteStmt struct {
// contains filtered or unexported fields
}
Stmt struct.
Click to show internal directories.
Click to hide internal directories.