Example #1
0
 /**
  * Create a new node with related nodes with one database hit.
  *
  * @param  array  $model
  * @param  array  $related
  * @return \Vinelab\NeoEloquent\Eloquent\Model
  */
 public function createWith(array $model, array $related)
 {
     $cypher = $this->grammar->compileCreateWith($this, compact('model', 'related'));
     // Indicate that we need the result returned as is.
     $result = true;
     return $this->connection->statement($cypher, [], $result);
 }
Example #2
0
 /**
  * Execute a Cypher statement and return the boolean result.
  *
  * @param string $query
  * @param array $bindings
  * @return bool|\Everyman\Neo4j\Query\ResultSet When $result is set to true.
  * @static 
  */
 public static function statement($query, $bindings = array(), $rawResults = false)
 {
     return \Vinelab\NeoEloquent\Connection::statement($query, $bindings, $rawResults);
 }
Example #3
0
 /**
  * Create a new node with related nodes with one database hit.
  *
  * @param  array  $model
  * @param  array  $related
  * @return \Vinelab\NeoEloquent\Eloquent\Model
  */
 public function createWith(array $model, array $related)
 {
     $cypher = $this->grammar->compileCreateWith($this, compact('model', 'related'));
     return $this->connection->statement($cypher, [], $result = true);
 }