DiffReport
The typed result of a declaration ↔ server comparison for one structure object — a collection, the declared indexes of a collection, or an ArangoSearch View ({@see DiffKind}).
Produced by the diff primitives (collectionDiff() / indexesDiff() /
viewDiff()) and returned by their sync counterparts with $applied
set when something was actually created or updated. The model-level
diagnose() / repair() and the doctor command aggregate lists of
these reports.
$changes carries one human-readable line per detected difference
(e.g. places.fields.description : not indexed on the server), empty
when the object is DiffStatus::IN_SYNC.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- inSync() : bool
- Returns true when the object matches its declaration ({@see DiffStatus::IN_SYNC}).
Properties
$applied
public
bool
$applied
= false
$changes
public
array<string|int, mixed>
$changes
= []
$kind
public
string
$kind
= DiffKind::VIEW
$name
public
string
$name
$status
public
string
$status
Methods
__construct()
public
__construct(string $name, string $status[, array<int, string> $changes = [] ][, bool $applied = false ][, string $kind = DiffKind::VIEW ]) : mixed
Parameters
- $name : string
-
The name of the object the report is about (View name, collection name, …).
- $status : string
-
One of the DiffStatus constants.
- $changes : array<int, string> = []
-
One line per difference, error or warning — empty when in sync.
- $applied : bool = false
-
Whether the sync counterpart actually created or updated the object.
- $kind : string = DiffKind::VIEW
-
The kind of object — one of the DiffKind constants.
inSync()
Returns true when the object matches its declaration ({@see DiffStatus::IN_SYNC}).
public
inSync() : bool