1.0.21 • Published 3 years ago

decorator-mysql v1.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years 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

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago