Collection export

package ArangoDBClient
since 2.6

 Methods

Initialize the export

__construct(\ArangoDBClient\Connection $connection, string $collection, array $data = array()

Parameters

$connection

\ArangoDBClient\Connection
  • the connection to be used

$collection

string
  • the collection to export

$data

array
  • export options

Exceptions

\ArangoDBClient\Exception

Execute the export

execute() : \ArangoDBClient\ExportCursor

This will return the results as a Cursor. The cursor can then be used to iterate the results.

Exceptions

\ArangoDBClient\Exception

Returns

\ArangoDBClient\ExportCursor

Get the batch size for the export

getBatchSize() : integer

Returns

integer- current batch size value

Set the batch size for the export

setBatchSize(integer $value) : void

The batch size is the number of results to be transferred in one server round-trip. If an export produces more documents than the batch size, it creates a server-side cursor that provides the additional results.

The server-side cursor can be accessed by the client with subsequent HTTP requests.

Parameters

$value

integer
  • batch size value

Exceptions

\ArangoDBClient\ClientException

Sets the document class to use

setDocumentClass(string $class) : \ArangoDBClient\DocumentClassable
Inherited

Parameters

$class

string

Document class to use

Returns

\ArangoDBClient\DocumentClassable

Sets the edge class to use

setEdgeClass(string $class) : \ArangoDBClient\DocumentClassable
Inherited

Parameters

$class

string

Edge class to use

Returns

\ArangoDBClient\DocumentClassable

Return the connection object

getConnection() : \ArangoDBClient\Connection

Returns

\ArangoDBClient\Connection- the connection object

Return an array of cursor options

getCursorOptions() : array

Returns

array- array of options

 Properties

 

Document class to use

$_documentClass : string

Default

'\ArangoDBClient\Document'
 

Edge class to use

$_edgeClass : string

Default

'\ArangoDBClient\Edge'
 

The current batch size (number of result documents retrieved per round-trip)

$_batchSize : mixed

Default

 

The collection name or collection object

$_collection : mixed

Default

 

The connection object

$_connection : \ArangoDBClient\Connection

Default

 

"flat" flag (if set, the query results will be treated as a simple array, not documents)

$_flat : boolean

Default

false
 

Flush flag (if set, then all documents from the collection that are currently only in the write-ahead log (WAL) will be moved to the collection's datafiles. This may cause an initial delay in the export, but will lead to the documents in the WAL not being excluded from the export run. If the flush flag is set to false, the documents still in the WAL may be missing in the export result.

$_flush : boolean

Default

true
 

optional limit for export - if specified and positive, will cap the amount of documents in the cursor to the specified value

$_limit : integer

Default

0
 

export restrictions - either null for no restrictions or an array with a "type" and a "fields" index

$_restrictions : mixed

Default

 

The underlying collection type

$_type 

Default

 Constants

 

Batch size option index

ENTRY_BATCHSIZE = 'batchSize' 
 

Count option index

ENTRY_COUNT = 'count' 
 

Flush option index

ENTRY_FLUSH = 'flush' 
 

Optional limit for the number of documents

ENTRY_LIMIT = 'limit' 
 

Export restrictions

ENTRY_RESTRICT = 'restrict'