コード例 #1
0
ファイル: Builder.php プロジェクト: bobflay/NeoEloquent
 /**
  * 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);
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: clubttt/SuccessModel4
 /**
  * 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);
 }
コード例 #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);
 }