2.2.2 • Published 3 years ago

mysql_help v2.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

mysql_help

文档链接 https://www.yuque.com/docs/share/411375d9-d449-43d1-921f-c338f3345afe

QuickStart

Development

app.js

const config = require('./config.json');

npm install mysql_help --save

const mysqlHelp = require('mysql_help')

mysqlHelp.config(config)

other.js

  const mysqlHelp = require('mysql_help') // 引用

  let userTable = new mysql_help('user')  // 实例化 user 表

  userTable.getAllRows().then(function(data){
    console.log(data)
  })

test

  const mysqlHelp = require('mysql_help')

  mysql_help.config({
    "mysql": {
        "host": "127.0.0.1",
        "port": "3306",
        "user": "root",
        "password": "12345678",
        "db": "user",
        "env": "dev" 
    },
    // 可选参数配置(自动在数据库创建 app 表(数据库中存在 'app' 表, 不会创建))
    <!-- "tables": {
        "app": {
            "id": "",  // 默认创建
            "name": "" // 默认创建
        }
    } -->

  }, function(cf){

    let userTable = new mysql_help('user')
    userTable.getAllRows().then(function(data){
      console.log(data)
    })

  })

一张表只标记一个主键,当有多个主键时,按顺序标记第一个。

2.2.0

3 years ago

2.2.2

3 years ago

2.1.221

5 years ago

2.2.1

6 years ago

2.1.21

6 years ago

2.1.24

6 years ago

2.1.23

6 years ago

2.1.22

6 years ago

2.1.20

6 years ago

2.1.19

6 years ago

2.1.17

6 years ago

2.1.15

6 years ago

2.1.13

6 years ago

2.1.11

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.0.1

6 years ago

1.1.2

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago