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.2.tar.gz (12.9 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.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pancake_mybatis-0.1.2.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pancake_mybatis-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5ca996d73a8d1172ce630d53671ca7976bcda5a0f0ee645f292cccf04d688d22
MD5 6002ca8d5173269f6c09adb3331592b0
BLAKE2b-256 acdc8c169fb7c34c95b46245966082776c877ef09d463352d406912b362f1a99

See more details on using hashes here.

Provenance

The following attestation bundles were made for pancake_mybatis-0.1.2.tar.gz:

Publisher: publish.yml on PancakeFramework/Pancake-Mybatis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pancake_mybatis-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pancake_mybatis-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8c13f6a56b4c7004bc68b873058084b9dcc521931bf57fa34052eecdd14f85f
MD5 25046752132fc56b474a477030c229c9
BLAKE2b-256 378f998858d47bd134ea7ce4680f8541e9d82b475200520561a8dbe8820392ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for pancake_mybatis-0.1.2-py3-none-any.whl:

Publisher: publish.yml on PancakeFramework/Pancake-Mybatis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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