SqlQuery class

Represents a SQL query with parameterized values and type information.

Constructors

SqlQuery({required String sql, required List args, required List<ArgType> argTypes, RelationMetadata? relationMetadata, List<String> computedFieldNames = const []})
const

Properties

args → List
The values to substitute for placeholders
final
argTypes → List<ArgType>
Type information for each argument (for proper type conversion)
final
computedFieldNames → List<String>
Names of computed fields in the query (e.g., 'minPrice', 'avgRating'). Used to preserve computed fields when deserializing JOIN results.
final
hashCode → int
The hash code for this object.
no setterinherited
hasRelations → bool
Whether this query has relation metadata that needs deserialization.
no setter
relationMetadata → RelationMetadata?
Relation metadata for deserializing JOIN results into nested objects. Only present when the query includes relations via include.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sql → String
The SQL statement with placeholders (e.g., "SELECT * FROM users WHERE id = $1")
final

Methods

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

Operators

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