Field<ValType> class

Field is a convenience DSL used to construct queries in a concise and understandable way.

Example:

final age = IntField(age);
var value = await Find()
        .from('user')
        .where(age > 30)  // Simplifies query expressions
        .exec(adapter).one();
Implementers

Constructors

Field(String name)
const
Field.inTable(String? tableName, String name)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isNotNull Cond<ValType>
Returns an "IS NOT" condition, i.e. 'where var IS NOT null'
no setter
isNull Cond<ValType>
Returns an "IS" condition, i.e. 'where var IS null'
no setter
name String
Name of the field
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String?
final

Methods

aliasAs(String tableAlias) Field<ValType>
between(ValType low, ValType high) Between<ValType>
Returns an "in between" condition
eq(ValType value) Cond<ValType>
Returns an "is equal to" condition
eqF(String name, {String? table}) CondCol<ValType>
Returns an "is equal to" condition
eqField(Field<ValType> rhs) CondCol<ValType>
Returns an "is equal to" condition
gt(ValType value) Cond<ValType>
Returns a "greater than" condition
gtEq(ValType value) Cond<ValType>
Returns a "greater than equal to" condition
gtEqF(String name, {String? table}) CondCol<ValType>
Returns a "greater than equal to" condition
gtEqField(Field<ValType> rhs) CondCol<ValType>
Returns a "greater than equal to" condition
gtF(String name, {String? table}) CondCol<ValType>
Returns a "greater than" condition
gtField(Field<ValType> rhs) CondCol<ValType>
Returns a "greater than" condition
inBetweenFields(Field<ValType> low, Field<ValType> high) InBetweenCol<ValType>
Returns an "in between" condition
isIn(Set<ValType> value) InOperation<ValType>
Returns an "in" condition
lt(ValType value) Cond<ValType>
Returns a "less than" condition
ltEq(ValType value) Cond<ValType>
Returns a "less than equal to" condition
ltEqF(String name, {String? table}) CondCol<ValType>
Returns a "less than equal to" condition
ltEqField(Field<ValType> rhs) CondCol<ValType>
Returns a "less than equal to" condition
ltF(String name, {String? table}) CondCol<ValType>
Returns a "less than" condition
ltField(Field<ValType> rhs) CondCol<ValType>
Returns a "less than" condition
ne(ValType value) Cond<ValType>
Returns a "not equal to" condition
neF(String name, {String? table}) CondCol<ValType>
Returns a "not equal to" condition
neField(Field<ValType> rhs) CondCol<ValType>
Returns a "not equal to" condition
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(ValType? value) SetColumn<ValType>
Returns a "set column" clause
setNullable(ValType? value) SetColumn<ValType?>
toString() String
A string representation of this object.
inherited

Operators

operator <(ValType other) Cond<ValType>
operator <=(ValType other) Cond<ValType>
operator ==(Object other) bool
The equality operator.
inherited
operator >(ValType other) Cond<ValType>
operator >=(ValType other) Cond<ValType>