1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 17:12:41 +00:00
Arsse/lib/Db/CommonPDO.php

17 lines
478 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace JKingWeb\NewsSync\Db;
Trait CommonPDO {
2017-02-16 20:29:42 +00:00
public function query(string $query): Result {
return new ResultPDO($this->db->query($query));
}
2017-02-16 20:29:42 +00:00
public function prepareArray(string $query, array $paramTypes): Statement {
return new StatementPDO($query, $paramTypes);
}
2017-02-16 20:29:42 +00:00
public function prepare(string $query, string ...$paramType): Statement {
return $this->prepareArray($query, $paramType);
}
}