Doctrine\OrientDB\Binding\HttpBinding::query PHP Method

query() public method

public query ( $query, $limit = null, $fetchPlan = null, $language = BindingInterface::LANGUAGE_SQLPLUS, $database = null )
    public function query($query, $limit = null, $fetchPlan = null, $language = BindingInterface::LANGUAGE_SQLPLUS, $database = null)
    {
        $location = $this->getQueryLocation($database ?: $this->database, $query, $limit, $fetchPlan, $language);
        return $this->adapter->request('GET', $location);
    }

Usage Example

Ejemplo n.º 1
0
<?php

use Doctrine\OrientDB\Binding\HttpBinding;
use Doctrine\OrientDB\Binding\BindingParameters;
require __DIR__ . '/../autoload.php';
$parameters = BindingParameters::create('http://*****:*****@127.0.0.1:2480/friends');
$binding = new HttpBinding($parameters);
$friends = $binding->query('select from friends where any() traverse(0,1) ( @rid = #5:3 ) and @rid <> #5:3');
foreach ($friends as $friend) {
    echo $friend->name, "\n";
}
All Usage Examples Of Doctrine\OrientDB\Binding\HttpBinding::query