From 3ac7ab2cf3530757564ded5e05e811c02b14acb5 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 27 Oct 2020 01:50:39 +0000 Subject: [PATCH] remove old bool support --- core/dbengine.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/core/dbengine.php b/core/dbengine.php index 638da437..0e1a7254 100644 --- a/core/dbengine.php +++ b/core/dbengine.php @@ -3,9 +3,6 @@ abstract class SCORE { const AIPK = "SCORE_AIPK"; const INET = "SCORE_INET"; - const BOOL_Y = "SCORE_BOOL_Y"; - const BOOL_N = "SCORE_BOOL_N"; - const BOOL = "SCORE_BOOL"; } abstract class DBEngine @@ -13,9 +10,6 @@ abstract class DBEngine /** @var null|string */ public $name = null; - public $BOOL_Y = null; - public $BOOL_N = null; - public function init(PDO $db) { } @@ -42,9 +36,6 @@ class MySQL extends DBEngine /** @var string */ public $name = DatabaseDriver::MYSQL; - public $BOOL_Y = 'Y'; - public $BOOL_N = 'N'; - public function init(PDO $db) { $db->exec("SET NAMES utf8;"); @@ -54,9 +45,6 @@ class MySQL extends DBEngine { $data = str_replace(SCORE::AIPK, "INTEGER PRIMARY KEY auto_increment", $data); $data = str_replace(SCORE::INET, "VARCHAR(45)", $data); - $data = str_replace(SCORE::BOOL_Y, "'$this->BOOL_Y'", $data); - $data = str_replace(SCORE::BOOL_N, "'$this->BOOL_N'", $data); - $data = str_replace(SCORE::BOOL, "ENUM('Y', 'N')", $data); return $data; } @@ -88,9 +76,6 @@ class PostgreSQL extends DBEngine /** @var string */ public $name = DatabaseDriver::PGSQL; - public $BOOL_Y = "true"; - public $BOOL_N = "false"; - public function init(PDO $db) { if (array_key_exists('REMOTE_ADDR', $_SERVER)) { @@ -107,9 +92,6 @@ class PostgreSQL extends DBEngine { $data = str_replace(SCORE::AIPK, "INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY", $data); $data = str_replace(SCORE::INET, "INET", $data); - $data = str_replace(SCORE::BOOL_Y, "true", $data); - $data = str_replace(SCORE::BOOL_N, "false", $data); - $data = str_replace(SCORE::BOOL, "BOOL", $data); return $data; } @@ -190,10 +172,6 @@ class SQLite extends DBEngine /** @var string */ public $name = DatabaseDriver::SQLITE; - public $BOOL_Y = 'Y'; - public $BOOL_N = 'N'; - - public function init(PDO $db) { ini_set('sqlite.assoc_case', '0'); @@ -214,9 +192,6 @@ class SQLite extends DBEngine { $data = str_replace(SCORE::AIPK, "INTEGER PRIMARY KEY", $data); $data = str_replace(SCORE::INET, "VARCHAR(45)", $data); - $data = str_replace(SCORE::BOOL_Y, "'$this->BOOL_Y'", $data); - $data = str_replace(SCORE::BOOL_N, "'$this->BOOL_N'", $data); - $data = str_replace(SCORE::BOOL, "CHAR(1)", $data); return $data; }