public function __construct(Repo $repo) { $this->repo = $repo; $this->into($repo->getTable()); parent::__construct($repo->getDbInstance()); }
/** * @covers ::getParameters */ public function testGetParameters() { $query = new Query\Insert(self::getDb()); $query->into('table1')->set(array('name' => 10, 'value' => 5)); $this->assertEquals(array(10, 5), $query->getParameters()); }
/** * @param Query\Insert $query * @return array */ public static function parameters(Query\Insert $query) { return Compiler::parameters(array($query->getTable(), $query->getSet(), $query->getValues(), $query->getSelect())); }