Implement Result and Connection::query()

[MAILPOET-6142]
This commit is contained in:
Jan Jakes
2024-07-13 13:57:28 +02:00
committed by Aschepikov
parent 2047f0b694
commit dc66a6a349
5 changed files with 339 additions and 10 deletions

View File

@@ -25,7 +25,10 @@ class Connection implements ServerInfoAwareConnection {
}
public function query(string $sql): Result {
// TODO: Implement query() method.
global $wpdb;
$value = $this->runQuery($sql);
$result = $wpdb->last_result;
return new Result($result, is_int($value) ? $value : 0);
}
public function exec(string $sql): int {