lightspeed/data_plane

Large data-plane contracts with windowed queries and incremental updates.

Types

Dataset profile used for large-data workloads.

pub type Dataset {
  ListDataset
  GridDataset(columns: Int)
  ChartDataset(series_key: String)
}

Constructors

  • ListDataset
  • GridDataset(columns: Int)
  • ChartDataset(series_key: String)

Plane

opaque

Large data-plane runtime.

pub opaque type Plane

Window query validation failures.

pub type QueryError {
  InvalidWindow(offset: Int, limit: Int)
}

Constructors

  • InvalidWindow(offset: Int, limit: Int)

One keyed data-plane row.

pub type Row {
  Row(id: String, payload: String)
}

Constructors

  • Row(id: String, payload: String)

Incremental updates applied to the large-data plane.

pub type Update {
  Upsert(row: Row)
  Delete(id: String)
}

Constructors

  • Upsert(row: Row)
  • Delete(id: String)

Window query result.

pub type Window {
  Window(offset: Int, limit: Int, total: Int, rows: List(Row))
}

Constructors

  • Window(offset: Int, limit: Int, total: Int, rows: List(Row))

One window request over a large dataset.

pub type WindowRequest {
  WindowRequest(offset: Int, limit: Int)
}

Constructors

  • WindowRequest(offset: Int, limit: Int)

Values

pub fn apply_updates(
  plane: Plane,
  request: WindowRequest,
  updates: List(Update),
) -> #(Plane, Result(Window, QueryError), List(diff.Patch))

Apply incremental updates and return window patches for one request.

pub fn contains_full_root_churn(
  patches: List(diff.Patch),
) -> Bool

True when a patch set includes full-root churn operations.

pub fn dataset(plane: Plane) -> Dataset

Plane dataset profile.

pub fn dataset_label(dataset: Dataset) -> String

Stable dataset label.

pub fn new(
  target: String,
  dataset: Dataset,
  rows: List(Row),
) -> Plane

Build one large-data plane.

pub fn query_error_label(error: QueryError) -> String

Stable query-error label.

pub fn query_window(
  plane: Plane,
  request: WindowRequest,
) -> Result(Window, QueryError)

Execute one windowed query.

pub fn request(offset: Int, limit: Int) -> WindowRequest

Build one window request.

pub fn row(id: String, payload: String) -> Row

Build one row.

pub fn rows(plane: Plane) -> List(Row)

Plane rows in stored order.

pub fn signature(plane: Plane) -> String

Stable plane signature for deterministic fixtures.

pub fn steady_state_incremental(
  patches: List(diff.Patch),
) -> Bool

True when a patch set is steady-state incremental (keyed-only or empty).

pub fn target(plane: Plane) -> String

Plane target selector.

pub fn valid(plane: Plane) -> Bool

Validate one large-data plane contract.

pub fn window_signature(window: Window) -> String

Stable window signature for fixture assertions.

Search Document