fdb.dev

module
v0.0.0-...-b45679d Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0

README

fdb-go — FoundationDB for Go

CI Test Report

Go port of Apple's FoundationDB Record Layer. Wire-compatible with Java Record Layer 4.12.11.0 — Go and Java applications can read and write the same data on a shared FDB cluster.

Status

Pre-1.0. Not yet declared production-ready — pin a commit and run the suites below before relying on it. Maturity varies by layer:

Layer Maturity Notes
Record store (CRUD, indexes, versions, continuations, split records) Most mature Wire-compatibility is the project's hard line, exercised by the Java conformance + binding-stress suites. This is the part to trust first.
Cascades SQL engine Usable, evolving Wide SQL surface (see below) validated by a cross-engine differential harness, but still has open correctness items — consult the conformance report and TODO.md before depending on a given query shape.
Pure-Go FDB client (pkg/fdbgo) Youngest Reimplements the FDB wire protocol from scratch (RYW, retries, commit_unknown_result). Validated against libfdb_c via the binding tester. It is the default backend; if you'd rather link Apple's C client, the CGO_ENABLED=1 ... -tags libfdbc build flag swaps it in — both read/write byte-identical records (see the build commands below).

Before production use: pin a commit, run the conformance + differential + stress suites against your workload, and review PRODUCTION_READINESS.md / TODO-production.md for the current gap list. Report issues per SECURITY.md. For running it — connecting, transactions, online index builds, schema evolution, backup, and observability — see the operator guide.

Target versions

Component Version Notes
FoundationDB 7.3.77 Client library + headers. Go bindings pinned to release-7.3 branch.
Java Record Layer 4.12.11.0 Wire compatibility target. Conformance tests run against this version.
Go 1.26.4 Minimum Go version (kept current with stdlib security patches; govulncheck CI gates this).
Bazel 9.0.1 Build system. Pinned in .bazelversion.

FDB 8.0 is not yet released. When it ships, the Go bindings and client library should be upgraded together.

Why

The Record Layer gives you structured records, secondary indexes, and transactional schema evolution on top of FoundationDB's ordered key-value store. This port brings that to Go without sacrificing interoperability with existing Java deployments.

Performance

Includes a pure Go FDB client that speaks the FDB wire protocol directly — no CGo, no C library dependency.

Both clients run in the same process against the same FDB testcontainer, same keys. TestBenchmarkSanity verifies byte-identical results.

Benchmark fdb-go Apple CGo Diff
Get (100 B) 60 us 218 us 3.6x
Get (1 KB) 61 us 209 us 3.4x
Get (10 KB) 69 us 217 us 3.1x
GetRange (100 keys) 92 us 363 us 3.9x
Sustained read throughput 430 MB/s 191 MB/s 2.3x
Set + Commit 1,008 us 1,005 us 1.0x

With simulated network latency (tc netem):

RTT fdb-go Apple CGo Diff
2 ms 1,080 us 2,726 us 2.5x
10 ms 5,254 us 12,635 us 2.4x
1,000 ms 1,005 ms 1,006 ms 1.0x

Reads 2-4x faster on localhost, still 2.4x at 10 ms RTT, converges to parity at extreme latency. Writes at parity. See PERFORMANCE.md for the analysis.

Usage

db.Run(ctx, func(rtx *recordlayer.FDBRecordContext) (any, error) {
    store, err := recordlayer.NewStoreBuilder().
        SetMetaDataProvider(metadata).
        SetContext(rtx).
        SetSubspace(keyspace).
        CreateOrOpen()
    if err != nil {
        return nil, err
    }

    return store.SaveRecord(order)
})

Type-safe access via generics:

typed := recordlayer.NewTypedFDBRecordStore[*pb.Order](store)
order, err := typed.LoadRecord(ctx, primaryKey)

FDB client

Use the pure-Go client directly through pkg/fdbgo/fdb. It mirrors Apple's Go binding (apple/foundationdb/bindings/go), so existing FoundationDB code ports with minimal changes:

import "fdb.dev/pkg/fdbgo/fdb"

fdb.MustAPIVersion(730)
db, _ := fdb.OpenDatabase(clusterFile)
db.Transact(func(tx fdb.WritableTransaction) (any, error) {
	tx.Set(fdb.Key("k"), []byte("v"))
	return tx.Get(fdb.Key("k")).MustGet(), nil
})

A default go build links no cgo and no C library. The Record Layer and SQL engine can optionally run on Apple's libfdb_c instead, selected by a build tag. The choice is static per binary, since libfdb_c's network thread is initialized once per process:

go build ./...                        # default: the pure-Go client (no cgo, no libfdb_c)
CGO_ENABLED=1 go build -tags libfdbc  # the Record Layer on Apple's libfdb_c (the escape hatch)

Both clients read and write byte-identical records, index entries, and continuations against the same cluster, proven by a cross-backend differential suite, so flipping the tag keeps data shared (with each other, and with Java/C apps). This is the idiom the standard library uses for its netgo/netcgo split and sqlite uses to swap mattn/go-sqlite3 (cgo) for modernc.org/sqlite (pure-Go). The build-tag backend selection is internal to the layers (pkg/internal/fdbclient); code that uses the fdb client directly always gets the pure-Go client.

SQL engine

Built-in SQL engine via Go's database/sql interface. Queries are optimized by a Cascades-based query planner ported from Java's fdb-relational-core.

import _ "fdb.dev/pkg/relational/sqldriver"

db, _ := sql.Open("fdbsql", "fdbsql:///mydb?cluster_file=/etc/foundationdb/fdb.cluster&schema=main")

// DDL
db.Exec("CREATE DATABASE /mydb")
db.Exec(`CREATE SCHEMA TEMPLATE app_tmpl
    CREATE TABLE Users (id BIGINT NOT NULL, name STRING, email STRING, PRIMARY KEY (id))
    CREATE INDEX idx_email ON Users (email)`)
db.Exec("CREATE SCHEMA /mydb/main WITH TEMPLATE app_tmpl")

// DML
db.Exec("INSERT INTO Users (id, name, email) VALUES (1, 'Alice', 'alice@example.com')")
db.Exec("UPDATE Users SET name = 'Bob' WHERE id = 1")

// Queries — Cascades optimizer picks index scans, sort elimination, streaming aggregation
rows, _ := db.Query("SELECT name FROM Users WHERE email = 'alice@example.com'")
rows, _ = db.Query("SELECT name FROM Users ORDER BY id DESC")  // reverse PK scan
rows, _ = db.Query("SELECT email, COUNT(*) FROM Users GROUP BY email ORDER BY email ASC")

Supported SQL (the authoritative, tested surface is the yamsql scenarios under pkg/relational/conformance/yamsql/testdata/ + DIVERGENCES.md at HEAD; the list below is a hand summary of those, not a separately-maintained source of truth). For an exhaustive, auto-generated inventory of every scenario by feature area, see FEATURE_MATRIX.md (regenerated by just feature-matrix):

  • SELECT with WHERE, ORDER BY (ASC/DESC, including mixed directions), DISTINCT, GROUP BY, HAVING, LIMIT / OFFSET
  • Aggregates: COUNT, SUM, MIN, MAX, AVG
  • JOINs: INNER, comma-join / self-join, and LEFT / RIGHT / FULL OUTER JOIN (outer joins are a Go-only read-side extension — Java's SQL layer has none; wire compat is unaffected)
  • Subqueries in WHERE: EXISTS / NOT EXISTS, IN (SELECT ...), and correlated scalar subqueries (Go-only read-side extensions)
  • CTEs: WITH ... AS (SELECT ...), including chained CTEs
  • UNION ALL
  • INSERT, UPDATE, DELETE
  • CASE, COALESCE, CAST, arithmetic, scalar functions (e.g. UPPER, LOWER)
  • Computed projections with aliases

ORDER BY works without an index via a Go-only bounded in-memory sort (RecordQueryInMemorySortPlan, beyond Java's index-only Cascades); a supporting index/PK avoids the sort, and an unbounded ORDER BY without LIMIT is capped to avoid OOM. Self-joins and CTE+JOINs correctly resolve alias-qualified columns.

Not yet supported in the SQL engine:

  • A plain CTE referenced inside a UNION branch (recursive CTEs, which use UNION internally, do work)
  • IN (SELECT ...) in DML WHERE (rejected; rewrite as a correlated EXISTS)
  • General window functions (matching Java — only ROW_NUMBER() ... QUALIFY for vector K-NN search exists; see TODO.md)
  • Synthetic record types (JoinedRecordType, UnnestedRecordType)

What works

Records, indexes, cursors, and all the plumbing needed to share data with Java:

  • CRUD — save, load, delete, scan, existence checks, typed stores
  • Indexes — VALUE, VERSION, RANK, COUNT, SUM, MIN_EVER, MAX_EVER, MAX_EVER_VERSION, COUNT_NOT_NULL, COUNT_UPDATES, PERMUTED_MIN, PERMUTED_MAX, TEXT, BITMAP_VALUE, MULTIDIMENSIONAL, TIME_WINDOW_LEADERBOARD, VECTOR (HNSW)
  • Covering indexes — KeyWithValueExpression (value columns stored in FDB value)
  • Index operations — scan (BY_VALUE, BY_RANK, BY_GROUP), rebuild, online build (BY_RECORDS), state management (READABLE/WRITE_ONLY/DISABLED/READABLE_UNIQUE_PENDING)
  • Split records — automatic chunking at 100KB, transparent reassembly
  • Record versioning — 12-byte versions (10 global versionstamp + 2 local)
  • Cursors — concat, map, filter, skip, limit, union, intersection, dedup, flatmap, chained, auto-continuing, fallback
  • Continuations — cross-platform cursor resume tokens (record and index level)
  • Scan limits — time, byte, and record scan limits
  • Transactions — configurable retry with exponential backoff, commit hooks, conflict reporting
  • Schema evolution — MetaDataValidator, MetaDataEvolutionValidator
  • Bulk operations — DeleteAllRecords, DeleteRecordsWhere, record counting (atomic)
  • Aggregate functions — EvaluateAggregateFunction (COUNT, SUM, MIN, MAX, RANK functions)
  • Store management — format version 14, store locking (FORBID_RECORD_UPDATE, FULL_STORE), incarnation, header user fields
  • Key expressions — Field, RecordType, Empty, Composite (Then), Nesting, FanOut, Grouping, FunctionKey, KeyWithValue, Version
  • Instrumentation — StoreTimer with timed events and counters matching Java's FDBStoreTimer
  • Store state caching — FDBRecordStoreStateCache interface with PassThroughStoreStateCache default

What doesn't (yet)

  • Synthetic record types (JoinedRecordType, UnnestedRecordType)

Full gap analysis in TODO.md.

Conformance

Wire compatibility is verified by a conformance suite that runs both Go and Java (Record Layer 4.12.11.0) against the same FDB instance, cross-validating reads and writes bidirectionally.

Wire format

All 10 keyspace constants match the Java implementation:

Subspace ID Purpose
StoreInfoKey 0 Store header (format version, metadata)
RecordKey 1 Record data
IndexKey 2 Index entries
IndexSecondarySpaceKey 3 Secondary index data (RANK, PERMUTED)
RecordCountKey 4 Atomic record counts
IndexStateSpaceKey 5 Index lifecycle state
IndexRangeSpaceKey 6 Index build range tracking
IndexUniquenessViolationsKey 7 Deferred uniqueness violations
RecordVersionKey 8 Inline record versions
IndexBuildSpaceKey 9 Index build metadata

Tuple encoding, split record layout, continuation token format, and index entry structure are all verified against Java.

Test coverage

434 conformance specs (Go↔Java cross-validation), 5320 Go test functions, and 2702 Ginkgo specs against real FDB via testcontainers. 8000+ total test entry points. 1579-entry SQL corpus runs through the Go engine with zero failures.

Area Conformance specs
CRUD + existence + isolation + conflicts 49
Multi-type records (Customer) 15
Split records 10
Scanning (forward, reverse, limits, tuple ordering) 13
Continuation tokens (record + index level) 6
VALUE indexes (single, composite, fan-out, covering) 22
COUNT/SUM/MIN_EVER/MAX_EVER indexes 38
COUNT_NOT_NULL/COUNT_UPDATES/CLEAR_WHEN_ZERO 12
MAX_EVER_VERSION index 7
PERMUTED_MIN/MAX indexes 10
RANK index 14
TEXT index 12
BITMAP_VALUE index 6
MULTIDIMENSIONAL index 15
VECTOR index (HNSW) 18
TIME_WINDOW_LEADERBOARD index 11
Record versioning 4
Record counting 6
RangeSet wire format 4
Store header (v1 + v2), index state, lifecycle 28
DeleteAllRecords / DeleteRecordsWhere 10
OnlineIndexer 7
RecordMetaData proto serialization 21
TypedRecord cross-language encoding 11

Getting started

# 1. Start FoundationDB (Docker)
docker run -d --name fdb -p 4500:4500 foundationdb/foundationdb:7.3.77

# 2. Get the cluster file
docker exec fdb cat /var/fdb/fdb.cluster > /tmp/fdb.cluster

# 3. Use from Go
go get fdb.dev/pkg/relational/sqldriver
package main

import (
    "database/sql"
    "fmt"
    _ "fdb.dev/pkg/relational/sqldriver"
)

func main() {
    db, _ := sql.Open("fdbsql", "fdbsql:///myapp?cluster_file=/tmp/fdb.cluster&schema=main")
    db.Exec("CREATE DATABASE /myapp")
    db.Exec(`CREATE SCHEMA TEMPLATE app CREATE TABLE Users (id BIGINT NOT NULL, name STRING, PRIMARY KEY (id))`)
    db.Exec("CREATE SCHEMA /myapp/main WITH TEMPLATE app")

    db.Exec("INSERT INTO Users VALUES (1, 'Alice'), (2, 'Bob')")

    rows, _ := db.Query("SELECT id, name FROM Users ORDER BY id")
    for rows.Next() {
        var id int64; var name string
        rows.Scan(&id, &name)
        fmt.Printf("%d: %s\n", id, name)
    }
}

Runnable, CI-compiled examples live under example/:

  • example/sql — the SQL path above, fleshed out (DDL, parameterized INSERT, point query, GROUP BY aggregate over an index). go run ./example/sql.
  • example/getting_started.go — the lower-level record-store API (metadata, typed SaveRecord/loadRecord, index scans).

Building

Requires Bazel 9+ (via bazelisk) and Docker (for testcontainers).

just build      # compile + nogo lint (20 analyzers)
just test       # full test suite against real FDB
just gazelle    # regenerate BUILD files
just generate   # buf proto codegen
Project layout
pkg/recordlayer/        Record Layer implementation (CRUD, indexes, cursors, schema)
pkg/relational/         SQL engine (parser, Cascades optimizer, executor, database/sql driver)
pkg/fdbgo/              Pure Go FDB client (wire protocol, no CGo)
gen/                    Generated protobuf Go code
proto/apple/            Apple's original proto definitions
conformance/            Go↔Java cross-validation tests + Java conformance server
Running specific tests
bazelisk test //pkg/recordlayer:recordlayer_test \
    --test_arg="--ginkgo.focus=CountIndex" --test_output=streamed

License

See LICENSE.

Directories

Path Synopsis
cmd
bench-report command
Binary bench-report compares two Go benchmark result files and outputs a markdown comparison table.
Binary bench-report compares two Go benchmark result files and outputs a markdown comparison table.
fdb-binding-stress command
fdb-binding-stress runs the FDB binding tester across many seeds and reports results.
fdb-binding-stress runs the FDB binding tester across many seeds and reports results.
fdb-diff-oracle
Package difforacle implements the differential serialization fuzzer.
Package difforacle implements the differential serialization fuzzer.
fdb-stacktester command
fdb-stacktester implements the FDB binding tester stack machine.
fdb-stacktester implements the FDB binding tester stack machine.
fdb-stacktester/bindingtester
Package bindingtester runs the official FoundationDB binding tester against the pure-Go stacktester.
Package bindingtester runs the official FoundationDB binding tester against the pure-Go stacktester.
fdb-wirelog-dump command
fdb-wirelog-dump reads a binary wire log (FDB_WIRE_LOG format) and prints human-readable frame summaries.
fdb-wirelog-dump reads a binary wire log (FDB_WIRE_LOG format) and prints human-readable frame summaries.
gen-feature-matrix command
Command gen-feature-matrix regenerates FEATURE_MATRIX.md from the yamsql conformance corpus.
Command gen-feature-matrix regenerates FEATURE_MATRIX.md from the yamsql conformance corpus.
spfresh-maintainer command
Command spfresh-maintainer is the reference SPFresh maintenance worker (RFC-156 §3.2).
Command spfresh-maintainer is the reference SPFresh maintenance worker (RFC-156 §3.2).
test-report command
Binary test-report generates a self-contained HTML test report from Bazel's Build Event Protocol (BEP) JSON output.
Binary test-report generates a self-contained HTML test report from Bazel's Build Event Protocol (BEP) JSON output.
Package conformance holds the cross-engine conformance suite that compares the Go record layer against the Java reference.
Package conformance holds the cross-engine conformance suite that compares the Go record layer against the Java reference.
sql command
Command sql is a runnable quickstart for the SQL engine via Go's standard database/sql interface.
Command sql is a runnable quickstart for the SQL engine via Go's standard database/sql interface.
pkg
docscheck
Package docscheck holds repository documentation-consistency guards (RFC-131).
Package docscheck holds repository documentation-consistency guards (RFC-131).
fdbgo/client
Package client implements the FDB client transaction lifecycle.
Package client implements the FDB client transaction lifecycle.
fdbgo/fdb
Package fdb provides a pure-Go client for FoundationDB.
Package fdb provides a pure-Go client for FoundationDB.
fdbgo/fdb/directory
Package directory provides a tool for managing related subspaces.
Package directory provides a tool for managing related subspaces.
fdbgo/fdb/subspace
Package subspace provides a convenient way to use FoundationDB tuples to define namespaces for different categories of data.
Package subspace provides a convenient way to use FoundationDB tuples to define namespaces for different categories of data.
fdbgo/fdb/tuple
Package tuple provides a layer for encoding and decoding multi-element tuples into keys usable by FoundationDB.
Package tuple provides a layer for encoding and decoding multi-element tuples into keys usable by FoundationDB.
fdbgo/fdbmetrics
Package fdbmetrics exposes a pure-Go FDB client's operational counters (client.Database.Metrics, RFC-097) in the Prometheus text exposition format, ready to scrape — with zero dependencies.
Package fdbmetrics exposes a pure-Go FDB client's operational counters (client.Database.Metrics, RFC-097) in the Prometheus text exposition format, ready to scrape — with zero dependencies.
fdbgo/internal/diag
Package diag is the shared diagnostics sink for recovered panics in the pure-Go FDB client (the client and fdb-facade layers; transport keeps its own seriousLog).
Package diag is the shared diagnostics sink for recovered panics in the pure-Go FDB client (the client and fdb-facade layers; transport keeps its own seriousLog).
fdbgo/libfdbc
This stub keeps the package compilable when something imports it in a CGO_ENABLED=0 build (e.g.
This stub keeps the package compilable when something imports it in a CGO_ENABLED=0 build (e.g.
fdbgo/transport
Package transport implements FDB's TCP wire protocol: framing, handshake, and request/response multiplexing via endpoint tokens.
Package transport implements FDB's TCP wire protocol: framing, handshake, and request/response multiplexing via endpoint tokens.
fdbgo/wire
Package wire implements FDB's custom FlatBuffers-inspired binary serialization format.
Package wire implements FDB's custom FlatBuffers-inspired binary serialization format.
fdbgo/wire/types
Package types contains generated FDB FlatBuffers message types.
Package types contains generated FDB FlatBuffers message types.
internal/fdbclient
Package fdbclient selects the FoundationDB client backend at BUILD time.
Package fdbclient selects the FoundationDB client backend at BUILD time.
linters/gofmt
Package gofmt defines an analyzer that reports unformatted Go source files.
Package gofmt defines an analyzer that reports unformatted Go source files.
linters/gofumpt
Package gofumpt defines an analyzer that reports Go source files not formatted with gofumpt (a strict superset of gofmt).
Package gofumpt defines an analyzer that reports Go source files not formatted with gofumpt (a strict superset of gofmt).
linters/noemptyiface
Package noemptyiface defines an analyzer that rejects interface{} in favor of any.
Package noemptyiface defines an analyzer that rejects interface{} in favor of any.
linters/norecover
Package norecover is a nogo analyzer that enforces the panic→error boundary discipline (RFC-134, audit P2).
Package norecover is a nogo analyzer that enforces the panic→error boundary discipline (RFC-134, audit P2).
recordlayer/chaos
Package chaos provides model-based chaos testing for the FDB Record Layer.
Package chaos provides model-based chaos testing for the FDB Record Layer.
recordlayer/keyspace
Package keyspace provides a logical directory tree abstraction over FDB.
Package keyspace provides a logical directory tree abstraction over FDB.
recordlayer/query/executor
Package executor bridges RecordQueryPlan trees (Cascades planner output) and the FDBRecordStore scanning API to produce RecordCursor[QueryResult] streams.
Package executor bridges RecordQueryPlan trees (Cascades planner output) and the FDBRecordStore scanning API to produce RecordCursor[QueryResult] streams.
recordlayer/query/plan/cascades
derivations_evaluator.go — evaluates DerivationsProperty for physical plan wrapper expressions.
derivations_evaluator.go — evaluates DerivationsProperty for physical plan wrapper expressions.
recordlayer/query/plan/cascades/expressions
Package expressions ports the Cascades-side relational expression hierarchy from Java's `com.apple.foundationdb.record.query.plan.cascades.expressions`.
Package expressions ports the Cascades-side relational expression hierarchy from Java's `com.apple.foundationdb.record.query.plan.cascades.expressions`.
recordlayer/query/plan/cascades/properties
Package properties — Cardinality and Cardinalities types.
Package properties — Cardinality and Cardinalities types.
recordlayer/query/plan/cascades/values
Package values is the Value-tier of the Go Cascades planner port — scalar / row-context expressions that compose into predicates, projections, and join keys.
Package values is the Value-tier of the Go Cascades planner port — scalar / row-context expressions that compose into predicates, projections, and join keys.
recordlayer/query/plan/plans
Go extension — no Java equivalent.
Go extension — no Java equivalent.
recordlayer/vectorcodec
Package vectorcodec is the on-disk byte codec for HNSW vector columns, wire-compatible with Java's RealVector.fromBytes / VectorType.
Package vectorcodec is the on-disk byte codec for HNSW vector columns, wire-compatible with Java's RealVector.fromBytes / VectorType.
relational/api
Package api mirrors Java's fdb-relational-api module.
Package api mirrors Java's fdb-relational-api module.
relational/api/ddl
Package ddl defines the DDL action interfaces for the relational layer.
Package ddl defines the DDL action interfaces for the relational layer.
relational/conformance/plandiff
Package plandiff is the Phase 4.-1 plan-equivalence harness from RFC-022 §4.-1.
Package plandiff is the Phase 4.-1 plan-equivalence harness from RFC-022 §4.-1.
relational/conformance/yamsql
Package yamsql is a SQL-level conformance harness for the Go SQL driver.
Package yamsql is a SQL-level conformance harness for the Go SQL driver.
relational/core/catalog
Package catalog contains concrete implementations of the api.StoreCatalog / api.SchemaTemplateCatalog / api.Transaction interfaces.
Package catalog contains concrete implementations of the api.StoreCatalog / api.SchemaTemplateCatalog / api.Transaction interfaces.
relational/core/embedded
Package embedded implements the embedded (in-process) SQL execution engine for the FoundationDB relational layer.
Package embedded implements the embedded (in-process) SQL execution engine for the FoundationDB relational layer.
relational/core/functions
Package functions holds SQL-value operations that don't need connection/session state: checked integer arithmetic, numeric + bitwise operators with SQL semantics, type-coercion helpers used by scalar-function arguments, and (in future PRs) the scalar function dispatcher + protoreflect <-> driver.Value marshaling.
Package functions holds SQL-value operations that don't need connection/session state: checked integer arithmetic, numeric + bitwise operators with SQL semantics, type-coercion helpers used by scalar-function arguments, and (in future PRs) the scalar function dispatcher + protoreflect <-> driver.Value marshaling.
relational/core/keyspace
Package keyspace defines the relational-layer FDB key structure.
Package keyspace defines the relational-layer FDB key structure.
relational/core/metadata
Package metadata provides concrete bridge implementations of the api.* metadata interfaces backed by *recordlayer.RecordMetaData.
Package metadata provides concrete bridge implementations of the api.* metadata interfaces backed by *recordlayer.RecordMetaData.
relational/core/parser
Package parser houses the generated ANTLR4 lexer and parser for the Relational SQL dialect, plus the thin Go wrapper that wires them into a ParseTree suitable for consumption by the semantic analyzer.
Package parser houses the generated ANTLR4 lexer and parser for the Relational SQL dialect, plus the thin Go wrapper that wires them into a ParseTree suitable for consumption by the semantic analyzer.
relational/core/parser/grammar
Package grammar is a go-sentinel (empty) package whose only job is to anchor the *.g4 grammar files in the Go module tree so they travel with builds and gazelle doesn't delete the directory.
Package grammar is a go-sentinel (empty) package whose only job is to anchor the *.g4 grammar files in the Go module tree so they travel with builds and gazelle doesn't delete the directory.
relational/core/query
Package query defines the planner/plan seam between the SQL frontend (database/sql driver, future gRPC server, REPL) and the SQL execution engine.
Package query defines the planner/plan seam between the SQL frontend (database/sql driver, future gRPC server, REPL) and the SQL execution engine.
relational/core/query/expr
Package expr is the parse-tree → values.Value resolver.
Package expr is the parse-tree → values.Value resolver.
relational/core/query/logical
Package logical holds the Phase 3 (TODO.md §"Phase 3 — Semantic analysis") logical-operator hierarchy.
Package logical holds the Phase 3 (TODO.md §"Phase 3 — Semantic analysis") logical-operator hierarchy.
relational/core/query/plangen
Package plangen converts the embedded engine's LogicalOperator hierarchy into the Cascades-side RelationalExpression hierarchy.
Package plangen converts the embedded engine's LogicalOperator hierarchy into the Cascades-side RelationalExpression hierarchy.
relational/core/query/semantic
Package semantic is the Go port of Java's `com.apple.foundationdb.relational.recordlayer.query.SemanticAnalyzer` plus related Identifier / Expression / reference-resolution helpers.
Package semantic is the Go port of Java's `com.apple.foundationdb.relational.recordlayer.query.SemanticAnalyzer` plus related Identifier / Expression / reference-resolution helpers.
relational/core/query/semantic/rlcatalog
Package rlcatalog adapts the Record Layer's `RecordMetaData` into the `semantic.Catalog` interface.
Package rlcatalog adapts the Record Layer's `RecordMetaData` into the `semantic.Catalog` interface.
relational/core/session
Package session holds per-connection resource state for the relational SQL engine.
Package session holds per-connection resource state for the relational SQL engine.
relational/sqldriver
Package sqldriver implements a database/sql driver for the FoundationDB Record Layer relational (SQL) layer.
Package sqldriver implements a database/sql driver for the FoundationDB Record Layer relational (SQL) layer.
testcontainers/foundationdb
Package foundationdb provides a testcontainers module for FoundationDB.
Package foundationdb provides a testcontainers module for FoundationDB.

Jump to

Keyboard shortcuts

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