Oihana PHP Arango

decodeRev.php

Table of Contents

Functions

decodeRev()  : string
Decompose the specified revision string into its components. The resulting object has a date and a count attribute. This function is supposed to be called with the _rev attribute value of a database document as argument.

Functions

decodeRev()

Decompose the specified revision string into its components. The resulting object has a date and a count attribute. This function is supposed to be called with the _rev attribute value of a database document as argument.

decodeRev(string|null $value) : string

revision (string): revision ID string returns details (object|null): object with two attributes date (string in ISO 8601 format) and count (integer number), or null If the input revision ID is not a string or cannot be processed, the function issues a warning and returns null.

Parameters
$value : string|null
Tags
example
use function oihana\arango\db\functions\decodeRev;

$expr = decodeRev( '"_YU0HOEG---"' );
// Produces: 'DECODE_REV("_YU0HOEG---")'
see
https://docs.arangodb.com/stable/aql/functions/miscellaneous/#decode_rev
since
1.0.0

author Marc Alcaraz

Return values
string

The formatted AQL expression (e.g. 'DECODE_REV(user.email)').

On this page

Search results