Python OR mapping tools
Project description
PyODBC DbAccess
There are 3 tools in the library:
- OR mapping: assume object property name matches database columns
- row to object:
pypigeonhole_dbaccess.obj_mapper.row_to_obj()
- rows to list of object:
pypigeonhole_dbaccess.obj_mapper.query_list()
- generate sql statements for insert
- generate select statement based on an object. This is not natural.
- may have to handle _name and __name cases because of property.
- row to object:
- Local transaction manager:
pypigeonhole_dbaccess.tx_manager
It handles nested transactions, i.e., if any part of database operations fails, all operations rollback. - Bulk SQL uploader: To insert one row into a database, we use
insert into <table> (?, ?, ..., ?) values (...)
To insert many rows,
insert into <table> (?, ?, ..., ?) values (...), (...), ..., (...)
and then batch them. Python twists the insert statements withexecutemany()
.
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 Distribution
Built Distribution
Close
Hashes for pypigeonhole-dbaccess-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 142ef9cc3637a9cf3c0bab9afe5b2ccf438d3d4d88cebb2aa8aa176156e07e2c |
|
MD5 | a2674882126a1242ac1a6414097a80ab |
|
BLAKE2b-256 | d9e88abd388e31584ce1eecf548b53a98efbccd3209eb2fc1f683927d9ec6175 |
Close
Hashes for pypigeonhole_dbaccess-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfc766b8ad2b2cc88459360a067b43057eed7d3227a44491b100b53330ccbbef |
|
MD5 | 404b9d0853f545dbe812aa9bddf28399 |
|
BLAKE2b-256 | 0a42b43c8b193f59256d4c929e289b4831f9960bada65a30c095d0281d7a1fc0 |