node-ottoman
node-ottoman copied to clipboard
Add support for Couchbase ARRAY, FIRST and EXISTS collecion operators
ARRAY learn more The ARRAY operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand expression, that satisfies the WHEN clause, if provided.
FIRST learn more The FIRST operator enables you to map and filter the elements or attributes of a collection, object, or objects. It evaluates to a single element based on the operand expression that satisfies the WHEN clause, if provided.
EXISTS learn more The EXISTS condition is used in combination with a subquery and is considered to be met if the subquery returns at least one result.
ARRAY/FIRST usage:
{
$array|$first: {
$expr: field_expresion,
$for: [{ soruce_expr: { $in|$within: target_expr }}],
$when?: [cond_expr],
as?: alias
}
}
}
EXISTS usage:
{
$exists: target_expr
}