Metadata-Version: 2.4
Name: pancake-mybatis
Version: 0.1.1
Summary: Pancake MyBatis Plus Plugin — 异步 ORM，支持 CRUD、链式查询、动态 SQL
License: MIT
License-File: LICENSE
Author: drayee
Author-email: 1473443474@qq.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: all
Provides-Extra: mysql
Provides-Extra: postgres
Provides-Extra: sqlite
Requires-Dist: aiomysql (>=0.2.0,<0.3.0) ; extra == "mysql" or extra == "all"
Requires-Dist: aiosqlite (>=0.20.0,<0.21.0) ; extra == "sqlite" or extra == "all"
Requires-Dist: asyncpg (>=0.30.0,<0.31.0) ; extra == "postgres" or extra == "all"
Requires-Dist: pancake_framework (>=0.2.0)
Description-Content-Type: text/markdown

# 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

```python
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

```yaml
mybatis:
  database:
    url: resource/db/app.db
```

## License

MIT

