Documentation
¶
Index ¶
- Variables
- func StmtExecNoResults(stmt *sqlite.Stmt) (err error)
- type Config
- type Conn
- func (c *Conn) Backup(ctx context.Context, path string) (err error)
- func (c *Conn) Begin(ctx context.Context) (err error)
- func (c *Conn) BeginImmediate(ctx context.Context) (err error)
- func (c *Conn) Close() (err error)
- func (c *Conn) Commit(ctx context.Context) (err error)
- func (c *Conn) Exec(ctx context.Context, query string, bind func(stmt *sqlite.Stmt), ...) (err error)
- func (c *Conn) ExecCached(ctx context.Context, query string, bind func(stmt *sqlite.Stmt), ...) (err error)
- func (c *Conn) ExecNoResult(ctx context.Context, query string) (err error)
- func (c *Conn) Fsync(ctx context.Context) error
- func (c *Conn) Prepare(query string) (*Stmt, error)
- func (c *Conn) Query(ctx context.Context, query string) (*Stmt, error)
- func (c *Conn) Rollback(ctx context.Context) (err error)
- type ConnManager
- func (c *ConnManager) Close() (err error)
- func (c *ConnManager) GetRead(ctx context.Context) (conn *Conn, err error)
- func (c *ConnManager) GetWrite(ctx context.Context) (conn *Conn, err error)
- func (c *ConnManager) ReleaseRead(conn *Conn)
- func (c *ConnManager) ReleaseWrite(conn *Conn)
- func (c *ConnManager) ReleaseWriteWithOptions(conn *Conn, noChanges bool)
- func (c *ConnManager) StalledConnections(threshold time.Duration) (stalledTraces []string)
- type EventType
- type Stmt
- func (s *Stmt) BindBytes(param int, value []byte)
- func (s *Stmt) Close() error
- func (s *Stmt) ColumnBytes(col int, buf []byte) (int, error)
- func (s *Stmt) ColumnLen(col int) (int, error)
- func (s *Stmt) Exec(ctx context.Context, bind func(stmt *sqlite.Stmt), ...) (err error)
- func (s *Stmt) Step() (rowReturned bool, err error)
- type WriteObserver
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func StmtExecNoResults ¶
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
Pragma map[string]string
ReadCount int
PreAllocatedPageCacheSize int
SortRegistry *registry.SortRegistry
FilterRegistry *registry.FilterRegistry
Version int
ReadConnTTL time.Duration
// WriteObservers will be called synchronously on acquire and release of the write connection
WriteObservers []WriteObserver
}
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) BeginImmediate ¶ added in v0.1.6
func (*Conn) ExecCached ¶
func (*Conn) ExecNoResult ¶
type ConnManager ¶
type ConnManager struct {
// contains filtered or unexported fields
}
func NewConnManager ¶
func NewConnManager(path string, conf Config) (*ConnManager, error)
func (*ConnManager) Close ¶
func (c *ConnManager) Close() (err error)
func (*ConnManager) GetRead ¶
func (c *ConnManager) GetRead(ctx context.Context) (conn *Conn, err error)
func (*ConnManager) GetWrite ¶
func (c *ConnManager) GetWrite(ctx context.Context) (conn *Conn, err error)
func (*ConnManager) ReleaseRead ¶
func (c *ConnManager) ReleaseRead(conn *Conn)
func (*ConnManager) ReleaseWrite ¶
func (c *ConnManager) ReleaseWrite(conn *Conn)
func (*ConnManager) ReleaseWriteWithOptions ¶ added in v0.4.0
func (c *ConnManager) ReleaseWriteWithOptions(conn *Conn, noChanges bool)
ReleaseWriteWithOptions releases the write connection with options noChanges: if true, means no changes has been made withing the write conn
func (*ConnManager) StalledConnections ¶ added in v0.1.13
func (c *ConnManager) StalledConnections(threshold time.Duration) (stalledTraces []string)
StalledConnections returns a list of stalled connections works only if stalledConnDetectorEnabled is true
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
func (*Stmt) ColumnBytes ¶ added in v0.2.0
type WriteObserver ¶ added in v0.4.0
type WriteObserver func(eventType EventType)
Click to show internal directories.
Click to hide internal directories.