1.0.21 • Published 1 year ago

decorator-mysql v1.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

decorator-mysql

爱用装饰器风格查询MySQL的框架一枚鸭~

文档:文档网站

安装

npm i decorator-mysql

快速开始

  1. 初始化数据源

    import { initMysql } from "decorator-mysql";
    
    const pool = initMysql({
        host: 'localhost',
        user: 'root',
        password: '123456',
        database: 'decorator_mysql',
        port: 3306,
        connectionLimit: 10,
    });
  2. 查询装饰器

    import { Select, SelectResults } from 'decorator-mysql'
    
    @Select('select * from user')
    selectUserById: () => SelectResults<any>
  3. 使用

    await new xxx().selectUserById()

趣味对比

疑问交流

暂无

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.11

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago