interface HttpBindingInterface implements BindingInterface (View source)

Methods

execute(Query $query, $fetchPlan = null)

Executes an SQL query on the server.

string
getDatabaseName()

Returns the name of the database the binding is currently using.

getDatabase(string $database = null)

Retrieves details regarding the specified database.

deleteClass(string $class, string $database = null)

Deletes a class.

getClass(string $class, string $database = null)

Retrieves a class and its records.

postClass(string $class, string $body = null, string $database = null)

Creates a new class.

cluster($cluster, $limit = null, $database = null)

Retrieves records from the given cluster in the database.

connect(string $database)

Connects to the specified database.

disconnect()

Disconnect this instance from the server.

getServer()

Gets the current server.

createDatabase(string $database, string $storage = 'memory', string $type = 'document')

Creates a new database.

listDatabases()

Lists all the existing databases.

deleteDatabase(string $database)

Deletes an existing database.

command(string $query, string $language = BindingInterface::LANGUAGE_SQLPLUS, string $database = null)

Executes a raw command on the given database.

query(string $query, int $limit = null, string $fetchPlan = null, string $language = BindingInterface::LANGUAGE_SQLPLUS, string $database = null)

Executes a raw query on the given database.

getDocument(string $rid, string $database = null, string $fetchPlan = null)

Retrieves a record from the database. An optional fetch plan can be used to specify how to retrieve the graph and limit its depth.

postDocument(string $document, string $database = null)

Stores a new document in the database.

putDocument(string $rid, string $document, string $database = null)

Updates an existing document in the database.

deleteDocument(string $rid, string $version = null, string $database = null)

Deletes a document from the database.

setAuthentication(string $username = null, string $password = null)

Sets the username and password used to authenticate to the server.

setAdapter(HttpClientAdapterInterface $adapter)

Sets the underlying HTTP client adapter.

getAdapter()

Sets the underlying HTTP client adapter.

Details

BindingResultInterface execute(Query $query, $fetchPlan = null)

Executes an SQL query on the server.

The second argument specifies when to use COMMAND or QUERY as the underlying command.

Parameters

Query $query
$fetchPlan

Return Value

BindingResultInterface

string getDatabaseName()

Returns the name of the database the binding is currently using.

Return Value

string

BindingResultInterface getDatabase(string $database = null)

Retrieves details regarding the specified database.

Parameters

string $database

Return Value

BindingResultInterface

BindingResultInterface deleteClass(string $class, string $database = null)

Deletes a class.

Parameters

string $class
string $database

Return Value

BindingResultInterface

BindingResultInterface getClass(string $class, string $database = null)

Retrieves a class and its records.

Parameters

string $class
string $database

Return Value

BindingResultInterface

BindingResultInterface postClass(string $class, string $body = null, string $database = null)

Creates a new class.

Parameters

string $class
string $body
string $database

Return Value

BindingResultInterface

BindingResultInterface cluster($cluster, $limit = null, $database = null)

Retrieves records from the given cluster in the database.

Parameters

$cluster
$limit
$database

Return Value

BindingResultInterface

BindingResultInterface connect(string $database)

Connects to the specified database.

Parameters

string $database

Return Value

BindingResultInterface

BindingResultInterface disconnect()

Disconnect this instance from the server.

Return Value

BindingResultInterface

BindingResultInterface getServer()

Gets the current server.

Return Value

BindingResultInterface

BindingResultInterface createDatabase(string $database, string $storage = 'memory', string $type = 'document')

Creates a new database.

Parameters

string $database
string $storage
string $type

Return Value

BindingResultInterface

BindingResultInterface listDatabases()

Lists all the existing databases.

Return Value

BindingResultInterface

BindingResultInterface deleteDatabase(string $database)

Deletes an existing database.

Parameters

string $database

Return Value

BindingResultInterface

BindingResultInterface command(string $query, string $language = BindingInterface::LANGUAGE_SQLPLUS, string $database = null)

Executes a raw command on the given database.

Parameters

string $query
string $language
string $database

Return Value

BindingResultInterface

BindingResultInterface query(string $query, int $limit = null, string $fetchPlan = null, string $language = BindingInterface::LANGUAGE_SQLPLUS, string $database = null)

Executes a raw query on the given database.

Results can be limited with the $limit parameter and a fetch plan can be used to specify how to retrieve the graph and limit its depth.

It differs from the command because OrientDB defines a query as a SELECT only.

Parameters

string $query SQL or Gremlin query.
int $limit Maximum number of records (default is 20).
string $fetchPlan
string $language
string $database

Return Value

BindingResultInterface

BindingResultInterface getDocument(string $rid, string $database = null, string $fetchPlan = null)

Retrieves a record from the database. An optional fetch plan can be used to specify how to retrieve the graph and limit its depth.

Parameters

string $rid
string $database
string $fetchPlan

Return Value

BindingResultInterface

BindingResultInterface postDocument(string $document, string $database = null)

Stores a new document in the database.

Parameters

string $document
string $database

Return Value

BindingResultInterface

BindingResultInterface putDocument(string $rid, string $document, string $database = null)

Updates an existing document in the database.

Parameters

string $rid
string $document
string $database

Return Value

BindingResultInterface

BindingResultInterface deleteDocument(string $rid, string $version = null, string $database = null)

Deletes a document from the database.

Parameters

string $rid
string $version
string $database

Return Value

BindingResultInterface

setAuthentication(string $username = null, string $password = null)

Sets the username and password used to authenticate to the server.

Parameters

string $username
string $password

setAdapter(HttpClientAdapterInterface $adapter)

Sets the underlying HTTP client adapter.

Parameters

HttpClientAdapterInterface $adapter

HttpClientAdapterInterface getAdapter()

Sets the underlying HTTP client adapter.