ModelCodeGenerator class final
Generates the ${Class}Query companion from a resolved QueryableModel.
Each @Queryable class gets exactly one companion class that is the
canonical query (extends MappedQuery/FoldMappedQuery) and carries the
public static fromRow reader (plus mapper, and fold for @HasMany
roots). Relation targets are read via their own TargetQuery.fromRow —
imported from wherever they are defined — so nothing is regenerated per
consumer. That is what keeps split-file models free of duplicated readers.
- Available extensions
Constructors
- ModelCodeGenerator({ReaderEmitter readerEmitter = const ReaderEmitter(), QueryGetterEmitter queryGetterEmitter = const QueryGetterEmitter(), RelationCallEmitter relationCalls = const RelationCallEmitter(), SelectQueryEmitter selectQueryEmitter = const SelectQueryEmitter(), HasManyQueryEmitter hasManyQueryEmitter = const HasManyQueryEmitter(), HasManyFoldEmitter hasManyFoldEmitter = const HasManyFoldEmitter(), AggregateQueryEmitter aggregateQueryEmitter = const AggregateQueryEmitter()})
-
const
Properties
- aggregateQueryEmitter → AggregateQueryEmitter
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasManyFoldEmitter → HasManyFoldEmitter
-
final
- hasManyQueryEmitter → HasManyQueryEmitter
-
final
- queryGetterEmitter → QueryGetterEmitter
-
final
- readerEmitter → ReaderEmitter
-
final
- relationCalls → RelationCallEmitter
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectQueryEmitter → SelectQueryEmitter
-
final
Methods
-
generate(
QueryableModel model) → List< String> -
generateSource(
QueryableModel model) → String -
Available on ModelCodeGenerator, provided by the ModelCodeGeneratorJoin extension
-
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