aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr')
-rw-r--r--ratatoeskr/sys/db.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/ratatoeskr/sys/db.php b/ratatoeskr/sys/db.php
index 9272256..9efa9ec 100644
--- a/ratatoeskr/sys/db.php
+++ b/ratatoeskr/sys/db.php
@@ -12,7 +12,6 @@
use r7r\cms\sys\Database;
use r7r\cms\sys\Env;
-use r7r\cms\sys\DbTransaction;
if (!defined("SETUP")) {
require_once(dirname(__FILE__) . "/../config.php");
@@ -21,18 +20,6 @@ if (!defined("SETUP")) {
require_once(dirname(__FILE__) . "/utils.php");
/**
- * Substitutes "PREFIX_" in the input string with the prefix from the config.
- *
- * @param mixed|string $q
- * @return string
- * @deprecated Use {@see Database::subPrefix()} instead.
- */
-function sub_prefix($q): string
-{
- return Env::getGlobal()->database()->subPrefix((string)$q);
-}
-
-/**
* Prepares statement (1st argument) like {@see Database::prepStmt()} and executes it with the remaining arguments.
*
* @param mixed ...$args
@@ -48,38 +35,3 @@ function qdb(...$args): PDOStatement
return Env::getGlobal()->database()->query((string)$args[0], ...array_slice($args, 1));
}
-
-/**
- * Makes using transactions easier.
- *
- * @deprecated Use {@see DbTransaction} instead.
- */
-class Transaction
-{
- /** @var DbTransaction */
- private $tx;
-
- /**
- * Start a new transaction.
- */
- public function __construct()
- {
- $this->tx = new DbTransaction(Env::getGlobal()->database());
- }
-
- /**
- * Commit the transaction.
- */
- public function commit(): void
- {
- $this->tx->commit();
- }
-
- /**
- * Roll the transaction back.
- */
- public function rollback(): void
- {
- $this->tx->rollback();
- }
-}