ArangoDB-PHP API Documentation
  • Namespace
  • Class
  • Deprecated

Namespaces

  • triagens
    • ArangoDb

Classes

  • AdminHandler
  • AqlUserFunction
  • Autoloader
  • Batch
  • BatchPart
  • BindVars
  • Collection
  • CollectionHandler
  • Connection
  • ConnectionOptions
  • Cursor
  • Database
  • DefaultValues
  • Document
  • DocumentHandler
  • Edge
  • EdgeDefinition
  • EdgeHandler
  • Endpoint
  • Export
  • ExportCursor
  • Graph
  • GraphHandler
  • Handler
  • HttpHelper
  • HttpResponse
  • QueryCacheHandler
  • QueryHandler
  • Statement
  • TraceRequest
  • TraceResponse
  • Transaction
  • Traversal
  • UpdatePolicy
  • UrlHelper
  • Urls
  • User
  • UserHandler
  • ValueValidator
  • Vertex
  • VertexHandler

Exceptions

  • ClientException
  • ConnectException
  • Exception
  • ServerException

Class Cursor

Provides access to the results of an AQL query or another statement

The cursor might not contain all results in the beginning.

If the result set is too big to be transferred in one go, the cursor might issue additional HTTP requests to fetch the remaining results from the server.

triagens\ArangoDb\Cursor implements Iterator
Namespace: triagens\ArangoDb
Package: triagens\ArangoDb
Since: 0.2
Located at Cursor.php

Methods summary

public
# __construct( triagens\ArangoDb\Connection $connection, array $data, array $options )

Initialise the cursor with the first results and some metadata

Initialise the cursor with the first results and some metadata

Parameters

$connection
  • connection to be used
$data
  • initial result data as returned by the server
$options
  • cursor options

Throws

triagens\ArangoDb\ClientException
public boolean
# delete( )

Explicitly delete the cursor

Explicitly delete the cursor

This might issue an HTTP DELETE request to inform the server about the deletion.

Returns

boolean
  • true if the server acknowledged the deletion request, false otherwise

Throws

triagens\ArangoDb\Exception
public integer
# getCount( )

Get the total number of results in the cursor

Get the total number of results in the cursor

This might issue additional HTTP requests to fetch any outstanding results from the server

Returns

integer
  • total number of results

Throws

triagens\ArangoDb\Exception
public integer
# getFullCount( )

Get the full count of the cursor (ignoring the outermost LIMIT)

Get the full count of the cursor (ignoring the outermost LIMIT)

Returns

integer
  • total number of results
public boolean
# getCached( )

Get the cached attribute for the result set

Get the cached attribute for the result set

Returns

boolean
  • whether or not the query result was served from the AQL query cache
public array
# getAll( )

Get all results as an array

Get all results as an array

This might issue additional HTTP requests to fetch any outstanding results from the server

Returns

array
  • an array of all results

Throws

triagens\ArangoDb\Exception
public
# rewind( )

Rewind the cursor, necessary for Iterator

Rewind the cursor, necessary for Iterator

Implementation of

Iterator::rewind()
public array
# current( )

Return the current result row, necessary for Iterator

Return the current result row, necessary for Iterator

Returns

array
  • the current result row as an assoc array

Implementation of

Iterator::current()
public integer
# key( )

Return the index of the current result row, necessary for Iterator

Return the index of the current result row, necessary for Iterator

Returns

integer
  • the current result row index

Implementation of

Iterator::key()
public
# next( )

Advance the cursor, necessary for Iterator

Advance the cursor, necessary for Iterator

Implementation of

Iterator::next()
public boolean
# valid( )

Check if cursor can be advanced further, necessary for Iterator

Check if cursor can be advanced further, necessary for Iterator

This might issue additional HTTP requests to fetch any outstanding results from the server

Returns

boolean
  • true if the cursor can be advanced further, false if cursor is at end

Throws

triagens\ArangoDb\Exception

Implementation of

Iterator::valid()
public array
# getMetadata( )

Get MetaData of the current cursor

Get MetaData of the current cursor

Returns

array
public array
# getExtra( )

Return the extra data of the query (statistics etc.). Contents of the result array depend on the type of query executed

Return the extra data of the query (statistics etc.). Contents of the result array depend on the type of query executed

Returns

array
public array
# getWarnings( )

Return the warnings issued during query execution

Return the warnings issued during query execution

Returns

array
public integer
# getWritesExecuted( )

Return the number of writes executed by the query

Return the number of writes executed by the query

Returns

integer
public integer
# getWritesIgnored( )

Return the number of ignored write operations from the query

Return the number of ignored write operations from the query

Returns

integer
public integer
# getScannedFull( )

Return the number of documents iterated over in full scans

Return the number of documents iterated over in full scans

Returns

integer
public integer
# getScannedIndex( )

Return the number of documents iterated over in index scans

Return the number of documents iterated over in index scans

Returns

integer
public integer
# getFiltered( )

Return the number of documents filtered by the query

Return the number of documents filtered by the query

Returns

integer
public integer
# getFetches( )

Return the number of HTTP calls that were made to build the cursor result

Return the number of HTTP calls that were made to build the cursor result

Returns

integer
public string
# getId( )

Return the cursor id, if any

Return the cursor id, if any

Returns

string

Constants summary

string ENTRY_ID

result entry for cursor id

result entry for cursor id

# 'id'
string ENTRY_HASMORE

result entry for "hasMore" flag

result entry for "hasMore" flag

# 'hasMore'
string ENTRY_RESULT

result entry for result documents

result entry for result documents

# 'result'
string ENTRY_EXTRA

result entry for extra data

result entry for extra data

# 'extra'
string ENTRY_STATS

result entry for stats

result entry for stats

# 'stats'
string FULL_COUNT

result entry for the full count (ignoring the outermost LIMIT)

result entry for the full count (ignoring the outermost LIMIT)

# 'fullCount'
string ENTRY_CACHE

cache option entry

cache option entry

# 'cache'
string ENTRY_CACHED

cached result attribute - whether or not the result was served from the AQL query cache

cached result attribute - whether or not the result was served from the AQL query cache

# 'cached'
string ENTRY_SANITIZE

sanitize option entry

sanitize option entry

# '_sanitize'
string ENTRY_FLAT

"flat" option entry (will treat the results as a simple array, not documents)

"flat" option entry (will treat the results as a simple array, not documents)

# '_flat'
string ENTRY_TYPE

"objectType" option entry.

"objectType" option entry.

# 'objectType'
string ENTRY_BASEURL

"baseurl" option entry.

"baseurl" option entry.

# 'baseurl'
ArangoDB-PHP API Documentation API documentation generated by ApiGen