Projection class final
Declares a named flat SQL projection without a physical table.
Put this on a public nongeneric class with an unnamed constructor using named parameters, or on a typedef for a named record. Generation emits a typed expression-binding function and derived query fields. Every constructor parameter or record field is an explicitly required expression at binding. The expression supplies its codec; no column or storage annotation is needed. An abstract class must expose a factory returning a concrete implementation; an abstract generative constructor cannot materialize a result.
Class projections construct the original DTO after decoding, retaining its methods. Constructor validation or transformation runs only when results are materialized. Derived SQL fields always refer to the bound SQL slots, before such Dart constructor logic. Projections never enter schema snapshots or migration history, and generation never executes the DTO constructor.
Constructors
- Projection()
-
Marks a class or named-record typedef for projection generation.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited