Releases: MaksimShevtsov/RowQuery
Releases · MaksimShevtsov/RowQuery
RowQuery 0.1.2
Added
- Inline SQL support: All engine and transaction methods (
fetch_one,fetch_all,fetch_scalar,execute) now accept raw SQL strings in addition to registry keys. A string containing whitespace is treated as inline SQL; a dot-separated identifier likeuser.get_by_idis resolved from the registry. - Flexible parameter binding:
paramsargument now acceptsdict(named),tuple/list(positional), or a single scalar value (automatically wrapped in a tuple). Previously onlydict | Nonewas accepted. SQLSanitizer— configurable sanitizer applied to inline SQL before execution:strip_comments(defaultTrue): removes--line comments and/* */block comments while preserving string literals.block_multiple_statements(defaultTrue): rejects SQL containing a statement-terminating;followed by additional content (prevents query stacking attacks).allowed_verbs(defaultNone): restricts the leading SQL keyword to a caller-suppliedfrozenset(e.g.frozenset({"SELECT"})). Registry queries are never sanitized.
SQLSanitizationErrorexception (subclass ofExecutionError) raised when a sanitization check fails.is_raw_sql()andcoerce_params()helpers exported fromrow_query.core.params.- 65 new unit tests covering all sanitizer behaviour (
tests/unit/test_sanitizer.py).
RowQuery 0.1.1
Release 0.1.1