Documentation
¶
Index ¶
- Constants
- Variables
- func IsPrimaryResultCodeErr(err error, code ResultCode) bool
- func IsResultCode(err error, code ResultCode) bool
- func StmtColumnOption[V any](stmt *Stmt, col int, get func(_ *Stmt, col int) V, opt *g.Option[V])
- type Blob
- type ColIter
- type Conn
- type Context
- type FunctionImpl
- type GoValue
- type OpenFlags
- type ResultCode
- type Stmt
- type Value
Constants ¶
View Source
const ( TypeNull = sqlite.SQLITE_NULL OpenNoMutex = sqlite.SQLITE_OPEN_NOMUTEX OpenReadOnly = sqlite.SQLITE_OPEN_READONLY OpenURI = sqlite.SQLITE_OPEN_URI OpenWAL = sqlite.SQLITE_OPEN_WAL OpenCreate = sqlite.SQLITE_OPEN_CREATE OpenReadWrite = sqlite.SQLITE_OPEN_READWRITE OpenExclusive = sqlite.SQLITE_OPEN_EXCLUSIVE ResultCodeInterrupt = ResultCode(sqlite.SQLITE_INTERRUPT) ResultCodeBusy = ResultCode(sqlite.SQLITE_BUSY) ResultCodeAbort = ResultCode(sqlite.SQLITE_ABORT) ResultCodeConstraintUnique = ResultCode(sqlite.SQLITE_CONSTRAINT_UNIQUE) ResultCodeGenericError = ResultCode(sqlite.SQLITE_ERROR) ResultCodeCantOpen = ResultCode(sqlite.SQLITE_CANTOPEN) LimitLength = sqlite.SQLITE_LIMIT_LENGTH )
Variables ¶
View Source
var (
ErrBlobClosed = sqlite.ErrBlobClosed
)
View Source
var ErrCode = sqlite.ErrCode
Deprecated. This may differ from GetResultCode in that it returns SQLITE_OK if there's no error, and SQLITE_ERROR if there's an error, but it can't extract a sqlite error code.
Functions ¶
func IsPrimaryResultCodeErr ¶
func IsPrimaryResultCodeErr(err error, code ResultCode) bool
func IsResultCode ¶
func IsResultCode(err error, code ResultCode) bool
Types ¶
type Conn ¶
type Conn struct { // This can't be embedded because the underlying libraries probably won't support it. *sqlite.Conn }
This is only used as a pointer type because the existing APIs expect *Conn.
func (*Conn) CreateFunction ¶
func (c *Conn) CreateFunction(name string, impl *FunctionImpl) error
type FunctionImpl ¶
type GoValue ¶
type GoValue any
GoValue is a result value for application-defined functions. crawshaw provides the context result API, but zombiezen expects a hybrid value-type to be returned. GoValue calls out the Go part of this hybrid type explicitly.
type ResultCode ¶
func GetResultCode ¶
func GetResultCode(err error) (_ ResultCode, ok bool)
func (ResultCode) ToPrimary ¶
func (me ResultCode) ToPrimary() ResultCode
Click to show internal directories.
Click to hide internal directories.