duosql
An easy way to demonstrate database transactions.
Prerequisite
- Python 3.5+
- tmux
Install
pip3 install duosql
Usage
- Create a .duo script file. For example:
# connect command
connect: mysql -ujohnlinp -psecret somedb
# create table and populate data
left: DROP TABLE IF EXISTS person;
left: CREATE TABLE person (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, age INT NOT NULL, PRIMARY KEY (id));
left: INSERT INTO person (name, age) VALUES ('John Lin', 29);
# start left transaction
left: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
left: BEGIN;
left: SELECT age FROM person WHERE id = 1;
# start right transaction
right: BEGIN;
right: UPDATE person SET age = 30 WHERE id = 1;
# continue left transaction
left: SELECT age FROM person WHERE id = 1;
# continue right transaction
right: ROLLBACK;
-
Run
duosql <script-file>. -
Watch.
Metadata
Release files for duosql 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| duosql-0.1.8.tar.gz | 3.5 kB | Without provenance | Details for duosql-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| duosql-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for duosql-0.1.8-py3-none-any.whl |
Total release size: 8.1 kB
Release files / duosql-0.1.8.tar.gz
| Download URL | duosql-0.1.8.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c1dcc159a41a614b03c7ea7f031e6608ecfdb8e3bbdf9cca8f47da2b15b9e85
|
|
BLAKE2b-256 checksum How to use checksums |
382ea2da119cfadf2c3b3960137c69d58b80b989c7826a1b3f06aace0f74ca8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.16
|
Release files / duosql-0.1.8-py3-none-any.whl
| Download URL | duosql-0.1.8-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6a7d351b0ac4b5158f95b399380a62cbf68bcd5ab4fc1c6d63bbb46f119d4d6
|
|
BLAKE2b-256 checksum How to use checksums |
c2f464e116a3dfabb84eab0a333a818ddf03bf6ecd27d04a0f2d98efd856ff66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.16
|
Security for duosql 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.