Class Expression
A factory for unary IExpression operators
Inherited Members
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public static class Expression
Methods
| Improve this Doc View SourceAll()
Returns an expression to represent '' in things like COUNT() and SELECT *
Declaration
public static IPropertyExpression All()
Returns
| Type | Description |
|---|---|
| IPropertyExpression | The expression representing '*' |
Array(IList)
Returns an expression to represent a fixed array value
Declaration
public static IExpression Array(IList value)
Parameters
| Type | Name | Description |
|---|---|---|
| IList | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Boolean(bool)
Returns an expression to represent a fixed bool value
Declaration
public static IExpression Boolean(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Date(DateTimeOffset)
Returns an expression to represent a fixed DateTimeOffset value
Declaration
public static IExpression Date(DateTimeOffset value)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Dictionary(IDictionary<string, object>)
Returns an expression to represent a fixed IDictionary<TKey, TValue> value
Declaration
public static IExpression Dictionary(IDictionary<string, object> value)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<string, object> | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Double(double)
Returns an expression to represent a fixed double value
Declaration
public static IExpression Double(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Float(float)
Returns an expression to represent a fixed float value
Declaration
public static IExpression Float(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
FullTextIndex(string)
Returns an expression to represent a full text index to use when performing FTS queries
Declaration
public static IFullTextIndexExpression FullTextIndex(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the index |
Returns
| Type | Description |
|---|---|
| IFullTextIndexExpression | An expression representing the index |
Int(int)
Returns an expression to represent a fixed int value
Declaration
public static IExpression Int(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Long(long)
Returns an expression to represent a fixed long value
Declaration
public static IExpression Long(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Negated(IExpression)
Returns an expression representing the negated result of an expression
Declaration
public static IExpression Negated(IExpression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| IExpression | expression | The expression to evaluate |
Returns
| Type | Description |
|---|---|
| IExpression | The negated result of the expression |
Not(IExpression)
Returns an expression representing the negated result of an expression
Declaration
public static IExpression Not(IExpression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| IExpression | expression | The expression to evaluate |
Returns
| Type | Description |
|---|---|
| IExpression | The negated result of the expression |
Parameter(string)
Gets an expression representing a named parameter (as set in Parameters) for use in a query
Declaration
public static IExpression Parameter(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the parameter in the parameter set |
Returns
| Type | Description |
|---|---|
| IExpression | The expression representing the parameter |
Property(string)
Returns an expression representing the value of a named property
Declaration
public static IPropertyExpression Property(string property)
Parameters
| Type | Name | Description |
|---|---|---|
| string | property | The name of the property to fetch |
Returns
| Type | Description |
|---|---|
| IPropertyExpression | An expression representing the value of a named property |
String(string)
Returns an expression to represent a fixed string value
Declaration
public static IExpression String(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |
Value(object)
Returns an expression to represent a fixed object value. It must be one of the allowed types (i.e. the ones allowed in other methods such as String(string)
Declaration
public static IExpression Value(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The value to use |
Returns
| Type | Description |
|---|---|
| IExpression | An expression representing the fixed value |