Esempio n. 1
0
 /**
  * Create a new delegate instance.
  *
  * @param \Vinelab\NeoEloquent\Eloquent\Builder $query
  * @param \Vinelab\NeoEloquent\Eloquent\Model   $parent
  */
 public function __construct(Builder $query)
 {
     $this->query = $query;
     $model = $query->getModel();
     // Setup the database connection and client.
     $this->connection = $model->getConnection();
     $this->client = $this->connection->getClient();
 }
 /**
  * Create a new query builder instance.
  *
  * @param Vinelab\NeoEloquent\Connection $connection
  * @return void
  */
 public function __construct(Connection $connection, Grammar $grammar)
 {
     $this->grammar = $grammar;
     $this->grammar->setQuery($this);
     $this->connection = $connection;
     $this->client = $connection->getClient();
 }
Esempio n. 3
0
 /**
  * Get the currenty active database client
  *
  * @return \Vinelab\NeoEloquent\Everyman\Neo4j\Client 
  * @static 
  */
 public static function getClient()
 {
     return \Vinelab\NeoEloquent\Connection::getClient();
 }