/** * Get the SQL Instruction String * to be used in Prepared Statement * * @return string */ public function getInstruction() { return $this->builder->write($this->execute()); }
/** * @test */ public function itShouldWrapColumnAlias() { $query = new Select('user', array('userId' => 'user_id', 'name' => 'name')); $expected = 'SELECT `user`.`user_id` AS `userId`, `user`.`name` AS `name` FROM `user`'; $this->assertSame($expected, $this->writer->write($query)); }