From fdba36486a63cacab46a1682ffd16d25c781f864 Mon Sep 17 00:00:00 2001 From: Roman Steiner Date: Fri, 6 Dec 2024 18:45:18 +0100 Subject: [PATCH 1/2] use single quotes for string literal in sqlite query --- src/Database/Sql/Sqlite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Sql/Sqlite.php b/src/Database/Sql/Sqlite.php index fcb36b51a2..267014e54b 100644 --- a/src/Database/Sql/Sqlite.php +++ b/src/Database/Sql/Sqlite.php @@ -130,7 +130,7 @@ public function quoteIdentifier(string $identifier): string public function tables(): array { return [ - 'query' => 'SELECT name FROM sqlite_master WHERE type = "table" OR type = "view"', + 'query' => 'SELECT name FROM sqlite_master WHERE type = \'table\' OR type = \'view\'', 'bindings' => [] ]; } From cf166820081ffb63fa9cdfd8e64ce5afe6746f0c Mon Sep 17 00:00:00 2001 From: Roman Steiner Date: Fri, 6 Dec 2024 18:55:06 +0100 Subject: [PATCH 2/2] fix sqlite test using double quotes --- tests/Database/Sql/SqliteTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Database/Sql/SqliteTest.php b/tests/Database/Sql/SqliteTest.php index 401f955906..0436f27055 100644 --- a/tests/Database/Sql/SqliteTest.php +++ b/tests/Database/Sql/SqliteTest.php @@ -160,7 +160,7 @@ public function testQuoteIdentifier() public function testTables() { $result = $this->sql->tables(); - $this->assertSame('SELECT name FROM sqlite_master WHERE type = "table" OR type = "view"', $result['query']); + $this->assertSame('SELECT name FROM sqlite_master WHERE type = \'table\' OR type = \'view\'', $result['query']); $this->assertSame([], $result['bindings']); }