Skip to content

Added SQL Server style named parameter. #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

ryokash
Copy link

@ryokash ryokash commented Jan 20, 2025

Added SQL Server style (i.e. @param_name style) named parameter.

>>> from sqlparams import SQLParams
>>> formatter = SQLParams('named_sqlserver', 'qmark')
>>> formatter.format('select * from Test where id = @id', {'id': 10})
('select * from Test where id = ?', [10])

@cpburnz
Copy link
Owner

cpburnz commented Jan 23, 2025

Thanks, this is a useful addition. I'll review it this weekend.

@cpburnz cpburnz merged commit dc04ea4 into cpburnz:master Jan 25, 2025
@cpburnz
Copy link
Owner

cpburnz commented Jan 25, 2025

v6.2.0 has been released on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants