FoundVariable class
A semantic interpretation of a Variable
in a sql statement.
- Inheritance
-
- Object
- FoundElement
- FoundVariable
- Implemented types
- Available extensions
Constructors
- FoundVariable.new({required int index, required String? name, required ColumnType type, required Variable variable, bool nullable = false, bool isArray = false, bool isRequired = false, UsedTypeConverter? typeConverter})
- FoundVariable.nestedQuery({required int index, required String? name, required ColumnType type, required Variable variable, required CapturedVariable? forCaptured})
Properties
- dartParameterName → String
-
no setteroverride
- forCaptured → CapturedVariable?
-
When this variable is introduced for a nested query referencing something
from an outer query, contains the backing variable.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSqlName → bool
-
no setterinherited
-
If the element should be hidden from the parameter list
final
- index ↔ int
-
The (unique) index of this variable in the sql query. For instance, the
query
SELECT * FROM tbl WHERE a = ? AND b = :xyz OR c = :xyz
contains threeVariable
s in its AST, but only two FoundVariables, where the?
will have index 1 and (both):xyz
variables will have index 2. We only report one FoundVariable per index.getter/setter pair - isArray → bool
-
Whether this variable is an array, which will be expanded into multiple
variables at runtime. We only accept queries where no explicitly numbered
vars appear after an array. This means that we can expand array variables
without having to look at other variables.
final
- isRequired → bool
-
final
- name ↔ String?
-
The name of this variable, or null if it's not a named variable.
getter/setter pairoverride-getter
- nullable → bool
-
Whether the type is nullable in Dart.
final
- nullableInDart → bool
-
Available on HasType, provided by the OperationOnTypes extension
Whether this type is nullable in Dartno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sqlTypeName → String
-
Available on HasType, provided by the OperationOnTypes extension
The class inside the moor library that represents the same sql type as this column.no setter - type → ColumnType
-
The (inferred) type for this variable.
final
- typeConverter → UsedTypeConverter?
-
The type converter to apply before writing this value.
final
- variable → Variable
-
The first
Variable
in the sql statement that has this index.final - variableTypeName → String
-
Available on HasType, provided by the OperationOnTypes extension
the Dart type of this column that can be handled by moors type mapping. Basically the same as dartTypeCode, minus custom types and nullability.no setter
Methods
-
dartTypeCode(
[GenerationOptions options = const GenerationOptions()]) → String -
Dart code for a type representing tis element.
override
-
dartTypeCode(
[GenerationOptions options = const GenerationOptions()]) → String -
Available on HasType, provided by the OperationOnTypes extension
The dart type that matches the values of this column. For instance, if a table has declared anIntColumn
, the matching dart type name would be int. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
variableTypeCode(
[GenerationOptions options = const GenerationOptions()]) → String -
Available on HasType, provided by the OperationOnTypes extension
The moor Dart type that matches the type of this column. -
variableTypeCodeWithoutArray(
[GenerationOptions options = const GenerationOptions()]) → String -
Available on HasType, provided by the OperationOnTypes extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited