Oihana PHP Arango

logicalNot.php

Table of Contents

Functions

logicalNot()  : string
Returns an AQL expression that negates a predicate using the logical NOT operator (!).

Functions

logicalNot()

Returns an AQL expression that negates a predicate using the logical NOT operator (!).

logicalNot(mixed $expression[, bool $useParentheses = false ][, bool $trim = false ]) : string

This function mirrors the LogicalTrait::not() method with a standalone functional API.

Example semantics:

  • !(a == 2) when parentheses are requested
  • !a == 2 when parentheses are not requested
Parameters
$expression : mixed

The expression or predicate to negate.

$useParentheses : bool = false

If true, wrap the expression in parentheses.

$trim : bool = false

Whether to trim existing $left/$right characters (default: false).

Tags
example

echo logicalNot('a == 2'); // !a == 2

echo logicalNot('a == 2', true); // !(a == 2)

see
https://docs.arangodb.com/stable/aql/operators/#logical-operators
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL predicate string.

On this page

Search results