Validate raw SQL queries present in your Python codebase against a schema using sqlshield
:
$ sqlshield --help
Usage: sqlshield [OPTIONS]
Options:
-d, --directory <DIRECTORY>
Directory. Defaults to "." (current)
-s, --schema <SCHEMA>
Schema file. Defaults to "schema.sql"
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
The tool validates the following main clauses:
- SELECT ✔️
- WITH ✔️
- JOIN ✔️
- INSERT ❌
- UPDATE ❌
- DELETE ❌
Other clauses:
- WHERE ❌
- ORDER BY ❌
- GROUP BY ❌
- HAVING ❌