A cli tool to check and guard against anti-patterns
Project description
sqlcop
A cli tool to check and guard against anti-patterns
Installation
From PyPI:
pip install sqlcop
Usage
sqlcop is designed to use with nose-sqlcapture.
First, you use nose-sqlcapture to generate a SQL capture file:
nosetests [other options] --with-sqlcapture --sqlcapture-filename=sql.log --sqlcapture-format=json
Run sqlcop on the generated sql log fie:
sqlcop sql.log
For some checks, a database schema is needed. In that case, you need to supply the url to the database so sqlcop can grab the metadata:
sqlcop --db-urls=mysql://user:pwd@host:port/db sql.log
You can specify more than one db_urls at once:
sqlcop --db-urls=mysql://user:pwd@host:port/db1,mysql://user:pwd@host:port/db2 sql.log
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for sqlcop-0.10.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f94c055e8290d5bcd3ca9211c3eea8d8a9ff608263d2969d857ae06085007a1b |
|
MD5 | 9a77cd61780553b28e0272ace5ffc50c |
|
BLAKE2b-256 | a86b9dff19a18161bee99af27ffd354c58a2d471d4ffbc101083bc8b5fed5f4b |