storage

package
v0.52.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootObjectSerializations []RootObjectSerialization

RootObjectSerializations contains all root object serializations. This should be set from the global initialization function.

Functions

This section is empty.

Types

type RootObjectSerialization

type RootObjectSerialization struct {
	Bytes        func(*serial.RootValue) []byte
	RootValueAdd func(builder *flatbuffers.Builder, sequences flatbuffers.UOffsetT)
}

RootObjectSerialization handles the allocation/preservation of bytes for root objects.

type RootStorage

type RootStorage struct {
	SRV *serial.RootValue
}

RootStorage is the FlatBuffer interface for the storage format.

func (RootStorage) Clone

func (r RootStorage) Clone() RootStorage

Clone returns a clone of the calling storage.

func (RootStorage) DebugString

func (r RootStorage) DebugString(ctx context.Context) string

DebugString returns the storage as a printable string.

func (RootStorage) EditTablesMap

func (r RootStorage) EditTablesMap(ctx context.Context, vrw types.ValueReadWriter, ns tree.NodeStore, edits []TableEdit) (RootStorage, error)

EditTablesMap edits the table map within storage.

func (RootStorage) GetCollation

func (r RootStorage) GetCollation(ctx context.Context) (schema.Collation, error)

GetCollation returns the collation declared within storage.

func (RootStorage) GetFeatureVersion

func (r RootStorage) GetFeatureVersion() doltdb.FeatureVersion

GetFeatureVersion returns the feature version for this storage object.

func (RootStorage) GetForeignKeys

func (r RootStorage) GetForeignKeys(ctx context.Context, vr types.ValueReader) (types.Value, bool, error)

GetForeignKeys returns the types.SerialMessage representing the foreign keys.

func (RootStorage) GetSchemas

func (r RootStorage) GetSchemas(ctx context.Context) ([]schema.DatabaseSchema, error)

GetSchemas returns all schemas.

func (RootStorage) GetTablesMap

func (r RootStorage) GetTablesMap(ctx context.Context, vrw types.ValueReadWriter, ns tree.NodeStore, databaseSchema string) (RootTableMap, error)

GetTablesMap returns the tables map from within this storage object.

func (RootStorage) NomsValue

func (r RootStorage) NomsValue() types.Value

NomsValue returns the storage as a noms value.

func (RootStorage) SetCollation

func (r RootStorage) SetCollation(ctx context.Context, collation schema.Collation) (RootStorage, error)

SetCollation sets the collation and returns a new storage object.

func (RootStorage) SetFeatureVersion

func (r RootStorage) SetFeatureVersion(v doltdb.FeatureVersion) (RootStorage, error)

SetFeatureVersion sets the feature version and returns a new storage object.

func (RootStorage) SetForeignKeyMap

func (r RootStorage) SetForeignKeyMap(ctx context.Context, vrw types.ValueReadWriter, v types.Value) (RootStorage, error)

SetForeignKeyMap sets the foreign key and returns a new storage object.

func (RootStorage) SetSchemas

func (r RootStorage) SetSchemas(ctx context.Context, dbSchemas []schema.DatabaseSchema) (RootStorage, error)

SetSchemas sets the given schemas and returns a new storage object.

type RootTableMap

type RootTableMap struct {
	prolly.AddressMap
	// contains filtered or unexported fields
}

RootTableMap is an address map alongside a schema name.

func (RootTableMap) Get

func (m RootTableMap) Get(ctx context.Context, name string) (hash.Hash, error)

Get returns the hash of the table with the given case-sensitive name.

func (RootTableMap) Iter

func (m RootTableMap) Iter(ctx context.Context, cb func(string, hash.Hash) (bool, error)) error

Iter calls the given callback for each table and hash contained in the map.

type TableEdit

type TableEdit struct {
	Name doltdb.TableName
	Ref  *types.Ref

	// Used for rename.
	OldName doltdb.TableName
}

Jump to

Keyboard shortcuts

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