Operators

Performing operations on documents in a query


An operator in MerlinDB is a
  • keyword or symbol used in queries to specify conditions or perform operations on documents.


    $eq (Access): Compares values ​​in a query in the collection;
    $gt (Access): Finds documents where the value of a field is greater than the specified value;
    $gte (Access): Finds documents where the value of a field is greater than or equal to the specified value;
    $in (Access): Checks whether the value of a field is present in the query;
    $lt (Access): Finds documents where the value of a field is less than the specified value;
    $lte (Access): Finds documents where the value of a field is less than or equal to the specified value;
    $ne (Access): Finds documents where the value of a field is not equal to the specified value;
    $nin (Access): Finds documents where the value of a field is not in a specified set of values;
    $and (Access): Combines multiple conditions into a single logical query;
    $not (Access): Performs logical negation in a query expression;
    $nor (Access): Finds documents that do not match all specified conditions;
    $or (Access): Finds documents that match at least one of the conditions;
    $regex (Access): Finds documents that match the regular expression (RegExp);
    $exists (Access): Checks whether a field exists or not in a document;
    $type (Access): Selects documents where the value of a field is of a specific BSON type;
    $mod (Access): Checks whether the value of a field divided by a divisor has a specific remainder;
    $text (Access): Performs textual searches in specific text fields;
    $where (Access): Executes JavaScript code to select documents;
    $all (Access): Selects documents where an array field contains all the specified elements;
    $size (Access): Selects documents where the array field has a specific number of elements;
    $set (Access): Updates values ​​of a field in a document;
    $inc (Access): Increments (or decrements) the value of a numeric field in a document;
    $order (Access): Ensures that documents are inserted in order;