setType($type); $this->database->get("account", "email", [ "user_id" => 1234 ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::get() * @dataProvider typesProvider */ public function testGetWithColumns($type) { $this->setType($type); $this->database->get("account", [ "email", "location" ], [ "user_id" => 1234 ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::get() * @dataProvider typesProvider */ public function testGetWithJoin($type) { $this->setType($type); $this->database->get("post", [ "[>]account" => "user_id" ], [ "post.content", "account.user_name" ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::get() * @dataProvider typesProvider */ public function testGetWithJoinAndWhere($type) { $this->setType($type); $this->database->get("post", [ "[>]account" => "user_id" ], [ "post.content", "account.user_name" ], [ 'account.age[>]' => 18 ]); $this->assertQuery([ 'default' => << 18 LIMIT 1 EOD, 'mssql' => << 18 ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY EOD, 'oracle' => << 18 OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY EOD, ], $this->database->queryString); } }