# yn-mysql-utils

> A secondary package plugin for mysql database operations

Latest version **1.0.4** (published 2018-10-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install yn-mysql-utils
pnpm add yn-mysql-utils
yarn add yn-mysql-utils
bun add yn-mysql-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-10-30 |
| First published | 2018-10-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | bmy |
| Maintainers | bmy |
| Keywords | mysql |

## Links

- npm: https://www.npmjs.com/package/yn-mysql-utils
- Repository: https://github.com/tb01923/koa-mysql-session
- Homepage: https://github.com/tb01923/koa-mysql-session#readme
- Issues: https://github.com/tb01923/koa-mysql-session/issues
- npm.io page: https://npm.io/package/yn-mysql-utils

## Dependencies (1)

- [mysql](https://npm.io/package/mysql.md) ^2.16.0

## Recent versions

- 1.0.4 (latest) — 2018-10-30
- 1.0.3 — 2018-10-30
- 1.0.2 — 2018-10-30
- 1.0.0 — 2018-10-30

## README

# yn-mysql-utils


The simple secondary packaging of the [mysql](https://github.com/mysqljs/mysql) database plug-in is easy to use in the project, improve project development efficiency and reduce development costs!


## Install

---

```bash
npm install yn-mysql-utils --save
```

**Or**

```bash
cnpm install yn-mysql-utils --save
```

## Usage

---

```js
const mysql = require('yn-mysql-utils')
```

## Example

---

```js
// Incoming configuration, same as mysql
let data = new mysql({
    host     : '127.0.0.1',
    user     : 'root',
    password : 'lb714500',
    database : 'SmallActivity',
    connectionLimit : 10
})

/**
 * Start query
 * sql: Query sql statement, string type
 * par: Query parameter, array type
 */
data.Query({
    sql: 'select * from activity_page where id = ?',
    par: [ 2 ]
}).then(res => {
    // Get the query result
    console.log(res)
    
  
    /* Data example

    [ RowDataPacket {
       id: 2,
       page_title: '红包拿不停',
       page_starttime: '2018-10-28 18:45:14',
       page_endtime: '2018-10-31 18:45:14',
       page_limit: '200' } 
    ] 
    */
})

```

## other methods

---

You can also use `await` or `async` in your project.

---
_Source: https://npm.io/package/yn-mysql-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
