Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fx-kirin/kanimysql
https://github.com/fx-kirin/kanimysql
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/fx-kirin/kanimysql
- Owner: fx-kirin
- License: mit
- Created: 2022-05-23T08:36:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T05:15:20.000Z (over 1 year ago)
- Last Synced: 2024-11-12T23:39:38.074Z (2 months ago)
- Language: Python
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#KaniMySQL
This is the fork from DictMySQL and change it to use AttrDict and use like ORM.
## Concept
While developping with ORM such as SQLAlchemy, ORM object management can execute unexpected queries. Especially after commit execution, all the objects need to execute SELECT query in the case of changing values. It is not a few times unnecessary. So KaniMySQL does require select queries when accessing a modified object. And update method is needed to apply changes to the DB.
## How to use
All table must have autoincrement column named `id` like SQLAlchemy.Anything else, just see the `example.py`. `where` method is mostly same as `DictMySQL`.