package
0.14.0
Repository: https://github.com/sourcenetwork/defradb.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
Package crdt implements a collection of CRDT types specifically to be used in DefraDB, and use the Delta-State CRDT architecture to update and replicate state.
No description provided by the author

# Functions

No description provided by the author
DecodeDataStoreKey decodes a store key into a [DataStoreKey].
DecodeIndexDataStoreKey decodes a IndexDataStoreKey from bytes.
EncodeDataStoreKey encodes a [*DataStoreKey] to a byte array suitable for sorting in the store.
EncodeIndexDataStoreKey encodes a IndexDataStoreKey to bytes to be stored as a key for secondary indexes.
MarshalViewItem marshals the given doc ready for storage.
Merges an unordered, potentially overlapping and/or duplicated collection of Spans into a unique set in ascending order, where overlapping spans are merged into a single span.
No description provided by the author
NewCollectionIndexKey creates a new CollectionIndexKey from a collection name and index name.
NewCollectionIndexKeyFromString creates a new CollectionIndexKey from a string.
Returns a formatted collection key for the system data store.
No description provided by the author
No description provided by the author
NewCollectionRootKeyFromString creates a new [CollectionRootKey].
No description provided by the author
No description provided by the author
Creates a new DataStoreKey from a string as best as it can, splitting the input using '/' as a field deliminator.
NewDocumentMapping instantiates a new DocumentMapping instance.
NewErrFailedToGetFieldIdOfKey returns the error indicating failure to get FieldID of Key.
NewErrInvalidFieldIndex returns the error indicating invalid field index.
NewErrInvalidFieldValue returns the error indicating invalid field value.
No description provided by the author
Creates a new HeadStoreKey from a string as best as it can, splitting the input using '/' as a field deliminator.
NewIndexDataStoreKey creates a new IndexDataStoreKey from a collection ID, index ID and fields.
No description provided by the author
New.
No description provided by the author
No description provided by the author
No description provided by the author
NewReplicatorRetryDocIDKeyFromString creates a new [ReplicatorRetryDocIDKey] from a string.
No description provided by the author
NewReplicatorRetryIDKeyFromString creates a new [ReplicatorRetryIDKey] from a string.
No description provided by the author
No description provided by the author
No description provided by the author
NewSpan creates a new Span from the provided start and end keys.
NewSpans creates a new Spans from the provided spans.
No description provided by the author
No description provided by the author
NormalizeFieldValue takes a field value and description and converts it to the standardized Defra Go type.
UnmarshalViewItem unmarshals the given byte array into a [Doc] using the given mapping.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeletedKey is a type that represents a deleted document.
DocIDFieldIndex is the index of the DocID field in a document.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PriorityKey is a type that represents a priority instance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValueKey is a type that represents a value instance.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KeyMax is a maximum key value which sorts after all other keys.
KeyMin is a minimum key value which sorts before all other keys.

# Structs

CollectionIDSequenceKey is used to key the sequence used to generate collection ids.
CollectionIndexKey to a stored description of an index.
CollectionKey points to the json serialized description of the the collection of the given ID.
CollectionNameKey points to the ID of the collection of the given name.
CollectionRootKey points to nil, but the keys/prefix can be used to get collections that are of a given RootID.
CollectionSchemaVersionKey points to nil, but the keys/prefix can be used to get collections that are using, or have used a given schema version.
DataStoreKey is a type that represents a key in the database.
Doc is a document.
DocumentMapping is a mapping of a document.
FieldIDSequenceKey is used to key the sequence used to generate field ids.
HeadKeyValue is a KV store response containing the resulting core.HeadStoreKey and byte array value.
No description provided by the author
IndexDataStoreKey is key of an indexed document in the database.
IndexedField contains information necessary for storing a single value of a field in an index.
IndexIDSequenceKey is used to key the sequence used to generate index ids.
No description provided by the author
No description provided by the author
RenderKey is a key that should be rendered into the document.
No description provided by the author
No description provided by the author
No description provided by the author
SchemaDefinition represents a schema definition.
SchemaRootKey indexes schema version ids by their root schema id.
SchemaVersionKey points to the json serialized schema at the specified version.
Spans is a collection of individual spans.
ViewCacheKey is a trimmed down [DataStoreKey] used for caching the results of View items.

# Interfaces

Delta represents a delta-state update to delta-CRDT.
Key is an interface that represents a key in the database.
Parser represents the object responsible for handling stuff specific to a query language.
PersistedReplicatedData persists a ReplicatedData to an underlying datastore.
ReplicatedData is a data type that allows concurrent writers to deterministically merge other replicated data so as to converge on the same state.
Span is a range of keys from [Start, End).

# Type aliases

DocFields is a slice of fields in a document.
InstanceType is a type that represents the type of instance.
SpanComparisonResult is the result of comparing two spans.