Pancake MyBatis Plus Plugin — 异步 ORM,支持 CRUD、链式查询、动态 SQL
Project description
Pancake MyBatis Plus
Pancake 框架的 MyBatis Plus ORM 插件,提供异步数据库操作。
Features
- @Mapper 注解 — 标记 Mapper 类,自动注册到 IoC 容器
- BaseMapper — 内置 CRUD 方法(select_by_id, insert, update_by_id, delete_by_id 等)
- SQL 注解 — @Select, @Insert, @Update, @Delete 自定义 SQL
- 链式查询 — QueryWrapper / UpdateWrapper 构造条件
- 动态 SQL —
<if>,<where>,<choose>标签支持
Quick Start
from dataclasses import dataclass
@Mapper
class UserMapper(BaseMapper):
@dataclass
class User:
id: int = None
name: str = None
age: int = None
_entity_class = User
_table_name = "users"
@Select("SELECT * FROM users WHERE name = #{name}")
async def find_by_name(self, name: str) -> list[User]: ...
Configuration
mybatis:
database:
url: resource/db/app.db
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pancake_mybatis-0.1.1.tar.gz
(12.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pancake_mybatis-0.1.1.tar.gz.
File metadata
- Download URL: pancake_mybatis-0.1.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b958589ac9534c8eff7611b44d8261d482ca27a2af8518bf30f3139907ac7090
|
|
| MD5 |
5019bb0bd9f95ce7146f334599c8f9ea
|
|
| BLAKE2b-256 |
aad01f5472403e0fea76a5abb8aaf0c84e13bce1d8926db972d4b42efa2ec890
|
File details
Details for the file pancake_mybatis-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pancake_mybatis-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0db47fd2cddb0810fe0cff84713af570c2d388abe5be79227bb7e5b9ef64d4fc
|
|
| MD5 |
0eb0a8e6afd8248b98625116f2cae848
|
|
| BLAKE2b-256 |
3181bc3f74df313a477ef2443ad14aa5bd3e20586517ce22f3919045662d5c27
|