Documentation ¶
Index ¶
- Constants
- func Open(filename *Char) (db *Sqlite3, err Errno)
- func OpenV2(filename *Char, flags OpenFlags, zVfs *Char) (db *Sqlite3, err Errno)
- type Char
- type Errno
- type Int
- type OpenFlags
- type Pointer
- type PrepareFlags
- type Sqlite3
- func (db *Sqlite3) Close() Errno
- func (db *Sqlite3) CloseV2() Errno
- func (db *Sqlite3) Errcode() Errno
- func (db *Sqlite3) Errmsg() *Char
- func (*Sqlite3) Exec(sql *Char, ...) Errno
- func (db *Sqlite3) ExtendedErrcode() Errno
- func (db *Sqlite3) Prepare(sql string, tail **Char) (stmt *Stmt, err Errno)
- func (db *Sqlite3) PrepareV2(sql string, tail **Char) (stmt *Stmt, err Errno)
- func (db *Sqlite3) PrepareV3(sql string, flags PrepareFlags, tail **Char) (stmt *Stmt, err Errno)
- type Stmt
- func (*Stmt) BindInt(idx Int, val Int) Errno
- func (*Stmt) BindInt64(idx Int, val int64) Errno
- func (*Stmt) BindText(idx Int, val *Char, nByte Int, destructor func(Pointer)) Errno
- func (stmt *Stmt) Close() Errno
- func (stmt *Stmt) ColumnCount() Int
- func (stmt *Stmt) ColumnInt(idx Int) Int
- func (stmt *Stmt) ColumnInt64(idx Int) int64
- func (stmt *Stmt) ColumnName(idx Int) *Char
- func (stmt *Stmt) ColumnText(idx Int) *Char
- func (stmt *Stmt) Reset() Errno
- func (*Stmt) Step() Errno
Constants ¶
View Source
const (
LLGoPackage = "link"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Errno ¶
type Errno Int
const ( OK Errno = 0 // Successful result Error Errno = 1 // Generic error ErrInternal Errno = 2 // Internal logic error in SQLite ErrPerm Errno = 3 // Access permission denied ErrAbort Errno = 4 // Callback routine requested an abort ErrBusy Errno = 5 // The database file is locked ErrLocked Errno = 6 // A table in the database is locked ErrNomem Errno = 7 // A malloc() failed ErrReadOnly Errno = 8 // Attempt to write a readonly database ErrInterrupt Errno = 9 // Operation terminated by sqlite3_interrupt() ErrIo Errno = 10 // Some kind of disk I/O error occurred ErrCorrupt Errno = 11 // The database disk image is malformed ErrNotfound Errno = 12 // Unknown opcode in sqlite3_file_control() ErrFull Errno = 13 // Insertion failed because database is full ErrCantopen Errno = 14 // Unable to open the database file ErrProtocol Errno = 15 // Database lock protocol error ErrSchema Errno = 17 // The database schema changed ErrToobig Errno = 18 // String or BLOB exceeds size limit ErrConstraint Errno = 19 // Abort due to constraint violation ErrMismatch Errno = 20 // Data type mismatch ErrMisuse Errno = 21 // Library used incorrectly ErrNolfs Errno = 22 // Uses OS features not supported on host ErrAuth Errno = 23 // Authorization denied ErrRange Errno = 25 // 2nd parameter to sqlite3_bind out of range ErrNotadb Errno = 26 // File opened that is not a database file ErrNotice Errno = 27 // Notifications from sqlite3_log() ErrWarning Errno = 28 // Warnings from sqlite3_log() HasRow Errno = 100 // sqlite3_step() has another row ready Done Errno = 101 // sqlite3_step() has finished executing )
type OpenFlags ¶
type OpenFlags Int
OpenFlags represents SQLite open flags.
const ( OpenReadOnly OpenFlags = 0x00000001 OpenReadWrite OpenFlags = 0x00000002 OpenCreate OpenFlags = 0x00000004 OpenDeleteOnClose OpenFlags = 0x00000008 // VFS only OpenExclusive OpenFlags = 0x00000010 // VFS only OpenAutoProxy OpenFlags = 0x00000020 // VFS only OpenUri OpenFlags = 0x00000040 OpenMemory OpenFlags = 0x00000080 OpenMainDb OpenFlags = 0x00000100 // VFS only OpenTempDb OpenFlags = 0x00000200 // VFS only OpenTransientDb OpenFlags = 0x00000400 // VFS only OpenMainJournal OpenFlags = 0x00000800 // VFS only OpenTempJournal OpenFlags = 0x00001000 // VFS only OpenSubJournal OpenFlags = 0x00002000 // VFS only OpenSuperJournal OpenFlags = 0x00004000 // VFS only OpenNoMutex OpenFlags = 0x00008000 OpenFullMutex OpenFlags = 0x00010000 OpenPrivateCache OpenFlags = 0x00040000 OpenWal OpenFlags = 0x00080000 // VFS only OpenNoFollow OpenFlags = 0x01000000 OpenExResCode OpenFlags = 0x02000000 // Extended result codes )
type PrepareFlags ¶
type PrepareFlags Int
PrepareFlags represents SQLite prepare flags.
const ( PreparePersistent PrepareFlags = 0x01 PrepareNormalize PrepareFlags = 0x02 PrepareNoVtab PrepareFlags = 0x04 )
type Sqlite3 ¶
type Sqlite3 struct { }
llgo:type C
func (*Sqlite3) CloseV2 ¶
Closing A Database Connection
llgo:link (*Sqlite3).CloseV2 C.sqlite3_close_v2
func (*Sqlite3) Exec ¶
func (*Sqlite3) Exec( sql *Char, callback func(arg Pointer, resultCols Int, colVals, colNames **Char) Int, arg Pointer, errmsg **Char) Errno
One-Step Query Execution Interface
llgo:link (*Sqlite3).Exec C.sqlite3_exec
func (*Sqlite3) ExtendedErrcode ¶
llgo:link (*Sqlite3).ExtendedErrcode C.sqlite3_extended_errcode
type Stmt ¶
type Stmt struct { }
llgo:type C
func (*Stmt) ColumnCount ¶
llgo:link (*Stmt).ColumnCount C.sqlite3_column_count
func (*Stmt) ColumnInt64 ¶
llgo:link (*Stmt).ColumnInt64 C.sqlite3_column_int64
func (*Stmt) ColumnName ¶
llgo:link (*Stmt).ColumnName C.sqlite3_column_name
func (*Stmt) ColumnText ¶
llgo:link (*Stmt).ColumnText C.sqlite3_column_text
Click to show internal directories.
Click to hide internal directories.