driver

package
v0.0.0-...-bd76197 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("row not found in any table")

Functions

This section is empty.

Types

type BackendTable

type BackendTable struct {
	Name    string
	Label   string
	TableId uint16
	Fields  map[string]struct{}
	benchtop.TableStore
}

type FieldInfo

type FieldInfo struct {
	Label string
	Field string
}

type GridKVDriver

type GridKVDriver struct {
	Lock       sync.RWMutex
	PebbleLock sync.RWMutex
	Pkv        *pebblebulk.PebbleKV

	Tables     map[string]*BackendTable
	TablesByID map[uint16]*BackendTable
	TableDr    benchtop.TableDriver
	// contains filtered or unexported fields
}

func NewGridKVDriver

func NewGridKVDriver(path string, driver string) (*GridKVDriver, error)

func (*GridKVDriver) AddField

func (d *GridKVDriver) AddField(tableID uint16, field string) error

func (*GridKVDriver) AddFieldIndex

func (d *GridKVDriver) AddFieldIndex(label, field string) error

func (*GridKVDriver) AddTableEntryInfo

func (d *GridKVDriver) AddTableEntryInfo(tx *pebblebulk.PebbleBulk, rowID []byte, rowLoc *benchtop.RowLoc) error

func (*GridKVDriver) BulkLoad

func (d *GridKVDriver) BulkLoad(tableID uint16, rows chan *benchtop.Row) error

func (*GridKVDriver) BulkLoadBatch

func (d *GridKVDriver) BulkLoadBatch(tx *pebblebulk.PebbleBulk, entries []*benchtop.Row, snap *pebble.Snapshot) error

func (*GridKVDriver) BulkLoadInternal

func (d *GridKVDriver) BulkLoadInternal(targetID uint16, inputs chan *benchtop.Row, tx *pebblebulk.PebbleBulk) error

func (*GridKVDriver) Close

func (d *GridKVDriver) Close()

func (*GridKVDriver) DeleteRowField

func (d *GridKVDriver) DeleteRowField(tableID uint16, field, rowID string) error

func (*GridKVDriver) Get

func (d *GridKVDriver) Get(name string) (benchtop.TableStore, error)

func (*GridKVDriver) GetID

func (dr *GridKVDriver) GetID(s string) (uint64, error)

func (*GridKVDriver) GetIDs

func (dr *GridKVDriver) GetIDs(ids []string) ([]uint64, error)

func (*GridKVDriver) GetIDsForLabel

func (d *GridKVDriver) GetIDsForLabel(label string) chan string

func (*GridKVDriver) GetIDsForTable

func (d *GridKVDriver) GetIDsForTable(tableID uint16) chan string

func (*GridKVDriver) GetIndicesForTable

func (d *GridKVDriver) GetIndicesForTable(tableID uint16) chan benchtop.Index

func (*GridKVDriver) GetLabels

func (d *GridKVDriver) GetLabels(edges bool, removePrefix bool) chan string

func (*GridKVDriver) GetLocBatch

func (d *GridKVDriver) GetLocBatch(ctx context.Context, ids []string) (map[string]*IDInfo, error)

func (*GridKVDriver) GetOrLoadTable

func (d *GridKVDriver) GetOrLoadTable(name string) (*BackendTable, error)

func (*GridKVDriver) GetTableByID

func (d *GridKVDriver) GetTableByID(id uint16) (*BackendTable, error)

func (*GridKVDriver) GetVertexLocBatch

func (d *GridKVDriver) GetVertexLocBatch(ctx context.Context, ids []string) (map[string]*IDInfo, error)

GetVertexLocBatch resolves vertex RowLocs only (no edge scan fallback). This is significantly faster for V() traversal hydration paths.

func (*GridKVDriver) GetVertexLocByUIDBatch

func (d *GridKVDriver) GetVertexLocByUIDBatch(ctx context.Context, uids []uint64) (map[uint64]*IDInfo, error)

GetVertexLocByUIDBatch resolves vertex RowLocs by numeric UID using one iterator pass in UID-sorted order to minimize random seeks.

func (*GridKVDriver) InvalidateLoc

func (d *GridKVDriver) InvalidateLoc(tableID uint16, rowID string)

func (*GridKVDriver) List

func (d *GridKVDriver) List() []string

func (*GridKVDriver) ListFields

func (d *GridKVDriver) ListFields() []FieldInfo

func (*GridKVDriver) LoadFields

func (d *GridKVDriver) LoadFields() error

func (*GridKVDriver) New

func (d *GridKVDriver) New(name string, columns []benchtop.ColumnDef) (benchtop.TableStore, error)

func (*GridKVDriver) RemoveField

func (d *GridKVDriver) RemoveField(tableID uint16, field string) error

func (*GridKVDriver) RemoveFieldIndex

func (d *GridKVDriver) RemoveFieldIndex(label, field string) error

func (*GridKVDriver) RowIdsByHas

func (d *GridKVDriver) RowIdsByHas(field string, value any, op query.Condition) chan benchtop.Index

func (*GridKVDriver) RowIdsByLabelFieldValue

func (d *GridKVDriver) RowIdsByLabelFieldValue(label, field string, value any, op query.Condition) chan benchtop.Index

func (*GridKVDriver) RowIdsByLabelsFieldValue

func (d *GridKVDriver) RowIdsByLabelsFieldValue(labels []string, field string, value any, op query.Condition) chan benchtop.Index

func (*GridKVDriver) RowLocsByLabel

func (d *GridKVDriver) RowLocsByLabel(label string) chan benchtop.Index

func (*GridKVDriver) TranslateID

func (dr *GridKVDriver) TranslateID(id uint64) (string, error)

func (*GridKVDriver) ValuesWithin

func (d *GridKVDriver) ValuesWithin(v any) []any

type IDInfo

type IDInfo struct {
	Label string
	Loc   *benchtop.RowLoc
	Data  map[string]any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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