From e65069885b357002fca0ca6ea1202bc181e8cc22 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Mon, 25 Apr 2022 18:30:13 -0400 Subject: [PATCH] Clean up obsolete FIXMEs --- lib/Db/MySQL/Statement.php | 2 +- lib/Db/PDOStatement.php | 2 +- lib/Db/PostgreSQL/Statement.php | 2 +- lib/Db/SQLite3/Statement.php | 2 +- sql/SQLite3/0.sql | 2 +- sql/SQLite3/2.sql | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Db/MySQL/Statement.php b/lib/Db/MySQL/Statement.php index 057225a..c6ec0fb 100644 --- a/lib/Db/MySQL/Statement.php +++ b/lib/Db/MySQL/Statement.php @@ -15,7 +15,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { self::T_DATETIME => "s", self::T_BINARY => "b", self::T_STRING => "s", - self::T_BOOLEAN => "i", + self::T_BOOLEAN => "i", // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically ]; protected $db; diff --git a/lib/Db/PDOStatement.php b/lib/Db/PDOStatement.php index 4425093..ba3ca83 100644 --- a/lib/Db/PDOStatement.php +++ b/lib/Db/PDOStatement.php @@ -15,7 +15,7 @@ abstract class PDOStatement extends AbstractStatement { self::T_DATETIME => \PDO::PARAM_STR, self::T_BINARY => \PDO::PARAM_LOB, self::T_STRING => \PDO::PARAM_STR, - self::T_BOOLEAN => \PDO::PARAM_INT, // FIXME: using \PDO::PARAM_BOOL leads to incompatibilities with versions of SQLite bundled prior to PHP 7.3 + self::T_BOOLEAN => \PDO::PARAM_INT, // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically ]; protected $st; diff --git a/lib/Db/PostgreSQL/Statement.php b/lib/Db/PostgreSQL/Statement.php index acb14a3..278bee9 100644 --- a/lib/Db/PostgreSQL/Statement.php +++ b/lib/Db/PostgreSQL/Statement.php @@ -15,7 +15,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { self::T_DATETIME => "timestamp(0) without time zone", self::T_BINARY => "bytea", self::T_STRING => "text", - self::T_BOOLEAN => "smallint", // FIXME: using boolean leads to incompatibilities with versions of SQLite bundled prior to PHP 7.3 + self::T_BOOLEAN => "smallint", // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically ]; protected $db; diff --git a/lib/Db/SQLite3/Statement.php b/lib/Db/SQLite3/Statement.php index c97b1d8..b38e452 100644 --- a/lib/Db/SQLite3/Statement.php +++ b/lib/Db/SQLite3/Statement.php @@ -18,7 +18,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { self::T_DATETIME => \SQLITE3_TEXT, self::T_BINARY => \SQLITE3_BLOB, self::T_STRING => \SQLITE3_TEXT, - self::T_BOOLEAN => \SQLITE3_INTEGER, + self::T_BOOLEAN => \SQLITE3_INTEGER, // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically ]; protected $db; diff --git a/sql/SQLite3/0.sql b/sql/SQLite3/0.sql index 623c502..7a55606 100644 --- a/sql/SQLite3/0.sql +++ b/sql/SQLite3/0.sql @@ -16,7 +16,7 @@ create table arsse_users( avatar_type text, -- internal avatar image's MIME content type avatar_data blob, -- internal avatar image's binary data admin boolean default 0, -- whether the user is a member of the special "admin" group - rights integer not null default 0 -- temporary admin-rights marker FIXME: remove reliance on this + rights integer not null default 0 -- temporary admin-rights marker ); create table arsse_users_meta( diff --git a/sql/SQLite3/2.sql b/sql/SQLite3/2.sql index 1894126..7876530 100644 --- a/sql/SQLite3/2.sql +++ b/sql/SQLite3/2.sql @@ -13,7 +13,7 @@ create table arsse_users_new( avatar_type text, -- internal avatar image's MIME content type avatar_data blob, -- internal avatar image's binary data admin boolean default 0, -- whether the user is a member of the special "admin" group - rights integer not null default 0 -- temporary admin-rights marker FIXME: remove reliance on this + rights integer not null default 0 -- temporary admin-rights marker ); insert into arsse_users_new(id,password,name,avatar_type,avatar_data,admin,rights) select id,password,name,avatar_type,avatar_data,admin,rights from arsse_users; drop table arsse_users;