Note: This utility is currently more suitable to be used in a notebook settings, as it will prompt user for input. A Version more fir to be used in programming will soon be released.
I was recently doing an online training, the instructor was showing examples on MySQL database. I however preferred running those exampkes on my test database i.e. MS SQL Server on Azure Cloud.
After a few classes i realized that MYSQL has host of simple to understand SQL queries, where as its SQL server equivalent was big chunky queries. (I am talking about system SQL query which you run against the metdata such as SHOW TABLES, SHOW DATABASE etc)
with this idea i have created this utility to provide syntax to some imp queries, which we are required to run every now and then.
run [print(scup.sqlserver('list'))] to see a complete list queries, this utility support.
version = "0.4.5" --> Added Query 9, and added header to 1,2,3 and 9 query
version = "0.4.3" --> Added header to #3 and #6 query , # more details
version = "0.4.2" --> Bug - List command but erroring - local variable 'ssquery' referenced before assignment
version = "0.4.1" --> fixed a small bug, nevermind :)
version = "0.4.0" --> Added option to call queries by numbers
version = "0.3.0" --> Changed scup.py function ms2ssf() name to sqlserver(). added many other sqls.
version = "0.2.3" --> Package Name changed from MSS to SCUP as pypi showed conflict. (SCUP as in SQL Covertor Utility Program)
version = "0.2.2" --> List command added and reponse to no query match added
version = "0.2.0" --> 3 Show commands working
version = "0.2.1" --> Patch - test scripts was commented out
COMMANDS HELP ()
1. SHOW DATABASES (conn.execute(scup.sqlserver('SHOW DATABASES')).fetchall())
2. SHOW TABLES : will prompt for Schema name
3. SHOW TABLES FROM database_name : will prompt for Database name
4. SHOW CHECK_CONSTRAINTS FROM TABLE : will prompt for Table Name (uses LIKE)
5. DESCRIBE TABLE : will prompt for Database name
6. SHOW INDEX FROM TABLE : will prompt for Schema and Table name
7. DATABASE STATUS : will prompt for Database name
8. SHOW VIEWS : will prompt for Schema name
9. INDEX FRAGMENTATION : will prompt for schema and threshold precentage to use as filter
Metadata
Release files for scup 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scup-0.4.5.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scup-0.4.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / scup-0.4.5.tar.gz
| Download URL | scup-0.4.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8683a9609fae924ca777fc3691abce5bc661e4dda20ee403a5e6fd97e51cc862
|
|
BLAKE2b-256 checksum How to use checksums |
58229c17b6f697f06f099bd368de4780ef7aa0a92cedaf641655d6c3841d36ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.6 Windows/10
|
Release files / scup-0.4.5-py3-none-any.whl
| Download URL | scup-0.4.5-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62d99606083f4e54509143f60f010c401e1fbc46f0c4070eff81ae983133e6d9
|
|
BLAKE2b-256 checksum How to use checksums |
02867a8022be495f9bd6f3c26df978b107fe0ce18f082b5eb73b7af61692e42f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.6 Windows/10
|