PgJoinToMany<TableType, JoinedTableType> class
Represents a one-to-many or many-to-many join in a table.
The value type of the generated column will be a list of custom PgModels.
For a many-to-one join or one-to-one join, use PgJoinToOne.
It generates the fancy query pattern and handles the conversion from JSON to a custom PgModel for you.
Constructors
-
PgJoinToMany({required PgColumn<
TableType, dynamic, dynamic> joinColumn, required PgTableName<JoinedTableType> joinedTableName, String? foreignKey}) -
Represents a one-to-many or many-to-many join in a table.
const
Properties
- foreignKey → String?
-
The foreign key to use for the join. This is only required in some cases.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
joinColumn
→ PgColumn<
TableType, dynamic, dynamic> -
The column in the current table that creates the foreign relationship with
the joined table.
finalinherited
-
joinedTableName
→ PgTableName<
JoinedTableType> -
The name of the joined table.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call<
ModelType extends PgModel< (JoinedTableType> >PgModelBuilder< JoinedTableType, ModelType> builder) → PgQueryColumn<TableType, List< ModelType> , PgJsonList> -
Generates a PgQueryColumn with the
TableTypethat handles the conversion from JSON to a custom PgModel of typeModelTypefor you.override -
column<
ValueType, JsonValueType> (PgColumn< JoinedTableType, ValueType, JsonValueType> column) → PgFilterColumn<TableType, ValueType, JsonValueType> -
Passes through the provided
columnfrom the joined table as a PgFilterColumn withTableType.inherited -
fromModels<
ModelType extends PgModel< (JoinedTableType> >List< ModelType> models) → PgValue<TableType, List< ModelType> , dynamic> -
Creates a fake PgValue that contains the given
models. -
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