Class ArrayExpression
A class containing methods for generating queries that operate on array types
Inheritance
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public static class ArrayExpression : object
Methods
| Improve this Doc View SourceAny(IVariableExpression)
Returns the start of an expression that will evaluate if any elements inside of an array match a given predicate
Usage:
ArrayExpression.Any("x").In(Expression.Property("prop")).Satisfies(ArrayExpression.Variable("x").EqualTo(42))
Declaration
public static IArrayExpressionIn Any(IVariableExpression variable)
Parameters
Type | Name | Description |
---|---|---|
IVariableExpression | variable | The name to assign to the variable that will be used later via Variable(String) |
Returns
Type | Description |
---|---|
IArrayExpressionIn | The first portion of the completed expression for further modification |
AnyAndEvery(IVariableExpression)
Returns the start of an expression that will evaluate the following:
- The array is not empty (has "any" elements)
- Every element in the array matches a given predicate ("every" element matches)
Usage:
ArrayExpression.AnyAndEvery("x").In(Expression.Property("prop")).Satisfies(ArrayExpression.Variable("x").EqualTo(42))
Declaration
public static IArrayExpressionIn AnyAndEvery(IVariableExpression variable)
Parameters
Type | Name | Description |
---|---|---|
IVariableExpression | variable | The name to assign to the variable that will be used later via Variable(String) |
Returns
Type | Description |
---|---|
IArrayExpressionIn | The first portion of the completed expression for further modification |
Every(IVariableExpression)
Returns the start of an expression that will evaluate if every element inside
of an array matches a given predicate (note: That means that an empty array will
return true
because "all zero" elements match)
Usage:
ArrayExpression.Every("x").In(Expression.Property("prop")).Satisfies(ArrayExpression.Variable("x").EqualTo(42))
Declaration
public static IArrayExpressionIn Every(IVariableExpression variable)
Parameters
Type | Name | Description |
---|---|---|
IVariableExpression | variable | The name to assign to the variable that will be used later via Variable(String) |
Returns
Type | Description |
---|---|
IArrayExpressionIn | The first portion of the completed expression for further modification |
Variable(String)
Returns an expression representing the value of a named variable assigned by earlier calls to Any(IVariableExpression) and family.
Declaration
public static IVariableExpression Variable(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the variable |
Returns
Type | Description |
---|---|
IVariableExpression | An expression representing the value of a named variable |