Documentation ¶
Overview ¶
The liteutil package implements utility functions around mattn's go-sqlite3 package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorConstraintUnique ¶
IsErrorConstraintUnique will return true for either ErrConstraintUnique or ErrConstraintPrimaryKey.
func IsErrorForeignKey ¶
IsErrorForeignKey will return true for ErrConstraintForeignKey
func IsSqliteErrorCode ¶
sqlite3 error code definitiions are somewhat difficult to use: You can't simply compare the Err* constants to the resulting value, because they're of different types.
IsSqliteErrorCode will take an error and a range of "query errors" (which must be of type sqlite3.ErrNo or sqlite3.ErrNoExtended) and check for matches. (Values not of these types will be skipped.)
For example, the following will check to see if `err` is (or contains) ErrBusy or ErrLocked:
IsSqliteErrorCode(err, sqlite3.ErrBusy, sqlite3.ErrLocked)
Types ¶
This section is empty.