keyspace

package
v0.0.0-...-741f41f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package keyspace defines the relational-layer FDB key structure.

The relational layer stores data under a two-level path:

catalog store:  [root]["__SYS"]["__SYS"]["CATALOG"]
user schemas:   [root][domain][dbPath][schemaName]

This mirrors the Java RelationalKeyspaceProvider layout conceptually, but uses plain tuple keys instead of DirectoryLayerDirectory — Go-to-Go relational stores do not need to share keyspace with Java relational stores. Only the RECORD LAYER data format (records, indexes, catalog protos) must be Java-compatible, not the path prefix scheme.

Index

Constants

View Source
const (
	SysName     = "__SYS"
	CatalogName = "CATALOG"
)

Variables

This section is empty.

Functions

func ParseDBPath

func ParseDBPath(dbPath string) ([]string, error)

ParseDBPath breaks a URI-style database path like "/domain/db" into its path components, stripping the leading slash. Returns an error if the path is invalid.

Types

type RelationalKeyspace

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

RelationalKeyspace provides FDB subspace resolution for the relational layer. Construct one with a root subspace (e.g. the empty subspace or a tenant-specific prefix), then call CatalogSubspace / SchemaSubspace to get per-object subspaces.

func New

New returns a RelationalKeyspace rooted at root.

func (*RelationalKeyspace) CatalogSubspace

func (k *RelationalKeyspace) CatalogSubspace() subspace.Subspace

CatalogSubspace returns the subspace for the system catalog record store (the __SYS/CATALOG schema).

func (*RelationalKeyspace) SchemaSubspace

func (k *RelationalKeyspace) SchemaSubspace(dbPath, schemaName string) (subspace.Subspace, error)

SchemaSubspace returns the subspace for a user schema identified by (dbPath, schemaName). dbPath is the full database path (e.g. "/my/db"). Returns an error if dbPath or schemaName is empty.

Jump to

Keyboard shortcuts

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