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 ¶
const ( SysName = "__SYS" CatalogName = "CATALOG" )
Variables ¶
This section is empty.
Functions ¶
func ParseDBPath ¶
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 ¶
func New(root subspace.Subspace) *RelationalKeyspace
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.