Example #1
0
 public function getCount()
 {
     $sql = 'SELECT count(1) "count"
             FROM "comment"';
     $query = (new \Aqua\Db\Query())->instances($sql, []);
     return \Aqua\Db\Connection::query($query)->asArray()[0];
 }
Example #2
0
 public function delete($id)
 {
     $sql = 'DELETE FROM "family_tree"
             WHERE "id"=?id
             RETURNING *';
     $query = (new \Aqua\Db\Query())->instances($sql, ['id' => $id]);
     return \Aqua\Db\Connection::query($query);
 }