graphtest

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package graphtest is the EXPORTED graph-dialect conformance suite: the gate every GraphQuerier must pass before fabriq will project into it, and the contract that keeps shipped Cypher inside the openCypher common subset so FalkorDB can later be swapped for Memgraph, Neo4j or Kùzu without touching appliers or call sites.

Usage (any adapter, typically behind an integration build tag):

func TestFalkorConformance(t *testing.T) {
    graphtest.Run(t, func(t *testing.T) graphtest.Harness {
        // boot container, return the adapter + a fresh target graph
    })
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, factory func(t *testing.T) Harness)

Run executes the suite against a fresh harness per case.

Types

type Case

type Case struct {
	Name    string
	Seed    []projection.Mutation
	Cypher  string
	Params  map[string]any
	WantIDs []string
}

Case is one conformance scenario: seed mutations, a query in the openCypher COMMON SUBSET, and the ids it must return (in order).

func Cases

func Cases() []Case

Cases is the canonical pattern table. Engines must pass every case verbatim — no dialect-specific rewrites.

type Harness

type Harness struct {
	Graph  query.GraphQuerier
	Target string          // fresh graph/projection target for this case
	Ctx    context.Context // tenant-stamped context
}

Harness is what an adapter's test factory provides per case.

Jump to

Keyboard shortcuts

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