Skip to content

Commit

Permalink
Merge pull request #6840 from rasteiner/fix/sqlite-quotes
Browse files Browse the repository at this point in the history
Fix sqlite driver using double quotes for string literals
  • Loading branch information
bastianallgeier authored Dec 17, 2024
2 parents c8af3cb + cf16682 commit 1ff819d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Database/Sql/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => []
];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/Sql/SqliteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

Expand Down

0 comments on commit 1ff819d

Please sign in to comment.