ModuleBlueprint

org.sigilaris.core.application.module.blueprint.ModuleBlueprint
final class ModuleBlueprint[F[_], MName <: String, Owns <: Tuple, Needs <: Tuple, Txs <: Tuple](val owns: Owns, val reducer0: StateReducer0[F, Owns, Needs], val txs: TxRegistry[Txs], val provider: TablesProvider[F, Needs])(using val uniqueNames: UniqueNames[Owns], val moduleValue: ValueOf[MName]) extends Blueprint[F, MName, Owns, Needs, Txs, StateReducer0[F, Owns, Needs]]

Single-module blueprint (path-independent).

A module blueprint is a specification for a single, self-contained module. It uses StateReducer0, which can process any transaction type (T <: Tx) that satisfies the schema requirements.

Module blueprints are designed with the assumption that they don't know where they will be deployed. The mounting process (Phase 2) binds a blueprint to a specific Path, computing prefixes and using Entry instances to create concrete StateTable instances.

IMPORTANT: Blueprint contains Entry instances (runtime values), not StateTable instances. Each Entry can create a StateTable when given a prefix.

Phase 5.5 update: Now explicitly models Owns and Needs:

  • owns: Entry tuple for tables this module will create
  • provider: TablesProvider for external tables this module needs
  • reducer0: operates on Owns ++ Needs combined schema

Type parameters

F

the effect type

MName

the module name (literal String type)

Needs

the needed schema tuple (tuple of Entry types)

Owns

the owned schema tuple (tuple of Entry types)

Txs

the transaction types tuple

Value parameters

owns

the Entry instances for owned tables (runtime values)

provider

the tables provider for needed external tables

reducer0

the path-agnostic reducer (accepts any Tx)

txs

the transaction registry

uniqueNames

evidence that table names are unique within Owns

Attributes

Source
Blueprint.scala
Graph
Supertypes
trait Blueprint[F, MName, Owns, Needs, Txs, StateReducer0[F, Owns, Needs]]
class Object
trait Matchable
class Any

Members list

Type members

Inherited types

type EffectType[A] = F[A]

The effect type used by this blueprint.

The effect type used by this blueprint.

Attributes

Inherited from:
Blueprint
Source
Blueprint.scala
type ModuleName = MName

The literal module name type.

The literal module name type.

Attributes

Inherited from:
Blueprint
Source
Blueprint.scala
type NeedsType = Needs

The needed schema tuple type.

The needed schema tuple type.

Attributes

Inherited from:
Blueprint
Source
Blueprint.scala
type OwnsType = Owns

The owned schema tuple type.

The owned schema tuple type.

Attributes

Inherited from:
Blueprint
Source
Blueprint.scala
type TxsType = Txs

The transaction types tuple.

The transaction types tuple.

Attributes

Inherited from:
Blueprint
Source
Blueprint.scala

Value members

Concrete fields

val owns: Owns

The Entry instances for owned tables (runtime values that can create tables).

The Entry instances for owned tables (runtime values that can create tables).

Attributes

Source
Blueprint.scala
val provider: TablesProvider[F, Needs]

The tables provider for needed external tables.

The tables provider for needed external tables.

Attributes

Source
Blueprint.scala
val reducer0: StateReducer0[F, Owns, Needs]

The path-agnostic reducer.

The path-agnostic reducer.

Attributes

Source
Blueprint.scala
override val routeHeads: List[String]

Module-relative first segments handled by this blueprint.

Module-relative first segments handled by this blueprint.

Attributes

Source
Blueprint.scala
val txs: TxRegistry[Txs]

The transaction registry.

The transaction registry.

Attributes

Source
Blueprint.scala

Givens

Givens

given moduleValue: ValueOf[MName]

Literal module name for this blueprint.

Literal module name for this blueprint.

Attributes

Source
Blueprint.scala
given uniqueNames: UniqueNames[Owns]

Evidence that table names are unique within Owns.

Evidence that table names are unique within Owns.

Phase 5.5: We only check uniqueness of owned tables. External tables (Needs) are provided by TablesProvider and their uniqueness is the responsibility of the provider module.

Attributes

Source
Blueprint.scala