Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: orm_threadpool&orm_async: fully re-implement, now fully suppor…
…t all APIs in orm_base (#54) This PR fully re-implements the orm_threadpool and orm_async implementation, simplifies and reduce boilerplate code by implementing generic wrapping helpers for wrapping single-thread APIs from ORMBase within thread context. Two types of wrapping helpers are implemented, one is for APIs returing value, another one is for APIs returning generator. Also, considering the typing complexity, this PR splits the ORMBase.orm_delete_entries into two new methods: 1. the normal version of orm_delete_entries which returns deleted row count. 2. orm_delete_entries_with_returning, which enables returning stmt on DELETE. With the help of the new mechanism introduced by this PR, now all APIs from ORMBase(except for orm_con) are supported in orm_threadpool and orm_async. BREAKING: now ORMThreadPool and AsyncORMThreadPool are NOT subclass of ORMBase anymore, they are standalone separated types. BREAKING: for users previously using ORMBase.orm_delete_entries with returning stmt, now they should switch to use ORMBase.orm_delete_entries_with_returning.
- Loading branch information
af30f3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report