Skip to main content

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.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pancake_mybatis-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file pancake_mybatis-0.1.0.tar.gz.

File metadata

  • Download URL: pancake_mybatis-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pancake_mybatis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f11e3fc93e25079c76bce6d5f0524e6c771dbf8591cc48c72747f75a81e787a9
MD5 e20a683df9bb22c15978ae4bdbca1cef
BLAKE2b-256 98f555e80bca5248a422625f81543b6fb8432d79bfddf5f20114ce4139bb684c

See more details on using hashes here.

File details

Details for the file pancake_mybatis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pancake_mybatis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3815c1cb0b2a7e0a22f7cb6e299633d58f2d86fc6989619a2ec7f81000dff82
MD5 6220707bf8c52eed57e861c50f3fb10d
BLAKE2b-256 62dbcee8d56eac2c2e8364274a7c3cb5d78383800c635b5ac3e76f27f5f51c12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page