Repository navigation
v4.7.1
Bug Fix
Fix whitespace collapsing breaking -- style SQL comments
The regex r'\s+' collapsed all whitespace including newlines, which broke -- style SQL comments by putting everything on one line. PostgreSQL (and other databases) interpret everything after -- as a comment until end of line, so queries like:
query = t"""
SELECT * FROM users
-- Filter by active status
WHERE active = true
"""Would silently drop the WHERE clause entirely.
Fix
Changed to r'[ \t]+' to only collapse horizontal whitespace (spaces/tabs) while preserving newlines.