Arango PHP ODM

TraversalCursor extends Cursor
in package

Represents an ArangoDB cursor for a Traversal query

Tags
author

Lucas S. Vieira

Table of Contents

Constants

BASE_URL  = 'baseurl'
Cursor baseUrl entry
CACHE  = 'cache'
Cursor cache entry
CACHED  = 'cached'
Cursor cached entry
COUNT  = 'count'
Cursor count entry
EXTRA  = 'extra'
Cursor extra entry
FULL_COUNT  = 'fullCount'
Cursor fullCount entry
HAS_MORE  = 'hasMore'
'hasMore' flag
ID  = 'id'
Cursor ID entry
RESULT  = 'result'
Cursor result entry
SANITIZE  = '_sanitize'
Cursor sanitize option
STATS  = 'stats'
Cursor stats entry
TYPE  = 'objectType'
Cursor type entry

Properties

$cached  : bool
If the result query was served from cached results
$connection  : Connection
Connection object
$count  : int
Number of documents in cursor,
$data  : ArrayList
Result data
$defaultOptions  : array<string|int, mixed>
Default options query for the cursor.<br> <b>count</b>, <b>batchSize</b> and <b>options</b> are, by default, leaved for the server defaults.
$extra  : array<string|int, mixed>
Extra data (stats)
$fetches  : int
Number of HTTP calls made to build the cursor
$fullCount  : int
Full cont of the result set
$hasMore  : bool
'hasMore' indicator
$id  : mixed
Cursor id
$length  : int
Total length of current set
$options  : array<string|int, mixed>
Cursor Options
$position  : int
Current position
$result  : ArrayList
Result set
$statement  : StatementInterface
Statement to execute.
$uri  : string
URI to manage the cursor.

Methods

__construct()  : mixed
Cursor constructor.
__toString()  : string
Return a string representation of document.
count()  : int
current()  : Edge|Vertex|Path
May return a path, a edge or a vertex. This is defined on statement.
delete()  : bool
Deletes the cursor and frees the resources associated with it.
fetch()  : void
Fetch more results from the server.
getId()  : mixed
Returns the cursor ID
isCached()  : bool
Return if the Cursor has cached results on server
key()  : mixed
Return the key of the current element.
next()  : void
Move forward to next element.
rewind()  : void
Rewind the Iterator to the first element.
valid()  : bool
Checks if current position is valid.
appendResults()  : void
Append the results.
create()  : void
Create/initialize the cursor.
getBody()  : array<string|int, mixed>
Return body for creating cursor.

Constants

BASE_URL

Cursor baseUrl entry

protected mixed BASE_URL = 'baseurl'

CACHE

Cursor cache entry

protected mixed CACHE = 'cache'

CACHED

Cursor cached entry

protected mixed CACHED = 'cached'

COUNT

Cursor count entry

protected mixed COUNT = 'count'

EXTRA

Cursor extra entry

protected mixed EXTRA = 'extra'

FULL_COUNT

Cursor fullCount entry

protected mixed FULL_COUNT = 'fullCount'

HAS_MORE

'hasMore' flag

protected mixed HAS_MORE = 'hasMore'

ID

Cursor ID entry

protected mixed ID = 'id'

RESULT

Cursor result entry

protected mixed RESULT = 'result'

SANITIZE

Cursor sanitize option

protected mixed SANITIZE = '_sanitize'

STATS

Cursor stats entry

protected mixed STATS = 'stats'

TYPE

Cursor type entry

protected mixed TYPE = 'objectType'

Properties

$cached

If the result query was served from cached results

protected bool $cached = false

$count

Number of documents in cursor,

protected int $count

$defaultOptions

Default options query for the cursor.<br> <b>count</b>, <b>batchSize</b> and <b>options</b> are, by default, leaved for the server defaults.

protected array<string|int, mixed> $defaultOptions = ['cache' => true, 'memoryLimit' => 0, 'ttl' => 60]

$extra

Extra data (stats)

protected array<string|int, mixed> $extra

$fetches

Number of HTTP calls made to build the cursor

protected int $fetches = 0

$fullCount

Full cont of the result set

protected int $fullCount

$hasMore

'hasMore' indicator

protected bool $hasMore

$id

Cursor id

protected mixed $id

$length

Total length of current set

protected int $length

$options

Cursor Options

protected array<string|int, mixed> $options

$position

Current position

protected int $position = 0

$uri

URI to manage the cursor.

protected string $uri = \ArangoDB\Http\Api::CURSOR

Methods

__construct()

Cursor constructor.

public __construct(Connection $connection, StatementInterface $statement[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$connection : Connection

Connection object to use.

$statement : StatementInterface

Statement to perform on server.

$options : array<string|int, mixed> = []

Options for cursor.

Tags
throws
CursorException|GuzzleException

__toString()

Return a string representation of document.

public __toString() : string
Return values
string

count()

public count() : int
Tags
inheritDoc
Return values
int

delete()

Deletes the cursor and frees the resources associated with it.

public delete() : bool
Tags
throws
CursorException
Return values
bool

getId()

Returns the cursor ID

public getId() : mixed

isCached()

Return if the Cursor has cached results on server

public isCached() : bool
Return values
bool

key()

Return the key of the current element.

public key() : mixed

next()

Move forward to next element.

public next() : void

rewind()

Rewind the Iterator to the first element.

public rewind() : void

valid()

Checks if current position is valid.

public valid() : bool
Tags
throws
CursorException
Return values
bool

appendResults()

Append the results.

protected appendResults(array<string|int, mixed> $results) : void
Parameters
$results : array<string|int, mixed>

create()

Create/initialize the cursor.

protected create() : void
Tags
throws
CursorException|GuzzleException

getBody()

Return body for creating cursor.

protected getBody() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results