Skip to content

Commit 409e2fb

Browse files
committed
test: add no backtick case
1 parent 70ba8cd commit 409e2fb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/everyday-queries.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,4 +607,12 @@ describe('Critical: Backtick-quoted identifiers with comment-like sequences', ()
607607
'SELECT `col--1`, `col--2` FROM `users--table` WHERE id = 1'
608608
);
609609
});
610+
611+
test('SELECT with ?? without any backticks in query', () => {
612+
const sql = format('SELECT ?? FROM users WHERE id = ?', [
613+
['id', 'name'],
614+
1,
615+
]);
616+
assert.equal(sql, 'SELECT `id`, `name` FROM users WHERE id = 1');
617+
});
610618
});

0 commit comments

Comments
 (0)