AndWhere class

Represents a WHERE clause that combines multiple conditions with AND.

This class explicitly combines conditions with AND logic, which is the same as the default behavior of the base Where class. It's provided for explicit clarity when building complex conditions.

Example usage:

var andWhere = AndWhere([
  Condition(QField('age'), QO.GTE, QVar(18)),
  Condition(QField('status'), QO.EQ, QVar('active'))
]); // WHERE ( ( age >= 18 ) AND ( status = 'active' ) )
Inheritance

Constructors

AndWhere.new([List<SQL>? whereBodies])
Creates an AND WHERE clause with optional initial conditions.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(SQL whereBody) Where
Adds a SQL condition to this WHERE clause.
inherited
clear() Where
Clears all conditions from this WHERE clause.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSQL() String
Generates SQL by combining all conditions with AND.
override
toString() String
A string representation of this object.
inherited

Operators

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