sqlite

package
v0.0.0-...-bb56650 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package sqlite provides SQLite backend.

Design principles

  1. Transactions should be avoided when possible. That's because there can be, at most, one write transaction at a given time for the whole database. (Note that there is a separate branch of SQLite with concurrent transactions, but it is not merged yet.) FerretDB often could use more granular locks - for example, per collection.
  2. Explicit transaction retries and SQLITE_BUSY handling should be avoided - see above. Additionally, SQLite retries automatically with the busy_timeout parameter we set by default, which should be enough.
  3. Metadata is heavily cached to avoid most queries and transactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(params *NewBackendParams) (backends.Backend, error)

NewBackend creates a new Backend.

Types

type NewBackendParams

type NewBackendParams struct {
	URI string
	L   *zap.Logger
	P   *state.Provider
	// contains filtered or unexported fields
}

NewBackendParams represents the parameters of NewBackend function.

Directories

Path Synopsis
Package metadata provides access to databases and collections information.
Package metadata provides access to databases and collections information.
pool
Package pool provides access to SQLite databases and their connections.
Package pool provides access to SQLite databases and their connections.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL