package sqlite3
Import Path
github.com/ncruces/go-sqlite3 (on go.dev )
Dependency Relation
imports 27 packages , and imported by 3 packages
Code Examples
package main
import (
"fmt"
"log"
"github.com/ncruces/go-sqlite3"
)
const memory = ":memory:"
func main() {
db, err := sqlite3.Open(memory)
if err != nil {
log.Fatal(err)
}
err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`)
if err != nil {
log.Fatal(err)
}
err = db.Exec(`INSERT INTO users (id, name) VALUES (0, 'go'), (1, 'zig'), (2, 'whatever')`)
if err != nil {
log.Fatal(err)
}
stmt, _, err := db.Prepare(`SELECT id, name FROM users`)
if err != nil {
log.Fatal(err)
}
defer stmt.Close()
for stmt.Step() {
fmt.Println(stmt.ColumnInt(0), stmt.ColumnText(1))
}
if err := stmt.Err(); err != nil {
log.Fatal(err)
}
err = stmt.Close()
if err != nil {
log.Fatal(err)
}
err = db.Close()
if err != nil {
log.Fatal(err)
}
}
Package-Level Type Names (total 56)
/* sort by: alphabet | popularity */
type Blob (struct)
Blob is an handle to an open BLOB.
It implements [io.ReadWriteSeeker] for incremental BLOB I/O.
https://sqlite.org/c3ref/blob.html
Methods (total 8 )
(*Blob) Close () error
Close closes a BLOB handle.
It is safe to close a nil, zero or closed Blob.
https://sqlite.org/c3ref/blob_close.html
(*Blob) Read (p []byte ) (n int , err error )
Read implements the [io.Reader] interface.
https://sqlite.org/c3ref/blob_read.html
(*Blob) ReadFrom (r io .Reader ) (n int64 , err error )
ReadFrom implements the [io.ReaderFrom] interface.
https://sqlite.org/c3ref/blob_write.html
(*Blob) Reopen (row int64 ) error
Reopen moves a BLOB handle to a new row of the same database table.
https://sqlite.org/c3ref/blob_reopen.html
(*Blob) Seek (offset int64 , whence int ) (int64 , error )
Seek implements the [io.Seeker] interface.
(*Blob) Size () int64
Size returns the size of the BLOB in bytes.
https://sqlite.org/c3ref/blob_bytes.html
(*Blob) Write (p []byte ) (n int , err error )
Write implements the [io.Writer] interface.
https://sqlite.org/c3ref/blob_write.html
(*Blob) WriteTo (w io .Writer ) (n int64 , err error )
WriteTo implements the [io.WriterTo] interface.
https://sqlite.org/c3ref/blob_read.html
Implements (at least 18 )
*Blob : github.com/gobwas/ws.HandshakeHeader
*Blob : github.com/imroc/req/v3/internal/bisect.Writer
*Blob : github.com/prometheus/common/expfmt.Closer
*Blob : internal/bisect.Writer
*Blob : io.Closer
*Blob : io.ReadCloser
*Blob : io.Reader
*Blob : io.ReaderFrom
*Blob : io.ReadSeekCloser
*Blob : io.ReadSeeker
*Blob : io.ReadWriteCloser
*Blob : io.ReadWriter
*Blob : io.ReadWriteSeeker
*Blob : io.Seeker
*Blob : io.WriteCloser
*Blob : io.Writer
*Blob : io.WriterTo
*Blob : io.WriteSeeker
As Outputs Of (at least one exported )
func (*Conn ).OpenBlob (db, table, column string , row int64 , write bool ) (*Blob , error )
type Conn (struct)
Conn is a database connection handle.
A Conn is not safe for concurrent use by multiple goroutines.
https://sqlite.org/c3ref/sqlite3.html
Methods (total 61 )
(*Conn) AnyCollationNeeded () error
AnyCollationNeeded uses [Conn.CollationNeeded] to register
a fake collating function for any unknown collating sequence.
The fake collating function works like BINARY.
This can be used to load schemas that contain
one or more unknown collating sequences.
(*Conn) AutoVacuumPages (cb func(schema string , dbPages, freePages, bytesPerPage uint ) uint ) error
AutoVacuumPages registers a autovacuum compaction amount callback.
https://sqlite.org/c3ref/autovacuum_pages.html
(*Conn) Backup (srcDB, dstURI string ) error
Backup backs up srcDB on the src connection to the "main" database in dstURI.
Backup opens the SQLite database file dstURI,
and blocks until the entire backup is complete.
Use [Conn.BackupInit] for incremental backup.
https://sqlite.org/backup.html
(*Conn) BackupInit (srcDB, dstURI string ) (*Backup , error )
BackupInit initializes a backup operation to copy the content of one database into another.
BackupInit opens the SQLite database file dstURI,
then initializes a backup that copies the contents of srcDB on the src connection
to the "main" database in dstURI.
https://sqlite.org/c3ref/backup_finish.html#sqlite3backupinit
(*Conn) Begin () Txn
Begin starts a deferred transaction.
It panics if a transaction is in-progress.
For nested transactions, use [Conn.Savepoint] .
https://sqlite.org/lang_transaction.html
(*Conn) BeginConcurrent () (Txn , error )
BeginConcurrent starts a concurrent transaction.
Experimental: requires a custom build of SQLite.
https://sqlite.org/cgi/src/doc/begin-concurrent/doc/begin_concurrent.md
(*Conn) BeginExclusive () (Txn , error )
BeginExclusive starts an exclusive transaction.
https://sqlite.org/lang_transaction.html
(*Conn) BeginImmediate () (Txn , error )
BeginImmediate starts an immediate transaction.
https://sqlite.org/lang_transaction.html
(*Conn) BusyHandler (cb func(ctx context .Context , count int ) (retry bool )) error
BusyHandler registers a callback to handle [BUSY] errors.
https://sqlite.org/c3ref/busy_handler.html
(*Conn) BusyTimeout (timeout time .Duration ) error
BusyTimeout sets a busy timeout.
https://sqlite.org/c3ref/busy_timeout.html
(*Conn) CacheFlush () error
CacheFlush flushes caches to disk mid-transaction.
https://sqlite.org/c3ref/db_cacheflush.html
(*Conn) Changes () int64
Changes returns the number of rows modified, inserted or deleted
by the most recently completed INSERT, UPDATE or DELETE statement
on the database connection.
https://sqlite.org/c3ref/changes.html
(*Conn) Close () error
Close closes the database connection.
If the database connection is associated with unfinalized prepared statements,
open blob handles, and/or unfinished backup objects,
Close will leave the database connection open and return [BUSY] .
It is safe to close a nil, zero or closed Conn.
https://sqlite.org/c3ref/close.html
(*Conn) CollationNeeded (cb func(db *Conn , name string )) error
CollationNeeded registers a callback to be invoked
whenever an unknown collation sequence is required.
https://sqlite.org/c3ref/collation_needed.html
(*Conn) CommitHook (cb func() (ok bool ))
CommitHook registers a callback function to be invoked
whenever a transaction is committed.
Return true to allow the commit operation to continue normally.
https://sqlite.org/c3ref/commit_hook.html
(*Conn) Config (op DBConfig , arg ...bool ) (bool , error )
Config makes configuration changes to a database connection.
Only boolean configuration options are supported.
Called with no arg reads the current configuration value,
called with one arg sets and returns the new value.
https://sqlite.org/c3ref/db_config.html
(*Conn) ConfigLog (cb func(code ExtendedErrorCode , msg string )) error
ConfigLog sets up the error logging callback for the connection.
https://sqlite.org/errlog.html
(*Conn) CreateAggregateFunction (name string , nArg int , flag FunctionFlag , fn AggregateSeqFunction ) error
CreateAggregateFunction defines a new aggregate SQL function.
https://sqlite.org/c3ref/create_function.html
(*Conn) CreateCollation (name string , fn CollatingFunction ) error
CreateCollation defines a new collating sequence.
https://sqlite.org/c3ref/create_collation.html
(*Conn) CreateFunction (name string , nArg int , flag FunctionFlag , fn ScalarFunction ) error
CreateFunction defines a new scalar SQL function.
https://sqlite.org/c3ref/create_function.html
(*Conn) CreateModule (name string , create, connect VTabConstructor [T]) error
CreateModule registers a new virtual table module name.
If create is nil, the virtual table is eponymous.
https://sqlite.org/c3ref/create_module.html
(*Conn) CreateWindowFunction (name string , nArg int , flag FunctionFlag , fn AggregateConstructor ) error
CreateWindowFunction defines a new aggregate or aggregate window SQL function.
If fn returns a [WindowFunction] , an aggregate window function is created.
If fn returns an [io.Closer] , it will be called to free resources.
https://sqlite.org/c3ref/create_function.html
(*Conn) DBName (n int ) string
DBName returns the schema name for n-th database on the database connection.
https://sqlite.org/c3ref/db_name.html
(*Conn) DeclareVTab (sql string ) error
DeclareVTab declares the schema of a virtual table.
https://sqlite.org/c3ref/declare_vtab.html
(*Conn) EnableChecksums (schema string ) error
EnableChecksums enables checksums on a database.
https://sqlite.org/cksumvfs.html
(*Conn) Exec (sql string ) error
Exec is a convenience function that allows an application to run
multiple statements of SQL without having to use a lot of code.
https://sqlite.org/c3ref/exec.html
(*Conn) ExtensionInit (init func(env Env) Mod, info ExtensionInfo ) error
ExtensionInit loads an SQLite extension library.
https://sqlite.org/loadext.html
(*Conn) FileControl (schema string , op FcntlOpcode , arg ...any ) (any , error )
FileControl allows low-level control of database files.
Only a subset of opcodes are supported.
https://sqlite.org/c3ref/file_control.html
(*Conn) Filename (schema string ) *vfs .Filename
Filename returns the filename for a database.
https://sqlite.org/c3ref/db_filename.html
(*Conn) GetAutocommit () bool
GetAutocommit tests the connection for auto-commit mode.
https://sqlite.org/c3ref/get_autocommit.html
(*Conn) GetInterrupt () context .Context
GetInterrupt gets the context set with [Conn.SetInterrupt] .
(*Conn) HardHeapLimit (n int64 ) int64
HardHeapLimit imposes a hard limit on heap size.
https://sqlite.org/c3ref/hard_heap_limit64.html
(*Conn) LastInsertRowID () int64
LastInsertRowID returns the rowid of the most recent successful INSERT
on the database connection.
https://sqlite.org/c3ref/last_insert_rowid.html
(*Conn) Limit (id LimitCategory , value int ) int
Limit allows the size of various constructs to be
limited on a connection by connection basis.
https://sqlite.org/c3ref/limit.html
(*Conn) Log (code ExtendedErrorCode , format string , a ...any )
Log writes a message into the error log established by [Conn.ConfigLog] .
https://sqlite.org/c3ref/log.html
(*Conn) OpenBlob (db, table, column string , row int64 , write bool ) (*Blob , error )
OpenBlob opens a BLOB for incremental I/O.
https://sqlite.org/c3ref/blob_open.html
(*Conn) OverloadFunction (name string , nArg int ) error
OverloadFunction overloads a function for a virtual table.
https://sqlite.org/c3ref/overload_function.html
(*Conn) PreUpdateHook (cb func(PreUpdateData ))
PreUpdateHook registers a callback function that is invoked prior
to each INSERT, UPDATE, and DELETE operation on a database table.
https://sqlite.org/c3ref/preupdate_blobwrite.html
(*Conn) Prepare (sql string ) (stmt *Stmt , tail string , err error )
Prepare calls [Conn.PrepareFlags] with no flags.
(*Conn) PrepareFlags (sql string , flags PrepareFlag ) (stmt *Stmt , tail string , err error )
PrepareFlags compiles the first SQL statement in sql;
tail is left pointing to what remains uncompiled.
If the input text contains no SQL (if the input is an empty string or a comment),
both stmt and err will be nil.
https://sqlite.org/c3ref/prepare.html
(*Conn) ReadOnly (schema string ) (ro, ok bool )
ReadOnly determines if a database is read-only.
https://sqlite.org/c3ref/db_readonly.html
(*Conn) ReleaseMemory () error
ReleaseMemory frees memory used by a database connection.
https://sqlite.org/c3ref/db_release_memory.html
(*Conn) Restore (dstDB, srcURI string ) error
Restore restores dstDB on the dst connection from the "main" database in srcURI.
Restore opens the SQLite database file srcURI,
and blocks until the entire restore is complete.
https://sqlite.org/backup.html
(*Conn) RollbackHook (cb func())
RollbackHook registers a callback function to be invoked
whenever a transaction is rolled back.
https://sqlite.org/c3ref/commit_hook.html
(*Conn) Savepoint () Savepoint
Savepoint establishes a new transaction savepoint.
https://sqlite.org/lang_savepoint.html
(*Conn) SetAuthorizer (cb func(action AuthorizerActionCode , name3rd, name4th, schema, inner string ) AuthorizerReturnCode ) error
SetAuthorizer registers an authorizer callback with the database connection.
https://sqlite.org/c3ref/set_authorizer.html
(*Conn) SetInterrupt (ctx context .Context ) (old context .Context )
SetInterrupt interrupts a long-running query when a context is done.
Subsequent uses of the connection will return [INTERRUPT]
until the context is reset by another call to SetInterrupt.
To associate a timeout with a connection:
ctx, cancel := context.WithTimeout(context.TODO(), 100*time.Millisecond)
conn.SetInterrupt(ctx)
defer cancel()
SetInterrupt returns the old context assigned to the connection.
https://sqlite.org/c3ref/interrupt.html
(*Conn) SetLastInsertRowID (id int64 )
SetLastInsertRowID allows the application to set the value returned by
[Conn.LastInsertRowID] .
https://sqlite.org/c3ref/set_last_insert_rowid.html
(*Conn) SoftHeapLimit (n int64 ) int64
SoftHeapLimit imposes a soft limit on heap size.
https://sqlite.org/c3ref/hard_heap_limit64.html
(*Conn) Status (op DBStatus , reset bool ) (current, highwater int64 , err error )
Status retrieves runtime status information about a database connection.
https://sqlite.org/c3ref/db_status.html
(*Conn) Stmts () iter .Seq [*Stmt ]
Stmts returns an iterator for the prepared statements
associated with the database connection.
https://sqlite.org/c3ref/next_stmt.html
(*Conn) TableColumnMetadata (schema, table, column string ) (declType, collSeq string , notNull, primaryKey, autoInc bool , err error )
TableColumnMetadata extracts metadata about a column of a table.
https://sqlite.org/c3ref/table_column_metadata.html
(*Conn) TotalChanges () int64
TotalChanges returns the number of rows modified, inserted or deleted
by all INSERT, UPDATE or DELETE statements completed
since the database connection was opened.
https://sqlite.org/c3ref/total_changes.html
(*Conn) Trace (mask TraceEvent , cb func(evt TraceEvent , arg1, arg2 any ) error ) error
Trace registers a trace callback function against the database connection.
https://sqlite.org/c3ref/trace_v2.html
(*Conn) TxnState (schema string ) TxnState
TxnState determines the transaction state of a database.
https://sqlite.org/c3ref/txn_state.html
(*Conn) UpdateHook (cb func(op AuthorizerActionCode , schema, table string , rowid int64 ))
UpdateHook registers a callback function to be invoked
whenever a row is updated, inserted or deleted in a rowid table.
https://sqlite.org/c3ref/update_hook.html
(*Conn) VTabConfig (op VTabConfigOption , args ...any ) error
VTabConfig configures various facets of the virtual table interface.
https://sqlite.org/c3ref/vtab_config.html
(*Conn) VTabOnConflict () VTabConflictMode
VTabOnConflict determines the virtual table conflict policy.
https://sqlite.org/c3ref/vtab_on_conflict.html
(*Conn) WALAutoCheckpoint (pages int ) error
WALAutoCheckpoint configures WAL auto-checkpoints.
https://sqlite.org/c3ref/wal_autocheckpoint.html
(*Conn) WALCheckpoint (schema string , mode CheckpointMode ) (nLog, nCkpt int , err error )
WALCheckpoint checkpoints a WAL database.
https://sqlite.org/c3ref/wal_checkpoint_v2.html
(*Conn) WALHook (cb func(db *Conn , schema string , pages int ) error )
WALHook registers a callback function to be invoked
each time data is committed to a database in WAL mode.
https://sqlite.org/c3ref/wal_hook.html
Implements (at least 2 )
*Conn : github.com/prometheus/common/expfmt.Closer
*Conn : io.Closer
As Outputs Of (at least 7 )
func Open (filename string ) (*Conn , error )
func OpenContext (ctx context .Context , filename string ) (*Conn , error )
func OpenFlags (filename string , flags OpenFlag ) (*Conn , error )
func Context .Conn () *Conn
func (*PreUpdateData ).Conn () *Conn
func (*Stmt ).Conn () *Conn
func github.com/ncruces/go-sqlite3/driver.Conn .Raw () *Conn
As Inputs Of (at least 2 )
func CreateModule [T](db *Conn , name string , create, connect VTabConstructor [T]) error
func ExtensionInit [Env, Mod](db *Conn , init func(env Env) Mod, info ExtensionInfo ) error
type Context (struct)
Context is the context in which an SQL function executes.
It is in no way related to a Go [context.Context] .
A Context must not be retained beyond the callback that receives it.
https://sqlite.org/c3ref/context.html
Methods (total 19 )
( Context) Conn () *Conn
Conn returns the database connection of the
[Conn.CreateFunction] or [Conn.CreateWindowFunction]
routines that originally registered the application defined function.
https://sqlite.org/c3ref/context_db_handle.html
( Context) GetAuxData (n int ) any
GetAuxData returns metadata for argument n of the function.
https://sqlite.org/c3ref/get_auxdata.html
( Context) ResultBlob (value []byte )
ResultBlob sets the result of the function to a []byte.
Returning a nil slice is the same as calling [Context.ResultNull] .
https://sqlite.org/c3ref/result_blob.html
( Context) ResultBool (value bool )
ResultBool sets the result of the function to a bool.
SQLite does not have a separate boolean storage class.
Instead, boolean values are stored as integers 0 (false) and 1 (true).
https://sqlite.org/c3ref/result_blob.html
( Context) ResultError (err error )
ResultError sets the result of the function an error.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultFloat (value float64 )
ResultFloat sets the result of the function to a float64.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultInt (value int )
ResultInt sets the result of the function to an int.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultInt64 (value int64 )
ResultInt64 sets the result of the function to an int64.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultJSON (value any )
ResultJSON sets the result of the function to the JSON encoding of value.
If you return JSON from application-defined functions,
consider registering those functions with [RESULT_SUBTYPE]
and calling [Context.ResultSubtype] with 'J'.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultNull ()
ResultNull sets the result of the function to NULL.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultPointer (ptr any )
ResultPointer sets the result of the function to NULL, just like [Context.ResultNull] ,
except that it also associates ptr with that NULL value such that it can be retrieved
within an application-defined SQL function using [Value.Pointer] .
https://sqlite.org/c3ref/result_blob.html
( Context) ResultRawText (value []byte )
ResultRawText sets the text result of the function to a []byte.
Returning a nil slice is the same as calling [Context.ResultNull] .
https://sqlite.org/c3ref/result_blob.html
( Context) ResultSubtype (t uint )
ResultSubtype sets the subtype of the result of the function.
https://sqlite.org/c3ref/result_subtype.html
( Context) ResultText (value string )
ResultText sets the result of the function to a string.
https://sqlite.org/c3ref/result_blob.html
( Context) ResultTime (value time .Time , format TimeFormat )
ResultTime sets the result of the function to a [time.Time] .
https://sqlite.org/c3ref/result_blob.html
( Context) ResultValue (value Value )
ResultValue sets the result of the function to a copy of [Value] .
https://sqlite.org/c3ref/result_blob.html
( Context) ResultZeroBlob (n int64 )
ResultZeroBlob sets the result of the function to a zero-filled, length n BLOB.
https://sqlite.org/c3ref/result_blob.html
( Context) SetAuxData (n int , data any )
SetAuxData saves metadata for argument n of the function.
https://sqlite.org/c3ref/get_auxdata.html
( Context) VTabNoChange () bool
VTabNoChange may return true if a column is being fetched as part
of an update during which the column value will not change.
https://sqlite.org/c3ref/vtab_nochange.html
As Inputs Of (at least 6 )
func AggregateFunction .Step (ctx Context , arg ...Value )
func AggregateFunction .Value (ctx Context )
func VTabCursor .Column (ctx Context , n int ) error
func WindowFunction .Inverse (ctx Context , arg ...Value )
func WindowFunction .Step (ctx Context , arg ...Value )
func WindowFunction .Value (ctx Context )
type ExtEnv (struct)
ExtEnv is the concrete type passed to [ExtensionInit] initializers.
ExtEnv exposes undocumented internal APIs that are subject to change without notice.
Fields (total 7 )
Wrapper *sqlite3_wrap .Wrapper
Wrapper .DB any
Wrapper .Memory *sqlite3_wrap .Memory
Wrapper .Memory .Buf []byte
Wrapper .Memory .Max int64
Wrapper .Module *sqlite3_wasm .Module
Wrapper .SysError error
Methods (total 297 )
( ExtEnv) AddHandle (a any ) sqlite3_wrap .Ptr_t
( ExtEnv) Bytes (ptr sqlite3_wrap .Ptr_t , size int64 ) []byte
(*ExtEnv) CallWithContextValues (pCtx, nVal, pVal int32 , fn func(Context , ...Value ))
CallWithContextValues calls fn with a [Context] and [Value] arguments decoded from pointers.
( ExtEnv) Close () (err error )
( ExtEnv) DelHandle (id sqlite3_wrap .Ptr_t ) error
( ExtEnv) Free (ptr sqlite3_wrap .Ptr_t )
( ExtEnv) GetHandle (id sqlite3_wrap .Ptr_t ) any
( ExtEnv) Grow (delta, max int64 ) int64
( ExtEnv) MapRegion (f *os .File , offset int64 , size int32 , readOnly bool ) (*sqlite3_wrap .MappedRegion , error )
( ExtEnv) New (size int64 ) sqlite3_wrap .Ptr_t
( ExtEnv) NewArena () sqlite3_wrap .Arena
( ExtEnv) NewBytes (b []byte ) sqlite3_wrap .Ptr_t
( ExtEnv) NewString (s string ) sqlite3_wrap .Ptr_t
( ExtEnv) Read (ptr sqlite3_wrap .Ptr_t ) byte
( ExtEnv) Read32 (ptr sqlite3_wrap .Ptr_t ) uint32
( ExtEnv) Read64 (ptr sqlite3_wrap .Ptr_t ) uint64
( ExtEnv) ReadBool (ptr sqlite3_wrap .Ptr_t ) bool
( ExtEnv) ReadFloat64 (ptr sqlite3_wrap .Ptr_t ) float64
( ExtEnv) ReadString (ptr sqlite3_wrap .Ptr_t , maxlen int64 ) string
( ExtEnv) Realloc (ptr sqlite3_wrap .Ptr_t , size int64 ) sqlite3_wrap .Ptr_t
( ExtEnv) Slice () *[]byte
( ExtEnv) StackAlloc (size int64 ) sqlite3_wrap .Ptr_t
( ExtEnv) StackMark () (reset func())
( ExtEnv) Write (ptr sqlite3_wrap .Ptr_t , v byte )
( ExtEnv) Write32 (ptr sqlite3_wrap .Ptr_t , v uint32 )
( ExtEnv) Write64 (ptr sqlite3_wrap .Ptr_t , v uint64 )
( ExtEnv) WriteBool (ptr sqlite3_wrap .Ptr_t , v bool )
( ExtEnv) WriteBytes (ptr sqlite3_wrap .Ptr_t , b []byte )
( ExtEnv) WriteFloat64 (ptr sqlite3_wrap .Ptr_t , v float64 )
( ExtEnv) WriteString (ptr sqlite3_wrap .Ptr_t , s string )
( ExtEnv) X__indirect_function_table () *[]any
(*ExtEnv) X__memory_base () *int32
( ExtEnv) X__stack_pointer () *int32
(*ExtEnv) X__table_base () *int32
( ExtEnv) X_initialize ()
( ExtEnv) Xexit (c int32 )
( ExtEnv) Xfclose (h int32 ) int32
( ExtEnv) Xfflush (h int32 ) int32
( ExtEnv) Xfopen (path, mode int32 ) int32
( ExtEnv) Xfputc (c, h int32 ) int32
( ExtEnv) Xfread (ptr, sz, cnt, h int32 ) int32
( ExtEnv) Xfseek (h, offset, whence int32 ) int32
( ExtEnv) Xftell (h int32 ) int32
( ExtEnv) Xfwrite (ptr, sz, cnt, h int32 ) int32
( ExtEnv) Xgo_access (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xgo_check_reserved_lock (v0, v1 int32 ) int32
( ExtEnv) Xgo_close (v0 int32 ) int32
( ExtEnv) Xgo_current_time_64 (pVfs, nMicro int32 ) int32
( ExtEnv) Xgo_delete (v0, v1, v2 int32 ) int32
( ExtEnv) Xgo_destroy (pApp int32 )
( ExtEnv) Xgo_device_characteristics (v0 int32 ) int32
( ExtEnv) Xgo_fetch (v0 int32 , v1 int64 , v2, v3 int32 ) int32
( ExtEnv) Xgo_file_control (v0, v1, v2 int32 ) int32
( ExtEnv) Xgo_file_size (v0, v1 int32 ) int32
( ExtEnv) Xgo_full_pathname (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xgo_lock (v0, v1 int32 ) int32
( ExtEnv) Xgo_open (v0, v1, v2, v3, v4, v5 int32 ) int32
( ExtEnv) Xgo_randomness (pVfs, nByte, zByte int32 ) int32
( ExtEnv) Xgo_read (v0, v1, v2 int32 , v3 int64 ) int32
( ExtEnv) Xgo_sector_size (v0 int32 ) int32
( ExtEnv) Xgo_shm_barrier (v0 int32 )
( ExtEnv) Xgo_shm_lock (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xgo_shm_map (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xgo_shm_unmap (v0, v1 int32 ) int32
( ExtEnv) Xgo_sleep (pVfs, nMicro int32 ) int32
( ExtEnv) Xgo_sync (v0, v1 int32 ) int32
( ExtEnv) Xgo_truncate (v0 int32 , v1 int64 ) int32
( ExtEnv) Xgo_unfetch (v0 int32 , v1 int64 , v2 int32 ) int32
( ExtEnv) Xgo_unlock (v0, v1 int32 ) int32
( ExtEnv) Xgo_write (v0, v1, v2 int32 , v3 int64 ) int32
( ExtEnv) Xmain_mptest (v0, v1 int32 ) int32
( ExtEnv) Xmain_speedtest1 (v0, v1 int32 ) int32
( ExtEnv) Xmemalign (v0, v1 int32 ) int32
( ExtEnv) Xmemory () sqlite3_wasm .Memory
( ExtEnv) Xputs (ptr int32 ) int32
( ExtEnv) Xsqlite3_aggregate_context (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_autovacuum_pages_go (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_backup_finish (v0 int32 ) int32
( ExtEnv) Xsqlite3_backup_init (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_backup_pagecount (v0 int32 ) int32
( ExtEnv) Xsqlite3_backup_remaining (v0 int32 ) int32
( ExtEnv) Xsqlite3_backup_step (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_bind_blob (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_bind_blob64 (v0, v1, v2 int32 , v3 int64 , v4 int32 ) int32
( ExtEnv) Xsqlite3_bind_blob_go (v0, v1, v2 int32 , v3 int64 ) int32
( ExtEnv) Xsqlite3_bind_double (v0, v1 int32 , v2 float64 ) int32
( ExtEnv) Xsqlite3_bind_int (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_bind_int64 (v0, v1 int32 , v2 int64 ) int32
( ExtEnv) Xsqlite3_bind_null (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_bind_parameter_count (v0 int32 ) int32
( ExtEnv) Xsqlite3_bind_parameter_index (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_bind_parameter_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_bind_pointer (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_bind_pointer_go (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_bind_text (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_bind_text64 (v0, v1, v2 int32 , v3 int64 , v4, v5 int32 ) int32
( ExtEnv) Xsqlite3_bind_text_go (v0, v1, v2 int32 , v3 int64 ) int32
( ExtEnv) Xsqlite3_bind_value (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_bind_zeroblob (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_bind_zeroblob64 (v0, v1 int32 , v2 int64 ) int32
( ExtEnv) Xsqlite3_blob_bytes (v0 int32 ) int32
( ExtEnv) Xsqlite3_blob_close (v0 int32 ) int32
( ExtEnv) Xsqlite3_blob_open (v0, v1, v2, v3 int32 , v4 int64 , v5, v6 int32 ) int32
( ExtEnv) Xsqlite3_blob_read (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_blob_reopen (v0 int32 , v1 int64 ) int32
( ExtEnv) Xsqlite3_blob_write (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_busy_handler_go (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_busy_timeout (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_changes (v0 int32 ) int32
( ExtEnv) Xsqlite3_changes64 (v0 int32 ) int64
( ExtEnv) Xsqlite3_clear_bindings (v0 int32 ) int32
( ExtEnv) Xsqlite3_close (v0 int32 ) int32
( ExtEnv) Xsqlite3_close_v2 (v0 int32 ) int32
( ExtEnv) Xsqlite3_collation_needed_go (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_blob (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_bytes (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_count (v0 int32 ) int32
( ExtEnv) Xsqlite3_column_database_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_decltype (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_double (v0, v1 int32 ) float64
( ExtEnv) Xsqlite3_column_int (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_int64 (v0, v1 int32 ) int64
( ExtEnv) Xsqlite3_column_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_origin_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_table_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_text (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_type (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_column_value (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_columns_go (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_commit_hook_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_config_log_go (v0 int32 ) int32
( ExtEnv) Xsqlite3_context_db_handle (v0 int32 ) int32
( ExtEnv) Xsqlite3_create_aggregate_function_go (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_create_collation (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_create_collation_go (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_create_collation_v2 (v0, v1, v2, v3, v4, v5 int32 ) int32
( ExtEnv) Xsqlite3_create_function (v0, v1, v2, v3, v4, v5, v6, v7 int32 ) int32
( ExtEnv) Xsqlite3_create_function_go (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_create_function_v2 (v0, v1, v2, v3, v4, v5, v6, v7, v8 int32 ) int32
( ExtEnv) Xsqlite3_create_module (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_create_module_go (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_create_module_v2 (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_create_window_function (v0, v1, v2, v3, v4, v5, v6, v7, v8, v9 int32 ) int32
( ExtEnv) Xsqlite3_create_window_function_go (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_data_count (v0 int32 ) int32
( ExtEnv) Xsqlite3_database_file_object (v0 int32 ) int32
( ExtEnv) Xsqlite3_db_cacheflush (v0 int32 ) int32
( ExtEnv) Xsqlite3_db_config (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_db_filename (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_db_handle (v0 int32 ) int32
( ExtEnv) Xsqlite3_db_name (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_db_readonly (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_db_release_memory (v0 int32 ) int32
( ExtEnv) Xsqlite3_db_status (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_db_status64 (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_declare_vtab (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_errcode (v0 int32 ) int32
( ExtEnv) Xsqlite3_errmsg (v0 int32 ) int32
( ExtEnv) Xsqlite3_error_offset (v0 int32 ) int32
( ExtEnv) Xsqlite3_errstr (v0 int32 ) int32
( ExtEnv) Xsqlite3_exec (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_exec_go (v0 int32 ) int32
( ExtEnv) Xsqlite3_expanded_sql (v0 int32 ) int32
( ExtEnv) Xsqlite3_extended_errcode (v0 int32 ) int32
( ExtEnv) Xsqlite3_file_control (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_filename_database (v0 int32 ) int32
( ExtEnv) Xsqlite3_filename_journal (v0 int32 ) int32
( ExtEnv) Xsqlite3_filename_wal (v0 int32 ) int32
( ExtEnv) Xsqlite3_finalize (v0 int32 ) int32
( ExtEnv) Xsqlite3_free (v0 int32 )
( ExtEnv) Xsqlite3_get_autocommit (v0 int32 ) int32
( ExtEnv) Xsqlite3_get_auxdata (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_hard_heap_limit64 (v0 int64 ) int64
( ExtEnv) Xsqlite3_interrupt (v0 int32 )
( ExtEnv) Xsqlite3_invoke_busy_handler_go (v0 int64 ) int32
( ExtEnv) Xsqlite3_is_interrupted (v0 int32 ) int32
( ExtEnv) Xsqlite3_last_insert_rowid (v0 int32 ) int64
( ExtEnv) Xsqlite3_libversion () int32
( ExtEnv) Xsqlite3_libversion_number () int32
( ExtEnv) Xsqlite3_limit (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_log (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_log_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_malloc (v0 int32 ) int32
( ExtEnv) Xsqlite3_malloc64 (v0 int64 ) int32
( ExtEnv) Xsqlite3_mprintf (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_msize (v0 int32 ) int64
( ExtEnv) Xsqlite3_open_v2 (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_overload_function (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_prepare (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_prepare_v2 (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_prepare_v3 (v0, v1, v2, v3, v4, v5 int32 ) int32
( ExtEnv) Xsqlite3_preupdate_blobwrite (v0 int32 ) int32
( ExtEnv) Xsqlite3_preupdate_count (v0 int32 ) int32
( ExtEnv) Xsqlite3_preupdate_depth (v0 int32 ) int32
( ExtEnv) Xsqlite3_preupdate_hook_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_preupdate_new (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_preupdate_old (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_progress_handler_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_randomness (v0, v1 int32 )
( ExtEnv) Xsqlite3_realloc (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_realloc64 (v0 int32 , v1 int64 ) int32
( ExtEnv) Xsqlite3_reset (v0 int32 ) int32
( ExtEnv) Xsqlite3_result_blob (v0, v1, v2, v3 int32 )
( ExtEnv) Xsqlite3_result_blob64 (v0, v1 int32 , v2 int64 , v3 int32 )
( ExtEnv) Xsqlite3_result_blob_go (v0, v1 int32 , v2 int64 )
( ExtEnv) Xsqlite3_result_double (v0 int32 , v1 float64 )
( ExtEnv) Xsqlite3_result_error (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_result_error_code (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_error_nomem (v0 int32 )
( ExtEnv) Xsqlite3_result_error_toobig (v0 int32 )
( ExtEnv) Xsqlite3_result_int (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_int64 (v0 int32 , v1 int64 )
( ExtEnv) Xsqlite3_result_null (v0 int32 )
( ExtEnv) Xsqlite3_result_pointer (v0, v1, v2, v3 int32 )
( ExtEnv) Xsqlite3_result_pointer_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_subtype (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_text (v0, v1, v2, v3 int32 )
( ExtEnv) Xsqlite3_result_text64 (v0, v1 int32 , v2 int64 , v3, v4 int32 )
( ExtEnv) Xsqlite3_result_text_go (v0, v1 int32 , v2 int64 )
( ExtEnv) Xsqlite3_result_value (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_zeroblob (v0, v1 int32 )
( ExtEnv) Xsqlite3_result_zeroblob64 (v0 int32 , v1 int64 ) int32
( ExtEnv) Xsqlite3_rollback_hook_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_set_authorizer_go (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_set_auxdata (v0, v1, v2, v3 int32 )
( ExtEnv) Xsqlite3_set_auxdata_go (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_set_errmsg (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_set_last_insert_rowid (v0 int32 , v1 int64 )
( ExtEnv) Xsqlite3_sleep (v0 int32 ) int32
( ExtEnv) Xsqlite3_snprintf (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_soft_heap_limit64 (v0 int64 ) int64
( ExtEnv) Xsqlite3_sourceid () int32
( ExtEnv) Xsqlite3_sql (v0 int32 ) int32
( ExtEnv) Xsqlite3_step (v0 int32 ) int32
( ExtEnv) Xsqlite3_stmt_busy (v0 int32 ) int32
( ExtEnv) Xsqlite3_stmt_readonly (v0 int32 ) int32
( ExtEnv) Xsqlite3_stmt_status (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_str_append (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_str_appendall (v0, v1 int32 )
( ExtEnv) Xsqlite3_str_appendchar (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_str_appendf (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_str_errcode (v0 int32 ) int32
( ExtEnv) Xsqlite3_str_finish (v0 int32 ) int32
( ExtEnv) Xsqlite3_str_free (v0 int32 )
( ExtEnv) Xsqlite3_str_length (v0 int32 ) int32
( ExtEnv) Xsqlite3_str_new (v0 int32 ) int32
( ExtEnv) Xsqlite3_str_reset (v0 int32 )
( ExtEnv) Xsqlite3_str_truncate (v0, v1 int32 )
( ExtEnv) Xsqlite3_str_value (v0 int32 ) int32
( ExtEnv) Xsqlite3_str_vappendf (v0, v1, v2 int32 )
( ExtEnv) Xsqlite3_strglob (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_stricmp (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_strlike (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_strnicmp (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_table_column_metadata (v0, v1, v2, v3, v4, v5, v6, v7, v8 int32 ) int32
( ExtEnv) Xsqlite3_total_changes (v0 int32 ) int32
( ExtEnv) Xsqlite3_total_changes64 (v0 int32 ) int64
( ExtEnv) Xsqlite3_trace_go (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_txn_state (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_update_hook_go (v0, v1 int32 )
( ExtEnv) Xsqlite3_uri_boolean (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_uri_int64 (v0, v1 int32 , v2 int64 ) int64
( ExtEnv) Xsqlite3_uri_key (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_uri_parameter (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_user_data (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_blob (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_bytes (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_double (v0 int32 ) float64
( ExtEnv) Xsqlite3_value_dup (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_free (v0 int32 )
( ExtEnv) Xsqlite3_value_frombind (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_int (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_int64 (v0 int32 ) int64
( ExtEnv) Xsqlite3_value_nochange (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_numeric_type (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_pointer (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_value_pointer_go (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_subtype (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_text (v0 int32 ) int32
( ExtEnv) Xsqlite3_value_type (v0 int32 ) int32
( ExtEnv) Xsqlite3_vmprintf (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_vsnprintf (v0, v1, v2, v3 int32 ) int32
( ExtEnv) Xsqlite3_vtab_collation (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_vtab_config (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_vtab_config_go (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_vtab_distinct (v0 int32 ) int32
( ExtEnv) Xsqlite3_vtab_in (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_vtab_in_first (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_vtab_in_next (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_vtab_nochange (v0 int32 ) int32
( ExtEnv) Xsqlite3_vtab_on_conflict (v0 int32 ) int32
( ExtEnv) Xsqlite3_vtab_rhs_value (v0, v1, v2 int32 ) int32
( ExtEnv) Xsqlite3_wal_autocheckpoint (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_wal_checkpoint (v0, v1 int32 ) int32
( ExtEnv) Xsqlite3_wal_checkpoint_v2 (v0, v1, v2, v3, v4 int32 ) int32
( ExtEnv) Xsqlite3_wal_hook_go (v0, v1 int32 )
( ExtEnv) Xsystem (ptr int32 ) int32
Implements (at least 2 )
ExtEnv : github.com/prometheus/common/expfmt.Closer
ExtEnv : io.Closer
type Stmt (struct)
Stmt is a prepared statement object.
https://sqlite.org/c3ref/stmt.html
Methods (total 49 )
(*Stmt) BindBlob (param int , value []byte ) error
BindBlob binds a []byte to the prepared statement.
The leftmost SQL parameter has an index of 1.
Binding a nil slice is the same as calling [Stmt.BindNull] .
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindBool (param int , value bool ) error
BindBool binds a bool to the prepared statement.
The leftmost SQL parameter has an index of 1.
SQLite does not have a separate boolean storage class.
Instead, boolean values are stored as integers 0 (false) and 1 (true).
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindCount () int
BindCount returns the number of SQL parameters in the prepared statement.
https://sqlite.org/c3ref/bind_parameter_count.html
(*Stmt) BindFloat (param int , value float64 ) error
BindFloat binds a float64 to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindIndex (name string ) int
BindIndex returns the index of a parameter in the prepared statement
given its name.
https://sqlite.org/c3ref/bind_parameter_index.html
(*Stmt) BindInt (param int , value int ) error
BindInt binds an int to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindInt64 (param int , value int64 ) error
BindInt64 binds an int64 to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindJSON (param int , value any ) error
BindJSON binds the JSON encoding of value to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindName (param int ) string
BindName returns the name of a parameter in the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_parameter_name.html
(*Stmt) BindNull (param int ) error
BindNull binds a NULL to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindPointer (param int , ptr any ) error
BindPointer binds a NULL to the prepared statement, just like [Stmt.BindNull] ,
but it also associates ptr with that NULL value such that it can be retrieved
within an application-defined SQL function using [Value.Pointer] .
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindRawText (param int , value []byte ) error
BindRawText binds a []byte to the prepared statement as text.
The leftmost SQL parameter has an index of 1.
Binding a nil slice is the same as calling [Stmt.BindNull] .
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindText (param int , value string ) error
BindText binds a string to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindTime (param int , value time .Time , format TimeFormat ) error
BindTime binds a [time.Time] to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindValue (param int , value Value ) error
BindValue binds a copy of value to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) BindZeroBlob (param int , n int64 ) error
BindZeroBlob binds a zero-filled, length n BLOB to the prepared statement.
The leftmost SQL parameter has an index of 1.
https://sqlite.org/c3ref/bind_blob.html
(*Stmt) Busy () bool
Busy determines if a prepared statement has been reset.
https://sqlite.org/c3ref/stmt_busy.html
(*Stmt) ClearBindings () error
ClearBindings resets all bindings on the prepared statement.
https://sqlite.org/c3ref/clear_bindings.html
(*Stmt) Close () error
Close destroys the prepared statement object.
It is safe to close a nil, zero or closed Stmt.
https://sqlite.org/c3ref/finalize.html
(*Stmt) ColumnBlob (col int , buf []byte ) []byte
ColumnBlob appends to buf and returns
the value of the result column as a []byte.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnBool (col int ) bool
ColumnBool returns the value of the result column as a bool.
The leftmost column of the result set has the index 0.
SQLite does not have a separate boolean storage class.
Instead, boolean values are retrieved as numbers,
with 0 converted to false and any other value to true.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnCount () int
ColumnCount returns the number of columns in a result set.
https://sqlite.org/c3ref/column_count.html
(*Stmt) ColumnDatabaseName (col int ) string
ColumnDatabaseName returns the name of the database
that is the origin of a particular result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_database_name.html
(*Stmt) ColumnDeclType (col int ) string
ColumnDeclType returns the declared datatype of the result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_decltype.html
(*Stmt) ColumnFloat (col int ) float64
ColumnFloat returns the value of the result column as a float64.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnInt (col int ) int
ColumnInt returns the value of the result column as an int.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnInt64 (col int ) int64
ColumnInt64 returns the value of the result column as an int64.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnJSON (col int , ptr any ) error
ColumnJSON parses the JSON-encoded value of the result column
and stores it in the value pointed to by ptr.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnName (col int ) string
ColumnName returns the name of the result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_name.html
(*Stmt) ColumnOriginName (col int ) string
ColumnOriginName returns the name of the table column
that is the origin of a particular result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_database_name.html
(*Stmt) ColumnRawBlob (col int ) []byte
ColumnRawBlob returns the value of the result column as a []byte.
The []byte is owned by SQLite and may be invalidated by
subsequent calls to [Stmt] methods.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnRawText (col int ) []byte
ColumnRawText returns the value of the result column as a []byte.
The []byte is owned by SQLite and may be invalidated by
subsequent calls to [Stmt] methods.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnTableName (col int ) string
ColumnTableName returns the name of the table
that is the origin of a particular result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_database_name.html
(*Stmt) ColumnText (col int ) string
ColumnText returns the value of the result column as a string.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnTime (col int , format TimeFormat ) time .Time
ColumnTime returns the value of the result column as a [time.Time] .
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnType (col int ) Datatype
ColumnType returns the initial [Datatype] of the result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) ColumnValue (col int ) Value
ColumnValue returns the unprotected value of the result column.
The leftmost column of the result set has the index 0.
https://sqlite.org/c3ref/column_blob.html
(*Stmt) Columns (dest ...any ) error
Columns populates result columns into the provided slice.
The slice must have [Stmt.ColumnCount] length.
[INTEGER] columns will be retrieved as int64 values,
[FLOAT] as float64, [NULL] as nil,
[TEXT] as string, and [BLOB] as []byte.
(*Stmt) ColumnsRaw (dest ...any ) error
ColumnsRaw populates result columns into the provided slice.
The slice must have [Stmt.ColumnCount] length.
[INTEGER] columns will be retrieved as int64 values,
[FLOAT] as float64, [NULL] as nil,
[TEXT] and [BLOB] as []byte.
Any []byte are owned by SQLite and may be invalidated by
subsequent calls to [Stmt] methods.
(*Stmt) Conn () *Conn
Conn returns the database connection to which the prepared statement belongs.
https://sqlite.org/c3ref/db_handle.html
(*Stmt) DataCount () int
DataCount resets the number of columns in a result set.
https://sqlite.org/c3ref/data_count.html
(*Stmt) Err () error
Err gets the last error occurred during [Stmt.Step] .
Err returns nil after [Stmt.Reset] is called.
https://sqlite.org/c3ref/step.html
(*Stmt) Exec () error
Exec is a convenience function that repeatedly calls [Stmt.Step] until it returns false,
then calls [Stmt.Reset] to reset the statement and get any error that occurred.
(*Stmt) ExpandedSQL () string
ExpandedSQL returns the SQL text of the prepared statement
with bound parameters expanded.
https://sqlite.org/c3ref/expanded_sql.html
(*Stmt) ReadOnly () bool
ReadOnly returns true if and only if the statement
makes no direct changes to the content of the database file.
https://sqlite.org/c3ref/stmt_readonly.html
(*Stmt) Reset () error
Reset resets the prepared statement object.
https://sqlite.org/c3ref/reset.html
(*Stmt) SQL () string
SQL returns the SQL text used to create the prepared statement.
https://sqlite.org/c3ref/expanded_sql.html
(*Stmt) Status (op StmtStatus , reset bool ) int
Status monitors the performance characteristics of prepared statements.
https://sqlite.org/c3ref/stmt_status.html
(*Stmt) Step () bool
Step evaluates the SQL statement.
If the SQL statement being executed returns any data,
then true is returned each time a new row of data is ready for processing by the caller.
The values may be accessed using the Column access functions.
Step is called again to retrieve the next row of data.
If an error has occurred, Step returns false;
call [Stmt.Err] or [Stmt.Reset] to get the error.
https://sqlite.org/c3ref/step.html
Implements (at least 2 )
*Stmt : github.com/prometheus/common/expfmt.Closer
*Stmt : io.Closer
As Outputs Of (at least 2 )
func (*Conn ).Prepare (sql string ) (stmt *Stmt , tail string , err error )
func (*Conn ).PrepareFlags (sql string , flags PrepareFlag ) (stmt *Stmt , tail string , err error )
type Value (struct)
Value is any value that can be stored in a database table.
A Value is bound to its [Conn] and, unless copied with [Value.Dup] ,
must not be retained beyond the callback or [Stmt.Step] that produced it.
https://sqlite.org/c3ref/value.html
Methods (total 20 )
( Value) Blob (buf []byte ) []byte
Blob appends to buf and returns
the value as a []byte.
https://sqlite.org/c3ref/value_blob.html
( Value) Bool () bool
Bool returns the value as a bool.
SQLite does not have a separate boolean storage class.
Instead, boolean values are retrieved as numbers,
with 0 converted to false and any other value to true.
https://sqlite.org/c3ref/value_blob.html
(*Value) Close () error
Close frees an SQL value previously obtained by [Value.Dup] .
https://sqlite.org/c3ref/value_dup.html
( Value) Dup () *Value
Dup makes a copy of the SQL value and returns a pointer to that copy.
https://sqlite.org/c3ref/value_dup.html
( Value) Float () float64
Float returns the value as a float64.
https://sqlite.org/c3ref/value_blob.html
( Value) FromBind () bool
FromBind returns true if value originated from a bound parameter.
https://sqlite.org/c3ref/value_blob.html
( Value) InFirst () (Value , error )
InFirst returns the first element
on the right-hand side of an IN constraint.
https://sqlite.org/c3ref/vtab_in_first.html
( Value) InNext () (Value , error )
InNext returns the next element
on the right-hand side of an IN constraint.
https://sqlite.org/c3ref/vtab_in_first.html
( Value) Int () int
Int returns the value as an int.
https://sqlite.org/c3ref/value_blob.html
( Value) Int64 () int64
Int64 returns the value as an int64.
https://sqlite.org/c3ref/value_blob.html
( Value) JSON (ptr any ) error
JSON parses a JSON-encoded value
and stores the result in the value pointed to by ptr.
( Value) NoChange () bool
NoChange returns true if and only if the value is unchanged
in a virtual table update operatiom.
https://sqlite.org/c3ref/value_blob.html
( Value) NumericType () Datatype
NumericType returns the numeric datatype of the value.
https://sqlite.org/c3ref/value_blob.html
( Value) Pointer () any
Pointer gets the pointer associated with this value,
or nil if it has no associated pointer.
( Value) RawBlob () []byte
RawBlob returns the value as a []byte.
The []byte is owned by SQLite and may be invalidated by
subsequent calls to [Value] methods.
https://sqlite.org/c3ref/value_blob.html
( Value) RawText () []byte
RawText returns the value as a []byte.
The []byte is owned by SQLite and may be invalidated by
subsequent calls to [Value] methods.
https://sqlite.org/c3ref/value_blob.html
( Value) Subtype () uint
Subtype returns the subtype of the value.
https://sqlite.org/c3ref/value_subtype.html
( Value) Text () string
Text returns the value as a string.
https://sqlite.org/c3ref/value_blob.html
( Value) Time (format TimeFormat ) time .Time
Time returns the value as a [time.Time] .
https://sqlite.org/c3ref/value_blob.html
( Value) Type () Datatype
Type returns the initial datatype of the value.
https://sqlite.org/c3ref/value_blob.html
Implements (at least 2 )
*Value : github.com/prometheus/common/expfmt.Closer
*Value : io.Closer
As Outputs Of (at least 7 )
func (*IndexInfo ).RHSValue (column int ) (Value , error )
func (*PreUpdateData ).New (column int ) (Value , error )
func (*PreUpdateData ).Old (column int ) (Value , error )
func (*Stmt ).ColumnValue (col int ) Value
func Value.Dup () *Value
func Value.InFirst () (Value , error )
func Value.InNext () (Value , error )
As Inputs Of (at least 7 )
func AggregateFunction .Step (ctx Context , arg ...Value )
func Context .ResultValue (value Value )
func (*Stmt ).BindValue (param int , value Value ) error
func VTabCursor .Filter (idxNum int , idxStr string , arg ...Value ) error
func VTabUpdater .Update (arg ...Value ) (rowid int64 , err error )
func WindowFunction .Inverse (ctx Context , arg ...Value )
func WindowFunction .Step (ctx Context , arg ...Value )
type VTabCursor (interface)
A VTabCursor describes cursors that point
into the virtual table and are used
to loop through the virtual table.
A VTabCursor may optionally implement
[io.Closer] to free resources.
Implementations of Filter must not retain arg.
https://sqlite.org/c3ref/vtab_cursor.html
Methods (total 5 )
( VTabCursor) Column (ctx Context , n int ) error
https://sqlite.org/vtab.html#xcolumn
( VTabCursor) EOF () bool
https://sqlite.org/vtab.html#xeof
( VTabCursor) Filter (idxNum int , idxStr string , arg ...Value ) error
https://sqlite.org/vtab.html#xfilter
( VTabCursor) Next () error
https://sqlite.org/vtab.html#xnext
( VTabCursor) RowID () (int64 , error )
https://sqlite.org/vtab.html#xrowid
As Outputs Of (at least 9 )
func VTab .Open () (VTabCursor , error )
func VTabChecker .Open () (VTabCursor , error )
func VTabDestroyer .Open () (VTabCursor , error )
func VTabOverloader .Open () (VTabCursor , error )
func VTabRenamer .Open () (VTabCursor , error )
func VTabSavepointer .Open () (VTabCursor , error )
func VTabShadowTabler .Open () (VTabCursor , error )
func VTabTxn .Open () (VTabCursor , error )
func VTabUpdater .Open () (VTabCursor , error )
Package-Level Functions (total 12)
Package-Level Constants (total 307)
const FULL ErrorCode = 13 // Insertion failed because database is full const RANGE ErrorCode = 25 // 2nd parameter to sqlite3_bind out of range
The pages are generated with Golds v0.8.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .