Upgrade from 0.x to 1.0¶
Install¶
pip install "sqlrules>=1,<2"
Dialect plugins are separate packages on the same major line:
pip install "sqlrules-postgresql>=1,<2" # or sqlite / mysql / mssql
# or: pip install "sqlrules[postgresql]" / "sqlrules[dialects]"
What stayed the same¶
compile,where/flatten, andCompilerremain the Application APICore still compiles comparisons, lengths,
Literal, andEnumpatternstill needs a dialect plugin or custom translatordialect=is still a hint only — passplugins=[...]explicitly
What to expect in 1.0¶
Application + Plugin APIs are frozen for the 1.x line
Official plugins: PostgreSQL, SQLite, MySQL, MSSQL
Opt-in
emit_type_checks/TypeSpec(plugin-translated, same footgun aspatternwithout a translator)Pins: plugins require
sqlrules>=1,<2; core extras pullsqlrules-*>=1,<2
Breaking / behavioral notes from 0.x¶
Unsupported types still always raise (not softened by
on_unsupported)Prefer
register_constraint(..., on_conflict=...)over legacyreplace=Whole-model type matrix: unconstrained fields with unsupported annotations raise; unconstrained supported types are omitted from the rules dict
See CHANGELOG for the full 1.0.0 notes.