1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 18:14:07 +02:00

Generalize transactions

This commit is contained in:
Jakub Vrana
2013-07-09 11:43:01 -07:00
parent 56b0917acd
commit 7a1133a2fd
7 changed files with 38 additions and 22 deletions

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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; //!
}

View File

@@ -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
}

View File

@@ -210,6 +210,18 @@ if (isset($_GET["simpledb"])) {
return true;
}
function begin() {
return false;
}
function commit() {
return false;
}
function rollback() {
return false;
}
}