nosql

package
v0.0.0-...-db14c7d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 22 Imported by: 0

README

Embedded Replicated NoSQL Database

NoSQL is a concise and simple document oriented database layer on top of libmdbx BTree MMAP storage engine.

Schemas

Collections

Collections are just buckets of document blobs identified by a monotonic 64bit key. Layout below:

DocumentID (64-bits)
    CollectionID 16-bits
    Sequence     48-bits

Given CollectionID is 16-bits and the first 100 IDs are reserved for system uses, that equates to 65436 being the max number of collections. Each collection has a sequential keyspace of consisting of 281,479,271,743,489 sequences offset by a multiple of CollectionID.

The format of a document is not enforced. However, in order to support secondary indexes selectors that create document projections are required. Currently, GJSON is embedded to support JSON documents and JSON based selectors for projections.

Indexes

Collections may have any number of secondary indexes. Of course, the more indexes you create the slower writes will become and the higher the storage requirements. Below is a list of index data types:

  • Int64
  • Float64
  • String
  • Full-Text (not implemented) *Bleve will be integrated
  • Geo (not implemented) *
Streams

Streams are a specialized type of collection that supports Kafka like streams and time-series like streams.

Evolution

Schema evolutions are a set of actions that must be performed on the database in order for the schema to be in sync. Below are a list of action types:

  • Drop Collection
    • Delete all documents
  • Create Collection
    • Assign 16-bit CollectionID
  • Create Index
    • Assign 32-bit IndexID
    • Iterate through all Collection documents and build index records
  • Rebuild Index
    • Delete all index records
    • Iterate through all Collection documents and build index records
  • Drop Index
    • Delete all index records

Schema Mapping

Schemas may be mapped using a Schema prototype expressed in code.

import "github.com/moontrade/server/nosql"

var DB = &Schema{}

type Schema struct {
	*nosql.Schema // auto-generated nosql.Schema instance during Hydrate
	
	Orders struct {
		_ Order // optional document struct
		nosql.Collection // required
		Num       nosql.Int64Unique  `@:"num"`
		Key       nosql.StringUnique `@:"key"`
		Price     nosql.Float64      `@:"price"`
	}
	
	Contact struct {
		FirstName nosql.String      `@:"name.first"`
	}

	Items struct {
		nosql.Collection
		Price nosql.Float64 `@:"price"`
	}

	Markets struct {
		nosql.Collection
		Num   nosql.Int64  `@:"num"`
		Key   nosql.String `@:"key"`
		Name  nosql.String `@:"name"`
		Names struct {
			First nosql.String `sort:"ASC"`
			Last  nosql.String `sort:"DESC"`
		} `@:"[name.first,age,children.0]"` // Composite index
	}
}

func main() {
	
}

libmdbx Storage Layout

Documentation

Index

Constants

View Source
const (
	StoreName = "nosql"
	Version   = "0.1.0"
)
View Source
const (
	DefaultDurable = mdbx.EnvSyncDurable |
		mdbx.EnvNoTLS |
		mdbx.EnvLIFOReclaim |
		mdbx.EnvNoMemInit |
		mdbx.EnvCoalesce

	DefaultDurableFast = mdbx.EnvNoMetaSync |
		mdbx.EnvNoTLS |
		mdbx.EnvLIFOReclaim |
		mdbx.EnvNoMemInit |
		mdbx.EnvCoalesce

	DefaultAsync = mdbx.EnvSafeNoSync |
		mdbx.EnvNoTLS |
		mdbx.EnvLIFOReclaim |
		mdbx.EnvNoMemInit |
		mdbx.EnvCoalesce

	DefaultAsyncMap = mdbx.EnvSafeNoSync |
		mdbx.EnvWriteMap |
		mdbx.EnvNoTLS |
		mdbx.EnvLIFOReclaim |
		mdbx.EnvNoMemInit |
		mdbx.EnvCoalesce

	DefaultNoSync = mdbx.EnvUtterlyNoSync |
		mdbx.EnvWriteMap |
		mdbx.EnvNoTLS |
		mdbx.EnvLIFOReclaim |
		mdbx.EnvNoMemInit |
		mdbx.EnvCoalesce

	Kilobyte = 1024
	Megabyte = 1024 * 1024
	Gigabyte = Megabyte * 1024
	Terabyte = Gigabyte * 1024
)
View Source
const (
	MaxCollectionSize = maxDocSequence - 1
)
View Source
const (
	MaxIndexKeySize = 4000
)

Variables

View Source
var (
	ErrSkip             = errors.New("skip")
	ErrIndexCorrupted   = errors.New("index corrupted")
	ErrUniqueConstraint = errors.New("unique constraint")
	ErrIndexKeyTooBig   = errors.New("index key too big")
)
View Source
var (
	ErrNotJSONMarshaller       = errors.New("not implements json.Marshaler")
	ErrNotEasyJSONMarhaller    = errors.New("not implements easyjson.EasyJSONMarshaller")
	ErrNotEasyJSONUnmarshaller = errors.New("not implements easyjson.EasyJSONUnmarshaller")
	ErrNotBinaryMarshaller     = errors.New("not implements encoding.BinaryMarshaler")
	ErrNotBinaryUnmarshaller   = errors.New("not implements encoding.BinaryUnmarshaler")
)
View Source
var (
	ErrAlreadyLoaded          = errors.New("already loaded")
	ErrSchemaFieldNotFound    = errors.New("schema field not found: add '*nosql.Schema' field")
	ErrCollectionStore        = errors.New("collection store not exist")
	ErrCollectionIDExhaustion = errors.New("collection id exhaustion")
	ErrIndexIDExhaustion      = errors.New("index id exhaustion")
	ErrSchemaIDExhaustion     = errors.New("schema id exhaustion")
)
View Source
var (
	DefaultGeometry = mdbx.Geometry{
		SizeLower:       Megabyte * 1,
		SizeNow:         Megabyte * 1,
		SizeUpper:       Gigabyte * 32,
		GrowthStep:      Megabyte * 4,
		ShrinkThreshold: Megabyte * 4 * 2,
		PageSize:        4096,
	}
)
View Source
var (
	ErrDocumentNil = errors.New("document nil")
)
View Source
var (
	ErrEvolutionInProcess = errors.New("evolution in process")
)

Functions

func LowerCamelCase

func LowerCamelCase(s string) string

LowerCamelCase converts a string into camel case starting with a lower case letter.

func UpperCamelCase

func UpperCamelCase(s string) string

UpperCamelCase converts a string into camel case starting with a upper case letter.

Types

type BinaryMarshaller

type BinaryMarshaller struct {
}

func (BinaryMarshaller) Marshal

func (s BinaryMarshaller) Marshal(unmarshalled interface{}, into []byte) ([]byte, error)

func (BinaryMarshaller) Unmarshal

func (s BinaryMarshaller) Unmarshal(data []byte, unmarshalled interface{}) error

type BinaryMarshallerInto

type BinaryMarshallerInto interface {
	MarshalBinaryInto(into []byte) ([]byte, error)
}

type BinaryNoAllocMarshaller

type BinaryNoAllocMarshaller struct {
}

func (BinaryNoAllocMarshaller) Marshal

func (s BinaryNoAllocMarshaller) Marshal(unmarshalled interface{}, into []byte) ([]byte, error)

func (BinaryNoAllocMarshaller) Unmarshal

func (s BinaryNoAllocMarshaller) Unmarshal(data []byte, unmarshalled interface{}) error

type ChangeKind

type ChangeKind int
const (
	ChangeCreate       ChangeKind = 1
	ChangeDrop         ChangeKind = 2
	ChangeCreateIndex  ChangeKind = 3
	ChangeRebuildIndex ChangeKind = 4
	ChangeDropIndex    ChangeKind = 5
)

type Collection

type Collection struct {
	Name       string
	Marshaller Marshaller
	// contains filtered or unexported fields
}

func (Collection) Delete

func (cs Collection) Delete(
	tx *Tx,
	id DocID,
	unmarshalled interface{},
	prev func(val mdbx.Val),
) (bool, error)

func (Collection) DocID

func (cs Collection) DocID(sequence uint64) DocID

func (Collection) Insert

func (cs Collection) Insert(
	tx *Tx,
	id DocID,
	unmarshalled interface{},
	marshalled []byte,
) error

func (Collection) MaxID

func (cs Collection) MaxID() DocID

func (Collection) MinID

func (cs Collection) MinID() DocID

func (Collection) NextID

func (cs Collection) NextID() DocID

func (Collection) Update

func (cs Collection) Update(
	tx *Tx,
	id DocID,
	unmarshalled interface{},
	marshalled []byte,
	prev func(val mdbx.Val),
) error

type CollectionCreate

type CollectionCreate struct {
	// contains filtered or unexported fields
}

type CollectionDrop

type CollectionDrop struct {
	// contains filtered or unexported fields
}

CollectionDrop action to delete all of a collection's documents and remove the metadata from the schema.

type CollectionID

type CollectionID uint16

CollectionID is an UID for a single collection used in unique DocID instead of variable length string names. This provides deterministic key operations regardless of length of collection name.

type CollectionKind

type CollectionKind int
const (
	CollectionTypeJson     CollectionKind = 0
	CollectionTypeProto    CollectionKind = 1
	CollectionTypeProtobuf CollectionKind = 2
	CollectionTypeMsgpack  CollectionKind = 3
	CollectionTypeCustom   CollectionKind = 10
)

type CollectionMeta

type CollectionMeta struct {
	Id      CollectionID `json:"id"`
	Owner   uint32       `json:"owner"`
	Created uint64       `json:"created"`
	Updated uint64       `json:"updated"`
	Indexes []IndexMeta  `json:"indexes,omitempty"`
	Schema  string       `json:"schema,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionMeta) Equals

func (cd *CollectionMeta) Equals(other *collectionDescriptor) bool

type Config

type Config struct {
	Path  string
	Flags mdbx.EnvFlags
	Mode  os.FileMode
}

type Cursor

type Cursor struct {
	// contains filtered or unexported fields
}

type DocID

type DocID uint64

DocID

func NewDocID

func NewDocID(collection CollectionID, sequence uint64) DocID

func (DocID) CollectionID

func (r DocID) CollectionID() CollectionID

CollectionID is an UID for a single collection used in unique DocID instead of variable length string names. This provides deterministic key operations regardless of length of collection name.

func (*DocID) Key

func (id *DocID) Key() mdbx.Val

func (DocID) Sequence

func (r DocID) Sequence() uint64

Sequence 48bit unsigned integer that represents the unique sequence within the collection.

type Document

type Document struct {
	ID        DocID       `json:"i"`
	Timestamp uint64      `json:"t"`
	Data      interface{} `json:"d"`
}

type EasyJsonMarshaller

type EasyJsonMarshaller struct {
}

func (EasyJsonMarshaller) Marshal

func (s EasyJsonMarshaller) Marshal(unmarshalled interface{}, into []byte) ([]byte, error)

func (EasyJsonMarshaller) Unmarshal

func (s EasyJsonMarshaller) Unmarshal(data []byte, unmarshalled interface{}) error

type EvolutionProgress

type EvolutionProgress struct {
	ProgressStat
	Context              context.Context
	Cancel               context.CancelFunc
	Time                 time.Time
	Started              time.Time
	Prepared             time.Duration
	IndexesDroppedIn     time.Duration
	IndexesCreatedIn     time.Duration
	CollectionsDroppedIn time.Duration
	State                EvolutionState
	BatchSize            int64
	IndexDrops           ProgressStat
	IndexCreates         ProgressStat
	CollectionDrops      ProgressStat
	Err                  error
}

type EvolutionState

type EvolutionState int
const (
	EvolutionStatePreparing          EvolutionState = 0
	EvolutionStatePrepared           EvolutionState = 1
	EvolutionStateDroppingIndex      EvolutionState = 2
	EvolutionStateCreatingIndex      EvolutionState = 3
	EvolutionStateDroppingCollection EvolutionState = 4
	EvolutionStateCompleted          EvolutionState = 10
	EvolutionStateError              EvolutionState = 100
)

type FlatString128

type FlatString128 struct {
	Data [127]byte
	Size byte
}

func (*FlatString128) Set

func (s *FlatString128) Set(value string)

func (*FlatString128) String

func (s *FlatString128) String() string

func (*FlatString128) Unsafe

func (s *FlatString128) Unsafe() string

type FlatString16

type FlatString16 struct {
	Data [15]byte
	Size byte
}

func (*FlatString16) Set

func (s *FlatString16) Set(value string)

func (*FlatString16) String

func (s *FlatString16) String() string

func (*FlatString16) Unsafe

func (s *FlatString16) Unsafe() string

type FlatString255

type FlatString255 struct {
	Data [254]byte
	Size byte
}

func (*FlatString255) Set

func (s *FlatString255) Set(value string)

func (*FlatString255) String

func (s *FlatString255) String() string

func (*FlatString255) Unsafe

func (s *FlatString255) Unsafe() string

type FlatString32

type FlatString32 struct {
	Data [31]byte
	Size byte
}

func (*FlatString32) Set

func (s *FlatString32) Set(value string)

func (*FlatString32) String

func (s *FlatString32) String() string

func (*FlatString32) Unsafe

func (s *FlatString32) Unsafe() string

type FlatString64

type FlatString64 struct {
	Data [63]byte
	Size byte
}

func (*FlatString64) Set

func (s *FlatString64) Set(value string)

func (*FlatString64) String

func (s *FlatString64) String() string

func (*FlatString64) Unsafe

func (s *FlatString64) Unsafe() string

type FlatString96

type FlatString96 struct {
	Data [95]byte
	Size byte
}

func (*FlatString96) Set

func (s *FlatString96) Set(value string)

func (*FlatString96) String

func (s *FlatString96) String() string

func (*FlatString96) Unsafe

func (s *FlatString96) Unsafe() string

type Float64

type Float64 struct {
	ValueOf Float64ValueOf
	// contains filtered or unexported fields
}

func NewFloat64

func NewFloat64(
	name, selector, version string,
	valueOf Float64ValueOf,
) *Float64

func (*Float64) ID

func (ib *Float64) ID() uint32

func (*Float64) Meta

func (ib *Float64) Meta() IndexMeta

func (*Float64) Name

func (ib *Float64) Name() string

func (*Float64) Owner

func (ib *Float64) Owner() CollectionID

type Float64Array

type Float64Array struct {
	ValueOf Float64ArrayValueOf
	// contains filtered or unexported fields
}

func NewFloat64Array

func NewFloat64Array(
	name, selector, version string,
	valueOf Float64ArrayValueOf,
) *Float64Array

func (*Float64Array) ID

func (ib *Float64Array) ID() uint32

func (*Float64Array) Meta

func (ib *Float64Array) Meta() IndexMeta

func (*Float64Array) Name

func (ib *Float64Array) Name() string

func (*Float64Array) Owner

func (ib *Float64Array) Owner() CollectionID

type Float64ArrayValueOf

type Float64ArrayValueOf func(data string, unmarshalled interface{}, into []float64) ([]float64, error)

type Float64Unique

type Float64Unique struct {
	ValueOf Float64ValueOf
	// contains filtered or unexported fields
}

func NewFloat64Unique

func NewFloat64Unique(
	name, selector, version string,
	valueOf Float64ValueOf,
) *Float64Unique

func (*Float64Unique) ID

func (ib *Float64Unique) ID() uint32

func (*Float64Unique) Meta

func (ib *Float64Unique) Meta() IndexMeta

func (*Float64Unique) Name

func (ib *Float64Unique) Name() string

func (*Float64Unique) Owner

func (ib *Float64Unique) Owner() CollectionID

type Float64ValueOf

type Float64ValueOf func(data string, unmarshalled interface{}) (float64, error)

type FullText

type FullText struct{}

type Index

type Index interface {
	ID() uint32

	Name() string

	Owner() CollectionID

	Meta() IndexMeta
	// contains filtered or unexported methods
}

type IndexCreate

type IndexCreate struct {
	// contains filtered or unexported fields
}

type IndexDrop

type IndexDrop struct {
	// contains filtered or unexported fields
}

IndexDrop represents an action to drop an index from a schema, delete all data in the index database and remove the metadata from the saved schema.

type IndexKind

type IndexKind int
const (
	IndexKindUnknown   IndexKind = 0
	IndexKindInt64     IndexKind = 1
	IndexKindFloat64   IndexKind = 2
	IndexKindString    IndexKind = 3
	IndexKindComposite IndexKind = 10
)

type IndexMeta

type IndexMeta struct {
	Owner CollectionID `json:"owner"`
	DBI   mdbx.DBI     `json:"dbi"`
	State int32        `json:"state"`
	// contains filtered or unexported fields
}

type IndexRebuild

type IndexRebuild struct {
	// contains filtered or unexported fields
}

type InsertCommand

type InsertCommand struct {
	Collection FlatString32
	Data       []byte
}

type Int64

type Int64 struct {
	ValueOf Int64ValueOf
	// contains filtered or unexported fields
}

func NewInt64

func NewInt64(
	name, selector, version string,
	valueOf Int64ValueOf,
) *Int64

func (*Int64) ID

func (ib *Int64) ID() uint32

func (*Int64) Meta

func (ib *Int64) Meta() IndexMeta

func (*Int64) Name

func (ib *Int64) Name() string

func (*Int64) Owner

func (ib *Int64) Owner() CollectionID

type Int64Array

type Int64Array struct {
	ValueOf Int64ArrayValueOf
	// contains filtered or unexported fields
}

func NewInt64Array

func NewInt64Array(
	name, selector, version string,
	valueOf Int64ArrayValueOf,
) *Int64Array

func (*Int64Array) ID

func (ib *Int64Array) ID() uint32

func (*Int64Array) Meta

func (ib *Int64Array) Meta() IndexMeta

func (*Int64Array) Name

func (ib *Int64Array) Name() string

func (*Int64Array) Owner

func (ib *Int64Array) Owner() CollectionID

type Int64ArrayValueOf

type Int64ArrayValueOf func(data string, unmarshalled interface{}, into []int64) ([]int64, error)

type Int64Unique

type Int64Unique struct {
	ValueOf Int64ValueOf
	// contains filtered or unexported fields
}

func NewInt64Unique

func NewInt64Unique(
	name, selector, version string,
	valueOf Int64ValueOf,
) *Int64Unique

func (*Int64Unique) ID

func (ib *Int64Unique) ID() uint32

func (*Int64Unique) Meta

func (ib *Int64Unique) Meta() IndexMeta

func (*Int64Unique) Name

func (ib *Int64Unique) Name() string

func (*Int64Unique) Owner

func (ib *Int64Unique) Owner() CollectionID

type Int64ValueOf

type Int64ValueOf func(data string, unmarshalled interface{}) (int64, error)

type JsonMarshaller

type JsonMarshaller struct {
}

func (JsonMarshaller) Marshal

func (s JsonMarshaller) Marshal(unmarshalled interface{}, into []byte) ([]byte, error)

func (JsonMarshaller) Unmarshal

func (s JsonMarshaller) Unmarshal(data []byte, unmarshalled interface{}) error

type Marshaller

type Marshaller interface {
	Marshal(unmarshalled interface{}, into []byte) ([]byte, error)

	Unmarshal(data []byte, unmarshalled interface{}) error
}

func BinaryMarshallerOf

func BinaryMarshallerOf(unmarshalled interface{}) Marshaller

func JsonMarshallerOf

func JsonMarshallerOf(unmarshalled interface{}) Marshaller

func JsonMarshallerOfType

func JsonMarshallerOfType(t reflect.Type) Marshaller

func MarshallerOf

func MarshallerOf(unmarshalled interface{}) Marshaller

func MarshallerOfType

func MarshallerOfType(t reflect.Type) Marshaller

type Page

type Page struct {
	ID DocID
}

type ProgressStat

type ProgressStat struct {
	Total     int64
	Completed int64
}

func (ProgressStat) Pct

func (p ProgressStat) Pct() float64

type Record

type Record struct {
	ID   DocID
	Time int64
}

type Schema

type Schema struct {
	Meta        SchemaMeta
	Collections []Collection
	// contains filtered or unexported fields
}

Schema provides a flat list of named Collections and their indexes. It does NOT enforce any layout of the individual document specs. JSON formatted documents support indexing natively. JSON indexes utilize gjson selector to extract the field(s) required to build index.

It is recommended to use the strongly typed Schema pattern. Hydrating a Schema in a Store will produce and apply an evolution to keep the Schema consistent. This simplifies a lot of bug prone manual index and collection bookkeeping.

func ParseSchema

func ParseSchema(prototype interface{}) (*Schema, error)

func ParseSchemaWithUID

func ParseSchemaWithUID(uid string, prototype interface{}) (*Schema, error)

func (*Schema) IsLoaded

func (s *Schema) IsLoaded() bool

func (*Schema) Update

func (s *Schema) Update(fn func(tx *Tx) error) error

func (*Schema) View

func (s *Schema) View(fn func(tx *Tx) error) error

type SchemaMeta

type SchemaMeta struct {
	Id          uint32           `json:"id"`
	UID         string           `json:"uid"`
	Name        string           `json:"name"`
	Pkg         string           `json:"pkg"`
	FQN         string           `json:"fqn"`
	Checksum    uint64           `json:"checksum"`
	Collections []CollectionMeta `json:"collections"`
	Mutations   struct {
	} `json:"mutations"`
}

type SchemaMutation

type SchemaMutation struct {
}

type Sort

type Sort byte
const (
	SortDefault    Sort = 0
	SortAscending  Sort = 1
	SortDescending Sort = 2
)

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a simple embedded Raft replicated ACID noSQL database built on MDBX B+Tree storage.

var (
	Default *Store
)

func Open

func Open(config *Config) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Hydrate

func (s *Store) Hydrate(ctx context.Context, schema *Schema) (<-chan EvolutionProgress, error)

Hydrate sets up a Schema in the store and performs any necessary evolution actions to adhere to the new desired state.

func (*Store) HydrateTyped

func (s *Store) HydrateTyped(ctx context.Context, typed interface{}) (<-chan EvolutionProgress, error)

HydrateTyped parses a typed Schema and calls Hydrate

type Stream

type Stream struct {
}

Stream is a special type of collection that provides real-time streaming similar to Kafka. Streams consist of pages which contain individual records. Appending new records occurs through an Appender. Appender is responsible for building new immutable pages and notifying listeners in real-time. Appender does not clear any records until the page the records belong to have been confirmed to be persistent in secondary storage.

Secondary page storage can be any KV store. Since pages are immutable, it is very easy to add caching layers if needed.

Pages can be located by RecordID or by Timestamp.

type String

type String struct {
	ValueOf StringValueOf
	// contains filtered or unexported fields
}

func NewString

func NewString(
	name, selector, version string,
	valueOf StringValueOf,
) *String

func (*String) ID

func (ib *String) ID() uint32

func (*String) Meta

func (ib *String) Meta() IndexMeta

func (*String) Name

func (ib *String) Name() string

func (*String) Owner

func (ib *String) Owner() CollectionID

type StringArray

type StringArray struct {
	ValueOf StringArrayValueOf
	// contains filtered or unexported fields
}

func NewStringArray

func NewStringArray(
	name, selector, version string,
	valueOf StringArrayValueOf,
) *StringArray

func (*StringArray) ID

func (ib *StringArray) ID() uint32

func (*StringArray) Meta

func (ib *StringArray) Meta() IndexMeta

func (*StringArray) Name

func (ib *StringArray) Name() string

func (*StringArray) Owner

func (ib *StringArray) Owner() CollectionID

type StringArrayValueOf

type StringArrayValueOf func(doc string, unmarshalled interface{}, into []string) (result []string, err error)

type StringUnique

type StringUnique struct {
	ValueOf StringValueOf
	// contains filtered or unexported fields
}

func NewStringUnique

func NewStringUnique(
	name, selector, version string,
	valueOf StringValueOf,
) *StringUnique

func (*StringUnique) ID

func (ib *StringUnique) ID() uint32

func (*StringUnique) Meta

func (ib *StringUnique) Meta() IndexMeta

func (*StringUnique) Name

func (ib *StringUnique) Name() string

func (*StringUnique) Owner

func (ib *StringUnique) Owner() CollectionID

type StringValueOf

type StringValueOf func(doc string, unmarshalled interface{}, into []byte) (result []byte, err error)

type Tx

type Tx struct {
	Tx *mdbx.Tx
	// contains filtered or unexported fields
}

func NewTx

func NewTx(s *Store) *Tx

func (*Tx) Close

func (tx *Tx) Close()

func (*Tx) Docs

func (tx *Tx) Docs() *mdbx.Cursor

func (*Tx) Index

func (tx *Tx) Index() *mdbx.Cursor

func (*Tx) Reset

func (tx *Tx) Reset(txn *mdbx.Tx)

type UpdateCommand

type UpdateCommand struct {
	Collection FlatString32
	Data       []byte
}

type UpdateSchemaCommand

type UpdateSchemaCommand struct {
	Collection FlatString255
	Data       []byte
}

type UpdateSchemaResult

type UpdateSchemaResult struct {
	Code int64
	Data []byte
}

Directories

Path Synopsis
stream

Jump to

Keyboard shortcuts

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