Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFTS5Support ¶
CheckFTS5Support verifies FTS5 is available in the SQLite build. This should be called after database initialization to ensure search functionality will work.
func IsUniqueViolation ¶ added in v0.1.0
IsUniqueViolation reports whether err came from a SQLite UNIQUE constraint.
func RetrieveOnUniqueViolation ¶ added in v0.1.0
func RetrieveOnUniqueViolation[T any](created T, createErr error, retrieve func() (T, error)) (T, error)
RetrieveOnUniqueViolation finishes a find-or-create. When the insert failed on a UNIQUE constraint because another request inserted the same row between the lookup and the insert, it returns what retrieve finds instead. Otherwise it returns created, or createErr when the insert failed for another reason.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.