package
0.0.0-20210730035956-6ee08864794d
Repository: https://github.com/fletaio/fleta_v1.git
Documentation: pkg.go.dev
# Functions
Desc is a helper function that changes the order of an index.
IndexBinary is a helper function that returns true if 'a' is less than 'b'.
IndexFloat is a helper function that returns true if 'a' is less than 'b'.
IndexInt is a helper function that returns true if 'a' is less than 'b'.
IndexJSON provides for the ability to create an index on any JSON field.
IndexJSONCaseSensitive provides for the ability to create an index on any JSON field.
IndexRect is a helper function that converts string to a rect.
IndexString is a helper function that return true if 'a' is less than 'b'.
IndexUint is a helper function that returns true if 'a' is less than 'b'.
Match returns true if the specified key matches the pattern.
Open opens a database at the provided path.
Point is a helper function that converts a series of float64s to a rectangle for a spatial index.
Rect is helper function that returns a string representation of a rect.
# Constants
Always is used to sync data after every write to disk.
EverySecond is used to sync data to disk every second.
Never is used to disable syncing data to disk.
# Variables
ErrDatabaseClosed is returned when the database is closed.
ErrIndexExists is returned when an index already exists in the database.
ErrInvalid is returned when the database file is an invalid format.
ErrInvalidOperation is returned when an operation cannot be completed.
ErrInvalidSyncPolicy is returned for an invalid SyncPolicy value.
ErrNotFound is returned when an item or index is not in the database.
ErrPersistenceActive is returned when post-loading data from an database not opened with Open(":memory:").
ErrShrinkInProcess is returned when a shrink operation is in-process.
ErrTxClosed is returned when committing or rolling back a transaction that has already been committed or rolled back.
ErrTxIterating is returned when Set or Delete are called while iterating.
ErrTxNotWritable is returned when performing a write operation on a read-only transaction.
# Structs
Config represents database configuration options.
DB represents a collection of key-value pairs that persist on disk.
IndexOptions provides an index with additional features or alternate functionality.
SetOptions represents options that may be included with the Set() command.
Tx represents a transaction on the database.
# Type aliases
SyncPolicy represents how often data is synced to disk.