1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

PostgreSQL: Fix clone after e395fe5

This commit is contained in:
Jakub Vrana
2025-03-22 20:55:51 +01:00
parent 359fdf3d07
commit 9b162e8291
3 changed files with 14 additions and 15 deletions

View File

@@ -139,19 +139,18 @@ abstract class SqlDriver {
* @return bool
*/
function insert($table, $set) {
return queries($this->insertSql($table, $set));
}
/** Get SQL query to insert data into table
* @param string
* @param array same as insert()
* @return string
*/
protected function insertSql($table, $set) {
return "INSERT INTO " . table($table) . ($set
return queries("INSERT INTO " . table($table) . ($set
? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")"
: " DEFAULT VALUES"
);
) . $this->insertReturning($table));
}
/** Get RETURNING clause for INSERT queries, PostgreSQL specific
* @param string
* @return string
*/
function insertReturning($table) {
return "";
}
/** Insert or update data in table