Oihana PHP Arango

isBool.php

Table of Contents

Functions

isBool()  : string
Builds an AQL expression that checks whether a given value is a boolean.

Functions

isBool()

Builds an AQL expression that checks whether a given value is a boolean.

isBool(string $value) : string

This helper wraps the ArangoDB AQL function IS_BOOL() and returns a string representation of that expression.

The AQL function IS_BOOL(value) returns true if the provided value is a boolean (true or false), and false otherwise.

Example output:

IS_BOOL(doc.isActive)
Parameters
$value : string

The AQL field or expression to check (e.g. 'doc.isActive').

Tags
example
use function oihana\arango\db\functions\isBool;

$expr = isBool('doc.isActive');
// Produces: 'IS_BOOL(doc.isActive)'
see
https://docs.arangodb.com/stable/aql/functions/type-check-and-cast/#is_datestring
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression as a string (e.g. 'IS_BOOL(doc.isActive)').

On this page

Search results