Documentation
¶
Index ¶
- type ClientSQLite
- type Option
- func WithCheckPing(check bool) Option
- func WithConnMaxIdleTime(v time.Duration) Option
- func WithConnMaxLifetime(v time.Duration) Option
- func WithDSN(dsn string) Option
- func WithLogger(log logger.Logger) Option
- func WithMaxIdleConns(v int) Option
- func WithMaxOpenConns(v int) Option
- func WithSynchronousMode(mode SynchronousMode) Option
- type Options
- type SynchronousMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSQLite ¶
type ClientSQLite struct {
// contains filtered or unexported fields
}
func (*ClientSQLite) Close ¶
func (c *ClientSQLite) Close() error
func (*ClientSQLite) DB ¶
func (c *ClientSQLite) DB() *sql.DB
type Option ¶
type Option func(o *Options)
func WithCheckPing ¶
func WithConnMaxIdleTime ¶
func WithConnMaxLifetime ¶
func WithLogger ¶
func WithMaxIdleConns ¶
func WithMaxOpenConns ¶
func WithSynchronousMode ¶ added in v0.17.0
func WithSynchronousMode(mode SynchronousMode) Option
WithSynchronousMode selects NORMAL or FULL; the default is NORMAL. Backend settings override DSN pragmas for journal_mode, synchronous, busy_timeout and foreign_keys on every new physical connection, except legitimate memory journal modes that cannot use WAL.
type SynchronousMode ¶ added in v0.17.0
type SynchronousMode string
SynchronousMode selects SQLite's commit synchronization policy.
const ( SynchronousNormal SynchronousMode = "NORMAL" SynchronousFull SynchronousMode = "FULL" )
Click to show internal directories.
Click to hide internal directories.