Oihana PHP Arango

Arango extends AQL uses ControllerParamTrait, ModelParamTrait

Central enumeration of ArangoDB-related parameters used throughout aql, controllers, models, and pagination contexts.

Provides typed constants for common parameters such as 'doc', 'model', 'collection', 'queryFields', 'active', 'insert', 'update', etc.

Traits used:

  • ControllerParamTrait : adds controller-related parameter utilities.
  • ModelParamTrait : adds model-related parameter utilities.
  • PaginationTrait : adds pagination-related constants.
  • ConstantsTrait : adds helper methods for constants introspection.

Example usage:

$param = Arango::DOC;

Table of Contents

Constants

_DEPTH  : string = '_depth'
_PARENT  : string = '_parent'
ACTIVABLE  : string = 'activable'
The 'activable' parameter.
AFTER_WRITE  : string = 'afterWrite'
The 'afterWrite' parameter — set on the init of the read a controller runs **after** a write, to hand back the document through the projection.
AGGREGATABLE  : string = 'aggregatable'
The 'aggregatable' parameter — the optional whitelist/mapping of aggregatable fields (`urlKey => fieldPath`) consumed by {@see \oihana\arango\models\traits\aql\GroupTrait::$aggregatable}.
AGGREGATABLE_POLICY  : string = 'aggregatablePolicy'
The 'aggregatablePolicy' parameter — what happens to an aggregate whose field is absent from {@see AQL::AGGREGATABLE}. One of the {@see \oihana\arango\models\enums\AggregatablePolicy} codes.
AGGREGATE  : string = 'aggregate'
ALTER  : string = 'alter'
The 'alter' parameter.
ALTERS  : string = 'alters'
ANALYZER  : string = 'analyzer'
ANY_REF  : string = 'anyRef'
ARRAY  : string = 'array'
ARRAYS  : string = 'arrays'
ASSIGN  : string = 'assign'
AUTHORIZER  : string = 'authorizer'
The 'authorizer' parameter.
BIND_COLLECTION  : string = '@collection'
BINDER  : string = 'binder'
The 'binder' parameter — a `callable(mixed $value): string` that registers a value in the query's bind map and returns its `@name` token.
BINDS  : string = 'binds'
BOTH  : string = 'both'
BOUNDS  : string = 'bounds'
CACHEABLE  : string = 'cacheable'
The 'cacheable' parameter.
CHILDREN  : string = 'children'
COLLECT  : string = 'collect'
The 'collect' parameter — holds an AQL `COLLECT` (grouping/aggregation) spec forwarded to {@see aqlCollect()}.
COLLECTION  : string = 'collection'
COMPRESS  : string = 'compress'
The 'compress' parameter.
CONDITIONS  : string = 'conditions'
CONTEXT  : string = 'context'
COUNT  : string = 'count'
COUNTER  : string = 'counter'
The 'counter' parameter.
DATABASE  : string = 'database'
DATE_FIELD  : string = 'dateField'
The 'dateField' parameter.
DEFAULT  : string = 'default'
DEFAULT_LANG  : string = 'defaultLang'
The 'defaultLang' parameter — the fallback language of multilingual expressions.
DIRECTION  : string = 'direction'
DISCRIMINATOR  : string = 'discriminator'
DOC  : string = 'doc'
DOC_JOIN  : string = 'doc_join'
DOC_PREFIX  : string = 'doc_'
DOC_REF  : string = 'docRef'
DOCUMENT  : string = 'document'
DOCUMENTS  : string = 'documents'
The 'documents' parameter.
EDGE  : string = 'edge'
EDGE_COLLECTION  : string = 'edgeCollection'
EDGE_REF  : string = 'edgeRef'
EDGES  : string = 'edges'
ERASE_NULL  : string = 'eraseNull'
The 'eraseNull' flag of an in-place element edit — when truthy, the nulls a patch carries are read as **erasures** instead of values.
EXCLUDES  : string = 'excludes'
EXIST  : string = 'exist'
The 'exist' parameter.
EXPRESSION  : string = 'expression'
EXTRA_QUERY  : string = 'extraQuery'
The 'extraQuery' parameter.
FACET_COUNTS  : string = 'facetCounts'
The 'facetCounts' parameter — the list of facet keys (from `Arango::FACETS`) for which per-value bucket counts are computed alongside the list, by {@see FacetCountsQueryTrait::buildFacetCountsQuery()}.
FACET_COUNTS_LIMIT  : string = 'facetCountsLimit'
The 'facetCountsLimit' parameter — the per-request number of buckets each requested dimension keeps, overriding the `Facet::LIMIT` declared on the facet (which is a **default**, not a ceiling).
FACETS  : string = 'facets'
FACETS_ONLY  : string = 'facetsOnly'
The 'facetsOnly' flag — when truthy (and `Arango::FACET_COUNTS` is requested), the document-fetch query is skipped: the list returns an empty result set while the per-value facet counts (and an exact `total` computed by {@see DocumentsCountTrait::count()}) are still returned. Useful for a faceted-search sidebar that only needs the counts, not the documents.
FALLBACK  : string = 'fallback'
FIELD  : string = 'field'
FIELDS  : string = 'fields'
FILTER  : string = 'filter'
FILTERS  : string = 'filters'
FIRST  : string = 'first'
FOLLOWING  : string = 'following'
FROM  : string = 'from'
GRAPH  : string = 'graph'
GRAPH_DEFAULT  : string = 'vertex, edge, path'
GROUP  : string = 'group'
The 'group' parameter — holds a high-level grouping spec ({@see Group}) translated into an AQL `COLLECT` by {@see GroupTrait::prepareCollect()}.
GROUPABLE  : string = 'groupable'
The 'groupable' parameter — the optional whitelist/mapping of groupable dimensions (`urlKey => fieldPath`) consumed by {@see GroupTrait::$groupable}.
HYDRATION  : string = 'hydration'
ID  : string = 'id'
IN  : string = 'in'
INDEXES  : string = 'indexes'
INIT  : string = 'init'
The 'init' parameter.
INSERT  : string = 'insert'
INTO  : string = 'into'
INVALIDATES  : string = 'invalidates'
Container ids of the {@see \oihana\interfaces\Invalidable} services whose cached state this collection feeds. They are invalidated on every write.
IS_ARRAY  : string = 'isArray'
ITEM  : string = 'item'
ITEM_KEY  : string = 'itemKey'
The 'itemKey' parameter — the attribute carried by each element of an embedded array field, used to target a single element by identity instead of by value.
JOIN  : string = 'join'
JOINS  : string = 'joins'
KEEP  : string = 'keep'
KEEP_NULL  : string = 'keepNull'
The 'keepNull' payload marker. When a payload field definition carries `Arango::KEEP_NULL => true`, an explicit null the client sent for that field survives the compress pass (see PayloadsTrait::preparePayload), so a PATCH can clear a value with `{ "field": null }`.
KEY  : string = 'key'
KEY_LIST  : string = 'keyList'
The 'keyList' parameter.
LAZY  : string = 'lazy'
LEAF  : string = 'leaf'
LENGTH  : string = 'length'
MAP  : string = 'map'
MATCH  : string = 'match'
The 'match' parameter.
MAX_DEPTH  : string = 'maxDepth'
META_ONLY  : string = 'metaOnly'
The 'metaOnly' flag — when truthy, the document-fetch query is skipped: the list returns an empty result set while the response *metadata* (an exact `total` from {@see DocumentsCountTrait::count()}, plus the requested facet counts and numeric bounds) is still computed.
METHOD  : string = 'method'
MIN_DEPTH  : string = 'minDepth'
MOCK  : string = 'mock'
MODE  : string = 'mode'
The 'mode' parameter.
MODEL  : string = 'model'
MODEL_ID  : string = 'modelID'
The 'modelID' parameter.
NAME  : string = 'name'
NEAR  : string = 'near'
The 'near' parameter — a geospatial anchor for distance sorting.
NESTED  : string = 'nested'
NULL  : string = 'null'
NUM  : string = 'num'
The 'num' parameter.
OMIT_WHEN  : string = 'omitWhen'
The 'omitWhen' parameter — the predicates deciding which **attributes of the payload are dropped before a write**, consumed by {@see \oihana\arango\models\traits\aql\PrepareDocumentTrait::prepareDocumentClause()} on `insert`, `update`, `replace` and `upsert`.
OPERATION  : string = 'operation'
The 'operation' parameter — what the controller is about to ask the model, named after the model call rather than after the HTTP verb.
OPERATOR  : string = 'operator'
OPTIONS  : string = 'options'
ORDER  : string = 'order'
PATCH  : string = 'patch'
The 'patch' parameter — the partial object merged into the array element targeted by {@see Arango::ITEM_KEY}, consumed by {@see DocumentsArrayTrait::arrayUpdate()}.
PATH  : string = 'path'
PATH_REF  : string = 'pathRef'
POSITION  : string = 'position'
The 'position' parameter.
POSITION_KEY  : string = 'positionKey'
The 'positionKey' parameter — the attribute of each element of an embedded array field that carries its **rank**, kept in sync with the element order.
PRECEDING  : string = 'preceding'
PREFIX  : string = 'prefix'
PROFILE  : string = 'profile'
The 'profile' parameter — when truthy, `list()` / `get()` run the query in profiled mode (`true` → profile level 2) and the measurements are exposed through {@see ArangoTrait::getProfile()}.
PROJECTION  : string = 'projection'
PROPERTY  : string = 'property'
PRUNE  : string = 'prune'
PURGE  : string = 'purge'
QUERY_ID  : string = 'queryId'
RANGE_VALUE  : string = 'rangeValue'
RAW  : string = 'raw'
RAW_KEYS  : string = 'rawKeys'
RAW_VALUES  : string = 'rawValues'
RELATION  : string = 'relation'
RELATIONS  : string = 'relations'
The 'relations' parameter.
REMOVE_KEYS  : string = 'removeKeys'
The 'removeKeys' parameter.
REPLACE  : string = 'replace'
REQUIRES  : string = 'requires'
RESOLVE  : string = '__resolve__'
RESULT  : string = 'result'
RETURN  : string = 'return'
ROUTE  : string = 'route'
The 'route' parameter.
SCHEMA  : string = 'schema'
SEARCH  : string = 'search'
SEARCH_OPTIONS  : string = 'searchOptions'
SEARCHABLE  : string = 'searchable'
SIDE  : string = 'side'
The 'side' parameter.
SKIN  : string = 'skin'
SKIN_FIELDS  : string = 'skinFields'
SKIP  : string = 'skip'
The 'skip' parameter.
SORT  : string = 'sort'
SORT_DEFAULT  : string = 'sortDefault'
SORT_TIEBREAK  : string = 'sortTiebreak'
SORTABLE  : string = 'sortable'
SOURCE  : string = 'source'
START_VERTEX  : string = 'startVertex'
TARGET  : string = 'target'
TO  : string = 'to'
TOUCH  : string = 'touch'
The 'touch' parameter — whether a write refreshes the housekeeping dates.
TYPE  : string = 'type'
UNIQUE  : string = 'unique'
UPDATE  : string = 'update'
USE_SPACE  : string = 'useSpace'
VALUE  : string = 'value'
VALUES  : string = 'values'
VAR_COLLECTION  : string = '@@collection'
VAR_NAME  : string = 'varName'
The 'varName' parameter.
VARIABLES  : string = 'variables'
The 'variables' parameter.
VERTEX  : string = 'vertex'
VERTEX_REF  : string = 'vertexRef'
VERTICES  : string = 'vertices'
VIEW  : string = 'view'
WHERE  : string = 'where'
WITH  : string = 'with'
WITH_COUNT  : string = 'withCount'
WITH_PATH  : string = 'withPath'

Constants

_DEPTH

public string _DEPTH = '_depth'

_PARENT

public string _PARENT = '_parent'

ACTIVABLE

The 'activable' parameter.

public string ACTIVABLE = 'activable'

AFTER_WRITE

The 'afterWrite' parameter — set on the init of the read a controller runs **after** a write, to hand back the document through the projection.

public string AFTER_WRITE = 'afterWrite'

That read is an ordinary get, and it says so through Arango::OPERATION: a hook posing a scope on every read must scope this one too, so the reload cannot become the one door that skips it. This flag is what a hook adds when it wants to tell the two apart — an audit trail that must not log the reload twice, a cache that must not be warmed from it.

Tags
see
ModelOperation

AGGREGATABLE

The 'aggregatable' parameter — the optional whitelist/mapping of aggregatable fields (`urlKey => fieldPath`) consumed by {@see \oihana\arango\models\traits\aql\GroupTrait::$aggregatable}.

public string AGGREGATABLE = 'aggregatable'

It is the agg counterpart of AQL::GROUPABLE, but it keys on the field token, not on the output name: in [ 'total' => 'sum:speed' ] the output name total is chosen freely by the client, while speed is what the whitelist resolves (to speed.value, say). Accepts the three normalizeSortable() notations.

Absent (null), every projected path stays aggregatable — the historical behaviour. Declaring it closes the gate; AQL::AGGREGATABLE_POLICY chooses what happens to an undeclared aggregate.

AGGREGATABLE_POLICY

The 'aggregatablePolicy' parameter — what happens to an aggregate whose field is absent from {@see AQL::AGGREGATABLE}. One of the {@see \oihana\arango\models\enums\AggregatablePolicy} codes.

public string AGGREGATABLE_POLICY = 'aggregatablePolicy'

Defaults to AggregatablePolicy::DROP when a whitelist is declared, and to AggregatablePolicy::OPEN when none is.

AGGREGATE

public string AGGREGATE = 'aggregate'

ALTER

The 'alter' parameter.

public string ALTER = 'alter'

ALTERS

public string ALTERS = 'alters'

ANALYZER

public string ANALYZER = 'analyzer'

ANY_REF

public string ANY_REF = 'anyRef'

ARRAY

public string ARRAY = 'array'

ARRAYS

public string ARRAYS = 'arrays'

ASSIGN

public string ASSIGN = 'assign'

AUTHORIZER

The 'authorizer' parameter.

public string AUTHORIZER = 'authorizer'

Optional Closure(string $subject): bool injected through $init so AQL projection helpers can gate fields on permission subjects via Field::REQUIRES without introducing a hard dependency on a specific authorization backend (Casbin, opa, custom, ...).

BIND_COLLECTION

public string BIND_COLLECTION = '@collection'

BINDER

The 'binder' parameter — a `callable(mixed $value): string` that registers a value in the query's bind map and returns its `@name` token.

public string BINDER = 'binder'

Carried through $init down to FilterFunction::apply(), where it turns the parameters of a request-supplied alt chain into bound values instead of text pasted into the query. alterExpression() only lets it through for a chain marked as request-supplied (AltChain); a model declaration never sees it.

BINDS

public string BINDS = 'binds'

BOTH

public string BOTH = 'both'

BOUNDS

public string BOUNDS = 'bounds'

CACHEABLE

The 'cacheable' parameter.

public string CACHEABLE = 'cacheable'

CHILDREN

public string CHILDREN = 'children'

COLLECT

The 'collect' parameter — holds an AQL `COLLECT` (grouping/aggregation) spec forwarded to {@see aqlCollect()}.

public string COLLECT = 'collect'

COLLECTION

public string COLLECTION = 'collection'

COMPRESS

The 'compress' parameter.

public string COMPRESS = 'compress'

CONDITIONS

public string CONDITIONS = 'conditions'

CONTEXT

public string CONTEXT = 'context'

COUNT

public string COUNT = 'count'

COUNTER

The 'counter' parameter.

public string COUNTER = 'counter'

Name of the sibling field holding the length of an embedded array, kept in sync (LENGTH(...)) on every mutation by DocumentsArrayTrait.

DATABASE

public string DATABASE = 'database'

DATE_FIELD

The 'dateField' parameter.

public string DATE_FIELD = 'dateField'

DEFAULT

public string DEFAULT = 'default'

DEFAULT_LANG

The 'defaultLang' parameter — the fallback language of multilingual expressions.

public string DEFAULT_LANG = 'defaultLang'

⚠ Distinct from Arango::LANG, the language requested by the current call: LANG is an instruction and wins over everything, DEFAULT_LANG is a default and never overrides an explicit declaration.

DIRECTION

public string DIRECTION = 'direction'

DISCRIMINATOR

public string DISCRIMINATOR = 'discriminator'

DOC

public string DOC = 'doc'

DOC_JOIN

public string DOC_JOIN = 'doc_join'

DOC_PREFIX

public string DOC_PREFIX = 'doc_'

DOC_REF

public string DOC_REF = 'docRef'

DOCUMENT

public string DOCUMENT = 'document'

DOCUMENTS

The 'documents' parameter.

public string DOCUMENTS = 'documents'

EDGE

public string EDGE = 'edge'

EDGE_COLLECTION

public string EDGE_COLLECTION = 'edgeCollection'

EDGE_REF

public string EDGE_REF = 'edgeRef'

EDGES

public string EDGES = 'edges'

ERASE_NULL

The 'eraseNull' flag of an in-place element edit — when truthy, the nulls a patch carries are read as **erasures** instead of values.

public string ERASE_NULL = 'eraseNull'

AQL MERGE() keeps a null: { "reason": null } writes the attribute back as null rather than taking it away, so an element rebuilt in place could never lose an attribute it once carried. Set on DocumentsArrayTrait::arrayUpdate(), this flag wraps the merged element in an UNSET() of those keys — top-level attributes only, like UNSET() itself.

⚠️ Not to be confused with Arango::KEEP_NULL, nor with the keepNull of Arango::OPTIONS. The first is a payload marker, saying whether a null a client sent survives the compress pass; the second is an ArangoDB server option, deciding what the document-level UPDATE does with a null attribute. This one operates in between the two, on the elements of an embedded array — a place neither of them reaches.

Opt-in: absent, an element keeps every attribute it carries.

EXCLUDES

public string EXCLUDES = 'excludes'

EXIST

The 'exist' parameter.

public string EXIST = 'exist'

EXPRESSION

public string EXPRESSION = 'expression'

EXTRA_QUERY

The 'extraQuery' parameter.

public string EXTRA_QUERY = 'extraQuery'

FACET_COUNTS

The 'facetCounts' parameter — the list of facet keys (from `Arango::FACETS`) for which per-value bucket counts are computed alongside the list, by {@see FacetCountsQueryTrait::buildFacetCountsQuery()}.

public string FACET_COUNTS = 'facetCounts'

FACET_COUNTS_LIMIT

The 'facetCountsLimit' parameter — the per-request number of buckets each requested dimension keeps, overriding the `Facet::LIMIT` declared on the facet (which is a **default**, not a ceiling).

public string FACET_COUNTS_LIMIT = 'facetCountsLimit'

Three states, deliberately distinct:

  • absent → the declaration decides (all the buckets when it declares nothing);
  • a positive integer → keep that many, whether it raises or lowers the declared value;
  • false → explicitly unlimited, cancelling a declared limit. This is what PrepareFacetCountsLimitTrait::prepareFacetCountsLimit() translates the ?facetCountsLimit=all keyword into.

0 is refused rather than read as "unlimited": it would say the opposite of what it means — see FacetCountsQueryTrait.

FACETS

public string FACETS = 'facets'

FACETS_ONLY

The 'facetsOnly' flag — when truthy (and `Arango::FACET_COUNTS` is requested), the document-fetch query is skipped: the list returns an empty result set while the per-value facet counts (and an exact `total` computed by {@see DocumentsCountTrait::count()}) are still returned. Useful for a faceted-search sidebar that only needs the counts, not the documents.

public string FACETS_ONLY = 'facetsOnly'

FALLBACK

public string FALLBACK = 'fallback'

FIELD

public string FIELD = 'field'

FIELDS

public string FIELDS = 'fields'

FILTER

public string FILTER = 'filter'

FILTERS

public string FILTERS = 'filters'

FIRST

public string FIRST = 'first'

FOLLOWING

public string FOLLOWING = 'following'

FROM

public string FROM = 'from'

GRAPH

public string GRAPH = 'graph'

GRAPH_DEFAULT

public string GRAPH_DEFAULT = 'vertex, edge, path'

GROUP

The 'group' parameter — holds a high-level grouping spec ({@see Group}) translated into an AQL `COLLECT` by {@see GroupTrait::prepareCollect()}.

public string GROUP = 'group'

GROUPABLE

The 'groupable' parameter — the optional whitelist/mapping of groupable dimensions (`urlKey => fieldPath`) consumed by {@see GroupTrait::$groupable}.

public string GROUPABLE = 'groupable'

HYDRATION

public string HYDRATION = 'hydration'

ID

public string ID = 'id'

IN

public string IN = 'in'

INDEXES

public string INDEXES = 'indexes'

INIT

The 'init' parameter.

public string INIT = 'init'

INSERT

public string INSERT = 'insert'

INTO

public string INTO = 'into'

INVALIDATES

Container ids of the {@see \oihana\interfaces\Invalidable} services whose cached state this collection feeds. They are invalidated on every write.

public string INVALIDATES = 'invalidates'

IS_ARRAY

public string IS_ARRAY = 'isArray'

ITEM

public string ITEM = 'item'

ITEM_KEY

The 'itemKey' parameter — the attribute carried by each element of an embedded array field, used to target a single element by identity instead of by value.

public string ITEM_KEY = 'itemKey'

Declared per field in the AQL::ARRAYS option ('tracks' => [ ArrayMode::LIST , Arango::ITEM_KEY => 'id' ]), it switches the element-level operations of DocumentsArrayTrait from structural equality (REMOVE_VALUE(doc.tracks, @value)) to a key match (doc.tracks[* FILTER CURRENT.id != @value]), and enables arrayUpdate().

When absent, every array operation keeps its by-value behaviour.

Unlike Arango::KEY — which identifies the document — this identifies an element inside one of its array fields.

JOIN

public string JOIN = 'join'

JOINS

public string JOINS = 'joins'

KEEP

public string KEEP = 'keep'

KEEP_NULL

The 'keepNull' payload marker. When a payload field definition carries `Arango::KEEP_NULL => true`, an explicit null the client sent for that field survives the compress pass (see PayloadsTrait::preparePayload), so a PATCH can clear a value with `{ "field": null }`.

public string KEEP_NULL = 'keepNull'

KEY

public string KEY = 'key'

KEY_LIST

The 'keyList' parameter.

public string KEY_LIST = 'keyList'

LAZY

public string LAZY = 'lazy'

LEAF

public string LEAF = 'leaf'

LENGTH

public string LENGTH = 'length'

MAP

public string MAP = 'map'

MATCH

The 'match' parameter.

public string MATCH = 'match'

MAX_DEPTH

public string MAX_DEPTH = 'maxDepth'

META_ONLY

The 'metaOnly' flag — when truthy, the document-fetch query is skipped: the list returns an empty result set while the response *metadata* (an exact `total` from {@see DocumentsCountTrait::count()}, plus the requested facet counts and numeric bounds) is still computed.

public string META_ONLY = 'metaOnly'

The generic "give me the sidebar, not the documents" mode, spanning facet counts and bounds alike. Supersedes the counts-only Arango::FACETS_ONLY.

METHOD

public string METHOD = 'method'

MIN_DEPTH

public string MIN_DEPTH = 'minDepth'

MOCK

public string MOCK = 'mock'

MODE

The 'mode' parameter.

public string MODE = 'mode'

Optional per-call override of an embedded array field's ArrayMode.

MODEL

public string MODEL = 'model'

MODEL_ID

The 'modelID' parameter.

public string MODEL_ID = 'modelID'

NAME

public string NAME = 'name'

NEAR

The 'near' parameter — a geospatial anchor for distance sorting.

public string NEAR = 'near'

Holds a { key, latitude, longitude } object: the document attribute to measure from (key) plus the reference point. It exposes the synthetic distance sort key consumed by SortTrait::prepareSort().

NESTED

public string NESTED = 'nested'

NULL

public string NULL = 'null'

NUM

The 'num' parameter.

public string NUM = 'num'

OMIT_WHEN

The 'omitWhen' parameter — the predicates deciding which **attributes of the payload are dropped before a write**, consumed by {@see \oihana\arango\models\traits\aql\PrepareDocumentTrait::prepareDocumentClause()} on `insert`, `update`, `replace` and `upsert`.

public string OMIT_WHEN = 'omitWhen'

Each entry is a callable( mixed $value , string $key = ) : bool answering "do I drop this attribute?". Omitting the key entirely applies the default — fn( $value ) => is_null( $value ), which is what keeps a PATCH carrying only some fields from overwriting the others with null. Passing [] disables the compression, so every attribute is written as submitted.

$model->update
([
    Arango::VALUE     => 'k1' ,
    Arango::DOC       => [ 'name' => 'Marc' , 'nickname' => null ] ,
    Arango::OMIT_WHEN => [ fn( $value ) => $value === null || $value === '' ] ,
]) ;

It replaces Arango::CONDITIONS on the write path. That key now means one thing everywhere — AQL predicate strings appended to the query's FILTER, on the reads, on delete(), and on update() / replace() too. Carrying two meanings under one name meant a cross-cutting hook posing a scope on every model call answered All conditions in the array must be callable on the writes; posing one now scopes them.

CONDITIONS is still honoured here when it carries callables, with a deprecation logged, until the next release removes that fallback. A mixed array is split rather than refused: the callables compress the payload, the strings go to the FILTER.

OPERATION

The 'operation' parameter — what the controller is about to ask the model, named after the model call rather than after the HTTP verb.

public string OPERATION = 'operation'

The two lifecycle hooks (ModelCallTrait::beforeModelCall() and ModelCallTrait::afterModelCall()) are shared by every verb, and one HTTP request runs several model calls through them: a PATCH reaches beforeModelCall() three times — the existence probe, the write, then the read that hands the document back. getMethod() answers PATCH to all three, and two of the three carry the same init keys, so nothing in the signature told the hook which one it was serving. Consumers were left sniffing the shape of $init — an undocumented convention that goes wrong in silence the day a call site composes its init differently.

Posed at the construction of the init, so both hooks see it: the array is built once, handed to the first hook by reference, to the model, then to the second.

⚠ It names the operation the caller asked for, not each round trip to the database: list() and delete() deliberately run their probe or their counts under the same init, and therefore under a single announcement.

⚠ Not to be confused with Arango::EXIST, an init key stating that existence was already checked, where exist here is a value.

Tags
see
ModelOperation

The vocabulary of its values.

Arango::AFTER_WRITE

Which read follows a write.

OPERATOR

public string OPERATOR = 'operator'

OPTIONS

public string OPTIONS = 'options'

ORDER

public string ORDER = 'order'

PATCH

The 'patch' parameter — the partial object merged into the array element targeted by {@see Arango::ITEM_KEY}, consumed by {@see DocumentsArrayTrait::arrayUpdate()}.

public string PATCH = 'patch'

The merge is shallow (MERGE(CURRENT, @patch)): the attributes it carries are overwritten, the others are left untouched.

PATH

public string PATH = 'path'

PATH_REF

public string PATH_REF = 'pathRef'

POSITION

The 'position' parameter.

public string POSITION = 'position'

POSITION_KEY

The 'positionKey' parameter — the attribute of each element of an embedded array field that carries its **rank**, kept in sync with the element order.

public string POSITION_KEY = 'positionKey'

Declared per field in the AQL::ARRAYS option ('lines' => [ ArrayMode::LIST , Arango::ITEM_KEY => 'id' , Arango::POSITION_KEY => 'position' ]), it makes every write of DocumentsArrayTrait renumber the whole array from its indices — so an element moved by drag and drop never leaves a stale rank behind.

The numbering is zero-based, and the attribute must be a flat name (a nested path could not be written back). When absent, no element is ever renumbered.

Unlike Arango::POSITION — the target index of a single move — this names an attribute of the elements themselves.

PRECEDING

public string PRECEDING = 'preceding'

PREFIX

public string PREFIX = 'prefix'

PROFILE

The 'profile' parameter — when truthy, `list()` / `get()` run the query in profiled mode (`true` → profile level 2) and the measurements are exposed through {@see ArangoTrait::getProfile()}.

public string PROFILE = 'profile'

PROJECTION

public string PROJECTION = 'projection'

PROPERTY

public string PROPERTY = 'property'

PRUNE

public string PRUNE = 'prune'

PURGE

public string PURGE = 'purge'

QUERY_ID

public string QUERY_ID = 'queryId'

RANGE_VALUE

public string RANGE_VALUE = 'rangeValue'

RAW

public string RAW = 'raw'

RAW_KEYS

public string RAW_KEYS = 'rawKeys'

RAW_VALUES

public string RAW_VALUES = 'rawValues'

RELATION

public string RELATION = 'relation'

RELATIONS

The 'relations' parameter.

public string RELATIONS = 'relations'

REMOVE_KEYS

The 'removeKeys' parameter.

public string REMOVE_KEYS = 'removeKeys'

REPLACE

public string REPLACE = 'replace'

REQUIRES

public string REQUIRES = 'requires'

RESOLVE

public string RESOLVE = '__resolve__'

RESULT

public string RESULT = 'result'

RETURN

public string RETURN = 'return'

ROUTE

The 'route' parameter.

public string ROUTE = 'route'

SCHEMA

public string SCHEMA = 'schema'
public string SEARCH = 'search'

SEARCH_OPTIONS

public string SEARCH_OPTIONS = 'searchOptions'

SEARCHABLE

public string SEARCHABLE = 'searchable'

SIDE

The 'side' parameter.

public string SIDE = 'side'

SKIN

public string SKIN = 'skin'

SKIN_FIELDS

public string SKIN_FIELDS = 'skinFields'

SKIP

The 'skip' parameter.

public string SKIP = 'skip'

SORT

public string SORT = 'sort'

SORT_DEFAULT

public string SORT_DEFAULT = 'sortDefault'

SORT_TIEBREAK

public string SORT_TIEBREAK = 'sortTiebreak'

SORTABLE

public string SORTABLE = 'sortable'

SOURCE

public string SOURCE = 'source'

START_VERTEX

public string START_VERTEX = 'startVertex'

TARGET

public string TARGET = 'target'

TO

public string TO = 'to'

TOUCH

The 'touch' parameter — whether a write refreshes the housekeeping dates.

public string TOUCH = 'touch'

Defaults to true : every write stamps modified with the moment of the write, and an insert stamps created with it too. Passing false makes the write carry its own dates — nothing is stamped, and the document is stored exactly as submitted. That is what a replication or an import needs : a record copied from another system is not modified by being copied, and its dates belong to the source.

$model->repsert
([
    Arango::FILTER  => $filter ,
    Arango::INSERT  => [ ...$document , 'created' => '2024-05-12' , 'modified' => '2025-11-03' ] ,
    Arango::REPLACE => [ ...$document , 'created' => '2024-05-12' , 'modified' => '2025-11-03' ] ,
    Arango::TOUCH   => false ,
]) ;

Honoured by the upsert family (upsert() / repsert(), via UpsertQueryTrait), by the array verbs (DocumentsArrayTrait) and by updateEdgeRelation() (where it defaults to false). insert() / update() / replace() keep stamping unconditionally.

TYPE

public string TYPE = 'type'

UNIQUE

public string UNIQUE = 'unique'

UPDATE

public string UPDATE = 'update'

USE_SPACE

public string USE_SPACE = 'useSpace'

VALUE

public string VALUE = 'value'

VALUES

public string VALUES = 'values'

VAR_COLLECTION

public string VAR_COLLECTION = '@@collection'

VAR_NAME

The 'varName' parameter.

public string VAR_NAME = 'varName'

VARIABLES

The 'variables' parameter.

public string VARIABLES = 'variables'

VERTEX

public string VERTEX = 'vertex'

VERTEX_REF

public string VERTEX_REF = 'vertexRef'

VERTICES

public string VERTICES = 'vertices'

VIEW

public string VIEW = 'view'

WHERE

public string WHERE = 'where'

WITH

public string WITH = 'with'

WITH_COUNT

public string WITH_COUNT = 'withCount'

WITH_PATH

public string WITH_PATH = 'withPath'
On this page

Search results