Cake\Database\Connection::newQuery PHP Метод

newQuery() публичный Метод

Create a new Query instance for this connection.
public newQuery ( ) : Query
Результат Query
    public function newQuery()
    {
        return new Query($this);
    }

Usage Example

Пример #1
2
 /**
  * Test executing "mark_migration"
  *
  * @return void
  */
 public function testExecute()
 {
     $commandTester = new CommandTester($this->command);
     $commandTester->execute(['command' => $this->command->getName(), 'version' => '20150416223600', '--connection' => 'test']);
     $this->assertContains('Migration successfully marked migrated !', $commandTester->getDisplay());
     $result = $this->Connection->newQuery()->select(['*'])->from('phinxlog')->execute()->fetch('assoc');
     $this->assertEquals('20150416223600', $result['version']);
 }
All Usage Examples Of Cake\Database\Connection::newQuery