We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbe6470 commit 069f1efCopy full SHA for 069f1ef
tests/WP_SQLite_Driver_Tests.php
@@ -3665,4 +3665,23 @@ public function testColumnDefaults(): void {
3665
$result[0]->{'Create Table'}
3666
);
3667
}
3668
+
3669
+ public function testSelectNonExistentColumn(): void {
3670
+ $this->assertQuery(
3671
+ 'CREATE TABLE t (id INT)'
3672
+ );
3673
3674
+ /*
3675
+ * Here, we're basically testing that identifiers are escaped using
3676
+ * backticks instead of double quotes. In SQLite, double quotes may
3677
+ * fallback to a string literal and thus produce no error.
3678
+ *
3679
+ * See:
3680
+ * https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted
3681
+ */
3682
3683
+ 'SELECT non_existent_column FROM t LIMIT 0',
3684
+ 'no such column: non_existent_column'
3685
3686
+ }
3687
0 commit comments