Syntax

value.ne(otherValue) → result

Arguments

List of arguments to provide.
otherValue
string | number
required
The value to compare with. The type of the value being compared depends on the value used for comparison.

Optargs

No optional arguments.

Returns

result
boolean
Returns true if the two values are not equal and false otherwise.

Behavior

  • Performs inequality comparison between two values.
  • Uses RuloDB’s equality semantics for type coercion and comparison.
  • Can be chained with other logical operators for complex conditions.

Notes & Caveats

  • Type coercion may occur during comparison depending on the values being compared.
  • Use with appropriate data types to ensure expected comparison behavior.

Example

Filter users excluding specific names

Filter for users where the first name is not “John”.
await r
  .table('users')
  .filter((doc) => doc.first_name.ne('John'))
  .run(client);

Filter orders outside of Europe

Filter for orders where the shipping address continent is not Europe.
await r
  .table('orders')
  .filter((doc) => doc.field('address.continent').ne('Europe'))
  .run(client);
  • eq - Logical Equality Operation
  • lt - Logical Less Than Operation
  • le - Logical Less Than or Equal Operation
  • gt - Logical Greater Than Operation
  • ge - Logical Greater Than or Equal Operation
  • and - Logical AND Operation
  • or - Logical OR Operation
  • not - Logical NOT Operation
  • field - Referencing a Field
  • filter - Filtering Documents

Found a typo? Or maybe a broken link? RuloDB is open-source, help us fix it!