QFromQuery class
Represents a subquery used as a table source in the FROM clause.
This class allows using a complete query as a table source, with optional aliasing for referencing in the outer query.
Example usage:
var subQuery = Sqler().addSelect(QSelect('user_id')).from(QField('orders'));
var fromQuery = QFromQuery(subQuery, as: 'order_users');
// Results in: (SELECT `user_id` FROM `orders`) AS `order_users`
Constructors
- QFromQuery.new(Sqler query, {String as = ''})
- Creates a subquery table source with optional alias.
Properties
- as ↔ String
-
Optional alias for the field
getter/setter pairinherited
- distinct ↔ bool
-
Whether to select distinct values for this field
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- query ↔ Sqler
-
The subquery to use as a table source
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ dynamic
-
The Dart value to be converted to SQL
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toSQL(
) → String -
Generates the SQL for the subquery with optional alias.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited