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.3.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.3-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pancake_mybatis-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2a0e815c924f02761981bd336eeb1b1e740fd2d598cc2d87096463c1f94df905
MD5 eac97d969bb79eba6ccc16a0ff4b0c51
BLAKE2b-256 644a584bd7d20071a448f218992a08bd3df883d4fad8c0e61852551e756e2556

See more details on using hashes here.

Provenance

The following attestation bundles were made for pancake_mybatis-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pancake_mybatis-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 036ebdbe3f6716800b191f85a799c68d64271f6605c49e83ea2576e528e2e2a2
MD5 bc5c97c4b998fca699d51f176b94b440
BLAKE2b-256 876b0cce08d951654509f188cdb0d15df6dba82d04a4bc557a8567b235b0bbb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pancake_mybatis-0.1.3-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