mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Generalize transactions
This commit is contained in:
@@ -258,6 +258,10 @@ if (isset($_GET["mssql"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN TRANSACTION");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -485,10 +489,6 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN TRANSACTION");
|
||||
}
|
||||
|
||||
function last_id() {
|
||||
global $connection;
|
||||
return $connection->result("SELECT SCOPE_IDENTITY()"); // @@IDENTITY can return trigger INSERT
|
||||
|
@@ -837,13 +837,6 @@ if (!defined("DRIVER")) {
|
||||
return array(); // "SQL" not required
|
||||
}
|
||||
|
||||
/** Begin transaction
|
||||
* @return bool
|
||||
*/
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
/** Get last auto increment ID
|
||||
* @return string
|
||||
*/
|
||||
|
@@ -138,6 +138,10 @@ if (isset($_GET["oracle"])) {
|
||||
|
||||
//! support empty $set in insert()
|
||||
|
||||
function begin() {
|
||||
return true; // automatic start
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -328,10 +332,6 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
return apply_queries("DROP TABLE", $tables);
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return true; // automatic start
|
||||
}
|
||||
|
||||
function last_id() {
|
||||
return 0; //!
|
||||
}
|
||||
|
@@ -539,10 +539,6 @@ ORDER BY p.proname');
|
||||
return get_vals("SELECT langname FROM pg_catalog.pg_language");
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
function last_id() {
|
||||
return 0; // there can be several sequences
|
||||
}
|
||||
|
@@ -210,6 +210,18 @@ if (isset($_GET["simpledb"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function commit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function rollback() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user