# yf-jsql

> A simple sql queries translation to javascript.

Latest version **1.0.6** (published 2018-10-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install yf-jsql
pnpm add yf-jsql
yarn add yf-jsql
bun add yf-jsql
```

## 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.6 |
| Published | 2018-10-08 |
| First published | 2018-04-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yf |
| Maintainers | yufe |
| Keywords | sql, mysql, javascript |

## Links

- npm: https://www.npmjs.com/package/yf-jsql
- Repository: https://github.com/zh68319220/yf-jsql
- Homepage: https://github.com/zh68319220/yf-jsql#readme
- Issues: https://github.com/zh68319220/yf-jsql/issues
- npm.io page: https://npm.io/package/yf-jsql

## Dependencies (1)

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

## Recent versions

- 1.0.6 (latest) — 2018-10-08
- 1.0.5 — 2018-09-26
- 1.0.4 — 2018-09-26
- 1.0.3 — 2018-09-25
- 1.0.2 — 2018-09-03
- 1.0.1 — 2018-05-26
- 1.0.0 — 2018-04-17

## README

# yf-jsql
A simple sql queries translation to javascript
## Install
```sh
$ npm install yf-jssql
```
### Setting up our database
The first thing we need to do is setup a database.

```js
const Jsql = require('yf-jssql');

let jsql = new Jsql({
  port: 3000,
  database: {
    DATABASE: 'hospital',
    USERNAME: 'root',
    PASSWORD: 'fly',
    PORT: '3306',
    HOST: 'localhost'
  }
});

async function excute() {
  let data = await jsql.select('article', {id: 2}, ['id']).page(5, 0);
  console.log(data);
  data = await jsql.one('article', {id: 2}, ['id', 'title', 'description', 'content', 'create_time']);
  console.log(data);
}

excute();
```

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