ProjectedField class

Represents a field selected in the query, analogous to an item in a SQL SELECT clause.

It specifies the source field and optionally applies transformations like aggregation, casting, regex extraction, or assigns an alias. Use ProjectedField when you need more than just the raw source field name (for which you might use FieldSource directly in QueryBuilderConfig's field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property).

Constructors

ProjectedField({String? alias, String? cast, String? field, String? operation, String? regexExtraction, FunctionApplication? sqlAggregationFunction, String? truncationGranularity, VirtualField? virtualField})
ProjectedField.fromJson(Map json_)

Properties

alias String?
The alias name for the field.
getter/setter pair
cast String?
The cast for the field.
getter/setter pair
field String?
The field name.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
operation String?
Specifies the role of this field (direct selection, grouping, or aggregation). Possible string values are:
getter/setter pair
regexExtraction String?
The re2 extraction for the field.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sqlAggregationFunction FunctionApplication?
The function to apply to the field.
getter/setter pair
truncationGranularity String?
The truncation granularity when grouping by a time/date field.
getter/setter pair
virtualField VirtualField?
A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited