Constant class
A fixed value.
Preview, Enterprise only: the Pipelines API is experimental, may change in any release and needs a Firestore Enterprise edition database.
- Inheritance
-
- Object
- Expression
- Constant
Constructors
Properties
Methods
-
abs(
) → FunctionExpression -
The absolute value of this number.
inherited
-
add(
Object? other) → FunctionExpression -
Adds
otherto this expression.inherited -
arrayAgg(
) → AggregateFunction -
All values of this expression, as an array.
inherited
-
arrayAggDistinct(
) → AggregateFunction -
The distinct values of this expression, as an array.
inherited
-
arrayConcat(
List< Object?> others) → FunctionExpression -
This array followed by the elements of the arrays in
others.inherited -
arrayContains(
Object? element) → BooleanExpression -
Whether this array contains
element.inherited -
arrayContainsAll(
Object values) → BooleanExpression -
Whether this array contains all of
values, aListof values or expressions, or an Expression that evaluates to an array.inherited -
arrayContainsAny(
Object values) → BooleanExpression -
Whether this array contains at least one of
values, aListof values or expressions, or an Expression that evaluates to an array.inherited -
arrayFilter(
BooleanExpression filter(Expression element), {String alias = 'element'}) → FunctionExpression -
The elements of this array for which
filterholds.inherited -
arrayFirst(
) → FunctionExpression -
The first element of this array.
inherited
-
arrayFirstN(
Object n) → FunctionExpression -
The first
nelements of this array.inherited -
arrayGet(
Object index) → FunctionExpression -
The element at
indexof this array (negative counts from the end).inherited -
arrayIndexOf(
Object? search) → FunctionExpression -
The position of the first occurrence of
searchin this array, or -1.inherited -
arrayIndexOfAll(
Object? search) → FunctionExpression -
The positions of all occurrences of
searchin this array.inherited -
arrayLast(
) → FunctionExpression -
The last element of this array.
inherited
-
arrayLastIndexOf(
Object? search) → FunctionExpression -
The position of the last occurrence of
searchin this array, or -1.inherited -
arrayLastN(
Object n) → FunctionExpression -
The last
nelements of this array.inherited -
arrayLength(
) → FunctionExpression -
The number of elements of this array.
inherited
-
arrayMaximum(
) → FunctionExpression -
The largest element of this array.
inherited
-
arrayMaximumN(
Object n) → FunctionExpression -
The
nlargest elements of this array, largest first.inherited -
arrayMinimum(
) → FunctionExpression -
The smallest element of this array.
inherited
-
arrayMinimumN(
Object n) → FunctionExpression -
The
nsmallest elements of this array, smallest first.inherited -
arrayReverse(
) → FunctionExpression -
This array in reverse order.
inherited
-
arraySlice(
Object offset, [Object? length]) → FunctionExpression -
The elements of this array from
offset, at mostlengthof them.inherited -
arraySum(
) → FunctionExpression -
The sum of the numeric elements of this array.
inherited
-
arrayTransform(
Object? transform(Expression element), {String alias = 'element'}) → FunctionExpression -
This array with every element replaced by the result of
transform.inherited -
arrayTransformWithIndex(
Object? transform(Expression element, Expression index), {String elementAlias = 'element', String indexAlias = 'index'}) → FunctionExpression -
Like arrayTransform, but
transformalso receives an expression for the position of the element in the array.inherited -
as(
String alias) → AliasedExpression -
Gives this expression a name, for use in
select,addFieldsanddistinct.inherited -
asBoolean(
) → BooleanExpression -
Treats this expression as a boolean, so that it can be used as a
condition (for example a field that holds a boolean).
inherited
-
ascending(
) → Ordering -
Sorts by this expression, smallest first.
inherited
-
average(
) → AggregateFunction -
Averages the values of this expression.
inherited
-
byteLength(
) → FunctionExpression -
The number of bytes of this string (in UTF-8) or of these bytes.
inherited
-
ceil(
) → FunctionExpression -
This number rounded up to a whole number.
inherited
-
charLength(
) → FunctionExpression -
The number of characters of this string.
inherited
-
coalesce(
Object? replacement, [List< Object?> others = const <Object?>[]]) → FunctionExpression -
The first of this value,
replacementandothersthat is neither null nor absent.inherited -
collectionId(
) → FunctionExpression -
The id of the collection of this document reference.
inherited
-
concat(
List< Object?> others) → FunctionExpression -
This value concatenated with
others(strings, arrays or bytes).inherited -
cosineDistance(
Object other) → FunctionExpression -
The cosine distance between this vector and
other(aVectorValue, aList<double>or an expression).inherited -
count(
) → AggregateFunction -
Counts the inputs for which this expression has a value.
inherited
-
countDistinct(
) → AggregateFunction -
Counts the distinct values of this expression.
inherited
-
descending(
) → Ordering -
Sorts by this expression, largest first.
inherited
-
divide(
Object? other) → FunctionExpression -
Divides this expression by
other.inherited -
documentId(
) → FunctionExpression -
The document id of this document reference (or document path).
inherited
-
dotProduct(
Object other) → FunctionExpression -
The dot product of this vector and
other; see cosineDistance.inherited -
endsWith(
Object suffix) → BooleanExpression -
Whether this string ends with
suffix.inherited -
equal(
Object? other) → BooleanExpression -
Whether this expression is equal to
other.inherited -
equalAny(
Object values) → BooleanExpression -
Whether this expression is equal to any of
values, aListof values or expressions, or an Expression that evaluates to an array.inherited -
euclideanDistance(
Object other) → FunctionExpression -
The Euclidean distance between this vector and
other; see cosineDistance.inherited -
exists(
) → BooleanExpression -
Whether this expression (usually a Field) has a value in the document.
inherited
-
exp(
) → FunctionExpression -
Euler's number raised to the power of this number.
inherited
-
first(
) → AggregateFunction -
The value of this expression for the first input.
inherited
-
floor(
) → FunctionExpression -
This number rounded down to a whole number.
inherited
-
geoDistance(
Object location) → FunctionExpression -
The distance in meters between this location and
location(aGeoPointor an expression).inherited -
getField(
Object key) → FunctionExpression -
The value of the field
keyof this map or document, for example ofcurrentDocument()or of a variable that holds a document.inherited -
greaterThan(
Object? other) → BooleanExpression -
Whether this expression is greater than
other.inherited -
greaterThanOrEqual(
Object? other) → BooleanExpression -
Whether this expression is greater than or equal to
other.inherited -
ifAbsent(
Object? elseValue) → FunctionExpression -
This value, or
elseValueif it is absent.inherited -
ifError(
Object? catchValue) → FunctionExpression -
This value, or
catchValueif evaluating it fails.inherited -
ifNull(
Object? elseValue) → FunctionExpression -
This value, or
elseValueif it is null.inherited -
isAbsent(
) → BooleanExpression -
Whether this expression has no value in the document.
inherited
-
isError(
) → BooleanExpression -
Whether evaluating this expression produces an error.
inherited
-
isType(
String type) → BooleanExpression -
Whether this value is of the type with the name
type.inherited -
join(
Object delimiter) → FunctionExpression -
The elements of this array of strings, joined with
delimiter.inherited -
last(
) → AggregateFunction -
The value of this expression for the last input.
inherited
-
length(
) → FunctionExpression -
The length of this string, array, map, vector or bytes value.
inherited
-
lessThan(
Object? other) → BooleanExpression -
Whether this expression is less than
other.inherited -
lessThanOrEqual(
Object? other) → BooleanExpression -
Whether this expression is less than or equal to
other.inherited -
like(
Object pattern) → BooleanExpression -
Whether this string matches the SQL-style
LIKEpattern.inherited -
ln(
) → FunctionExpression -
The natural logarithm of this number.
inherited
-
log(
Object base) → FunctionExpression -
The logarithm of this number to the given
base.inherited -
log10(
) → FunctionExpression -
The base 10 logarithm of this number.
inherited
-
logicalMaximum(
List< Object?> others) → FunctionExpression -
The largest of this value and
others, in Firestore's value ordering.inherited -
logicalMinimum(
List< Object?> others) → FunctionExpression -
The smallest of this value and
others, in Firestore's value ordering.inherited -
ltrim(
[Object? characters]) → FunctionExpression -
Like trim, for the start of the string only.
inherited
-
mapEntries(
) → FunctionExpression -
The entries of this map, as an array of maps with
kandv.inherited -
mapGet(
String key) → FunctionExpression -
The value stored under
keyin this map.inherited -
mapKeys(
) → FunctionExpression -
The keys of this map.
inherited
-
mapMerge(
Object second, [List< Object> others = const <Object>[]]) → FunctionExpression -
This map merged with
secondandothers; later maps win.inherited -
mapRemove(
Object key) → FunctionExpression -
This map without the entry for
key.inherited -
mapSet(
Object key, Object? value, [List< Object?> moreKeyValues = const <Object?>[]]) → FunctionExpression -
This map with
keyset tovalue.inherited -
mapValues(
) → FunctionExpression -
The values of this map.
inherited
-
maximum(
) → AggregateFunction -
The largest value of this expression.
inherited
-
minimum(
) → AggregateFunction -
The smallest value of this expression.
inherited
-
mod(
Object? other) → FunctionExpression -
The remainder of dividing this expression by
other.inherited -
multiply(
Object? other) → FunctionExpression -
Multiplies this expression by
other.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEqual(
Object? other) → BooleanExpression -
Whether this expression is not equal to
other.inherited -
notEqualAny(
Object values) → BooleanExpression -
Whether this expression is equal to none of
values, aListof values or expressions, or an Expression that evaluates to an array.inherited -
parent(
) → FunctionExpression -
The parent of this document reference.
inherited
-
pow(
Object exponent) → FunctionExpression -
This number raised to the power
exponent.inherited -
regexContains(
Object pattern) → BooleanExpression -
Whether a part of this string matches the regular expression
pattern.inherited -
regexFind(
Object pattern) → FunctionExpression -
The first part of this string that matches the regular expression
pattern.inherited -
regexFindAll(
Object pattern) → FunctionExpression -
All parts of this string that match the regular expression
pattern.inherited -
regexMatch(
Object pattern) → BooleanExpression -
Whether the whole string matches the regular expression
pattern.inherited -
reverse(
) → FunctionExpression -
This string, array or bytes value in reverse order.
inherited
-
round(
[Object? decimalPlaces]) → FunctionExpression -
This number rounded to
decimalPlaces(to a whole number without it).inherited -
rtrim(
[Object? characters]) → FunctionExpression -
Like trim, for the end of the string only.
inherited
-
split(
Object delimiter) → FunctionExpression -
The parts of this string between occurrences of
delimiter.inherited -
sqrt(
) → FunctionExpression -
The square root of this number.
inherited
-
startsWith(
Object prefix) → BooleanExpression -
Whether this string starts with
prefix.inherited -
stringConcat(
List< Object?> others) → FunctionExpression -
Concatenates this string with
others.inherited -
stringContains(
Object substring) → BooleanExpression -
Whether this string contains
substring.inherited -
stringIndexOf(
Object search) → FunctionExpression -
The position of the first occurrence of
searchin this string, or -1.inherited -
stringRepeat(
Object repetitions) → FunctionExpression -
This string repeated
repetitionstimes.inherited -
stringReplaceAll(
Object find, Object replacement) → FunctionExpression -
This string with every occurrence of
findreplaced byreplacement.inherited -
stringReplaceOne(
Object find, Object replacement) → FunctionExpression -
This string with the first occurrence of
findreplaced byreplacement.inherited -
stringReverse(
) → FunctionExpression -
This string with its characters in reverse order.
inherited
-
substring(
Object position, [Object? length]) → FunctionExpression -
The part of this string that starts at
position(0-based) and haslengthcharacters, or runs to the end withoutlength.inherited -
subtract(
Object? other) → FunctionExpression -
Subtracts
otherfrom this expression.inherited -
sum(
) → AggregateFunction -
Sums the values of this expression.
inherited
-
timestampAdd(
Object unit, Object amount) → FunctionExpression -
This timestamp plus
amountofunit('microsecond','millisecond','second','minute','hour'or'day').inherited -
timestampDiff(
Object start, Object unit) → FunctionExpression -
The number of whole
units fromstart(a field name or an expression) to this timestamp.inherited -
timestampExtract(
Object part, [Object? timezone]) → FunctionExpression -
The
part(for example'year'or'dayofweek') of this timestamp, optionally intimezone.inherited -
timestampSubtract(
Object unit, Object amount) → FunctionExpression -
This timestamp minus
amountofunit; see timestampAdd.inherited -
timestampToUnixMicros(
) → FunctionExpression -
This timestamp as microseconds since the Unix epoch.
inherited
-
timestampToUnixMillis(
) → FunctionExpression -
This timestamp as milliseconds since the Unix epoch.
inherited
-
timestampToUnixSeconds(
) → FunctionExpression -
This timestamp as seconds since the Unix epoch.
inherited
-
timestampTruncate(
Object granularity, [Object? timezone]) → FunctionExpression -
This timestamp truncated to
granularity(for example'day'), optionally intimezone.inherited -
toLower(
) → FunctionExpression -
This string in lower case.
inherited
-
toProto(
PipelineEncoder encoder) → Value - Returns the wire representation of this expression.
-
toString(
) → String -
A string representation of this object.
override
-
toUpper(
) → FunctionExpression -
This string in upper case.
inherited
-
trim(
[Object? characters]) → FunctionExpression -
This string without leading and trailing whitespace, or without the
leading and trailing characters of
characterswhen given.inherited -
trunc(
[Object? decimalPlaces]) → FunctionExpression -
This number cut off after
decimalPlaces(at the decimal point without it).inherited -
type(
) → FunctionExpression -
The name of the type of this value (for example
'string').inherited -
unixMicrosToTimestamp(
) → FunctionExpression -
The timestamp this number of microseconds after the Unix epoch.
inherited
-
unixMillisToTimestamp(
) → FunctionExpression -
The timestamp this number of milliseconds after the Unix epoch.
inherited
-
unixSecondsToTimestamp(
) → FunctionExpression -
The timestamp this number of seconds after the Unix epoch.
inherited
-
vectorLength(
) → FunctionExpression -
The number of dimensions of this vector.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited