Documentation ¶
Index ¶
Constants ¶
View Source
const ( FmtTimestampDay = datetimes.FmtTimestampDay FmtTimestampHour = datetimes.FmtTimestampHour FmtTimestampMinute = datetimes.FmtTimestampMinute FmtDateTime = datetimes.FmtDateTime FmtDate = datetimes.FmtDate FmtTime = datetimes.FmtTime // SQLite datetime format strings SQLiteFmtDatetime = "%Y-%m-%d %H:%M:%S" SQLiteFmtMinute = "%Y-%m-%d %H:%M" SQLiteFmtHour = "%Y-%m-%d %H" SQLiteFmtDay = "%Y-%m-%d" )
View Source
const (
ERR_UNDEFINED_DSN = "connection error: SQLite DSN '%s' is undefined\n"
)
Variables ¶
This section is empty.
Functions ¶
func MustConnect ¶
MustConnect returns a new DB connection
func MustConnectENV ¶
MustConnect returns a new DB connection
func ParseSQLiteDateTime ¶
Types ¶
type Option ¶
https://www.sqlite.org/pragma.html
func BusyTimeout ¶
BusyTimeout 1000 milliseconds == 1 second
func JournalMode ¶
JournalMode sets the journal mode for the DB, typically WAL
func MaxOpenConnections ¶
MaxOpenConnections sets the max open connections. Since the SQL package handles the connection pool, it's best to set this to 1 (one) so that the SQL package essentially wraps all writes in a mutex. This will slow down writes but will help avoid a locked DB.
func WALCheckpoint ¶
WalCheckpoint checkpoints the Write-Ahead-Log
Click to show internal directories.
Click to hide internal directories.