Skip to content

1.0.19: fix: Support placeholders in LIMIT/OFFSET clauses

Choose a tag to compare

@pierresh pierresh released this 07 Jan 03:38
· 21 commits to master since this release
Changed placeholder replacement from string literal ('__PLACEHOLDER__')
to integer literal (1) to support LIMIT and OFFSET clauses which require
integer values.

MySQL automatically converts integers to strings in string comparison
contexts, so this works for both integer and string contexts.

Before: LIMIT :limit → LIMIT '__PLACEHOLDER__' ❌ (syntax error)
After:  LIMIT :limit → LIMIT 1 ✅ (valid syntax)

This allows using prepared statements with LIMIT/OFFSET parameters,
which is a common and valid pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>