Show / Hide Table of Contents

Class ArrayExpression

A class containing methods for generating queries that operate on array types

Inheritance
System.Object
ArrayExpression
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public static class ArrayExpression

Methods

| Improve this Doc View Source

Any(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

| Improve this Doc View Source

AnyAndEvery(IVariableExpression)

Returns the start of an expression that will evaluate the following:

  1. The array is not empty (has "any" elements)
  2. 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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX