package
1.0.4
Repository: https://github.com/couchbase/tools-common.git
Documentation: pkg.go.dev

# Functions

ExecuteQuery executes the provided query against the SQLite database and return the number of rows affected.
GetPragma queries the provided pragma and stores the result in the provided interface; its the job of the caller to ensure the provided type is valid for the value returned by the pragma.
Open a new SQLite database on disk whilst ensuring that the first time this function is called the SQLite library is initialized by a single thread.
QueryRow executes a query that is only expected to return a single row (or where we only care about the first returned row).
QueryRows execute a query which is expected to return one or more results.
SetPragma sets the provided pragma to the given value; its the job of the caller to ensure the provided value is of a valid type for the pragma.

# Constants

PragmaCacheSize is the suggested maximum number of database disk pages that SQLite will hold in memory at once per open database file.
PragmaPageCount is the total number of pages in the database file.
PragmaPageSize is size for the database, the value provided to this pragma must be a power of two between 512 and 65536 inclusive.
PragmaUserVersion is an integer that is available to applications to use however they want; SQLite makes no use of the user_version itself.

# Variables

ErrDBLocked is returned when attempting to query/execute a query against an SQLite database/transaction which is already locked by another thread/process.
ErrQueryReturnedNoRows is returned when the provided query returned no rows when executed.

# Structs

Query encapsulates a query and its arguments and is used by all the SQLite utility functions in this package.

# Interfaces

Executable allows the execute functions defined in this package to work against all the executable types exposed by the 'sql' module for example, '*sql.DB' and '*sql.Tx'.
Queryable allows the query functions defined in this package to work against all the queryable types exposed by the 'sql' module for example, '*sql.DB' and '*sql.Tx'.

# Type aliases

Pragma pepresents the string representation of an SQLite PRAGMA which can be used to query the SQLite library for internal (non-table) data.
RowCallback is a readability callback which will be run for each row returned by an SQLite query.
ScanCallback is a readability wrapper around the SQL 'Scan' function.