Documentation ¶
Overview ¶
Package sqlite provides SQLite backend.
Design principles ¶
- 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.
- 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.
- 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 ¶
Source Files ¶
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. |
Click to show internal directories.
Click to hide internal directories.