Skip to content

Literal

relationalai.semantics.frontend.base
Literal(value: Any, model: Model, type: Concept | None = None)

Wrap a Python value so it can be used in DSL expressions.

Literal objects are typically created implicitly when you pass Python values (for example 42 or "Alice") to a relationship/property call or when building fragments via Model.define, Model.where, and Model.select.

  • value

    (Any) - The Python value to embed in the DSL.
  • model

    (Model) - The model this literal belongs to.
  • type

    (Concept, default: None) - Explicit concept type for the literal. If omitted, the type is inferred.

Most users should not instantiate this class directly; prefer passing Python values directly (for example Person.age(30)).

LiteralVariableDSLBase