1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Db: Unify connection error handling

This commit is contained in:
Jakub Vrana
2025-03-28 22:00:53 +01:00
parent d5bba383ea
commit 29339c5223
13 changed files with 95 additions and 123 deletions

View File

@@ -13,8 +13,10 @@ abstract class SqlDb {
public string $error; // last error message
/** @var Result|bool */ protected $multi; // used for multiquery
/** Connect to server */
abstract function connect(string $server, string $username, string $password): bool;
/** Connect to server
* @return string error message
*/
abstract function attach(?string $server, string $username, string $password): string;
/** Quote string to use in SQL
* @return string escaped string enclosed in '