/**
  * Begin a fluent query against a database table.
  * In neo4j's terminologies this is a node.
  *
  * @param  string  $table
  * @return \Vinelab\NeoEloquent\Query\Builder
  */
 public function table($table)
 {
     $query = new Builder($this, $this->getQueryGrammar());
     return $query->from($table);
 }
示例#2
0
 public function testMaxWithQuery()
 {
     User::create(['logins' => 10, 'points' => 1]);
     User::create(['logins' => 11, 'points' => 2]);
     User::create(['logins' => 12, 'points' => 4]);
     $this->query->where('points', '<', 4);
     $this->assertEquals(11, $this->query->max('logins'));
     $query = new Builder((new User())->getConnection(), new CypherGrammar());
     $query->from = 'User';
     $query->where('points', '<', 4);
     $this->assertEquals(2, $query->max('points'));
 }