# medoo.js

> A simple tool for database access, work for node.

Latest version **1.1.13** (published 2019-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install medoo.js
pnpm add medoo.js
yarn add medoo.js
bun add medoo.js
```

## 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.1.13 |
| Published | 2019-11-19 |
| First published | 2019-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 36 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Author | Smokey |
| Maintainers | smokey019 |
| Keywords | node, database, mysql |

## Links

- npm: https://www.npmjs.com/package/medoo.js
- Repository: https://github.com/smokey019/medoo.js
- Homepage: https://github.com/smokey019/medoo.js#readme
- Issues: https://github.com/smokey019/medoo.js/issues
- npm.io page: https://npm.io/package/medoo.js

## Dependencies (1)

- [mysql2](https://npm.io/package/mysql2.md) ^1.2.0

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 1.1.13 (latest) — 2019-11-19
- 1.1.12 — 2019-11-17
- 1.1.11 — 2019-11-17
- 1.1.1 — 2019-11-17
- 1.1.0 — 2019-11-17

## README

># medoo.js
_medoo_ is js version of [catfan/Medoo](https://github.com/catfan/Medoo).

_medoo_ write based on ES7 async/wait.

This version is based on [mbossX/medoo](https://github.com/mbossX/medoo) for javascript.

Only works with MySQL.

Uses pools to query instead of standard.

># Usage
## Install
`npm i medoo.js`
## Use
```javascript
const Medoo = require('medoo');
const Setting = {
    host: 'localhost',
    port: 3306,
    database: 'database',
    user: 'user',
    password: 'password',
    waitForConnections: true,
	connectionLimit: 250,
	queueLimit: 0,
	charset: 'utf8mb4',
	debug_mode: true
}
let medoo = new Medoo(Setting);
await medoo.setup(); // this code must call in a async function
```
## method list
```javascript
    setup(option = null)
    release()
    select(table, join, columns = null, where = null)
    insert(table, datas)
    delete(table, where)
    update(table, data, where = null)
    get(table, join = null, columns = null, where = null)
    has(table, join, where = null)
    count(table, join, column, where = null)
    max(table, join, column = null, where = null)
    min(table, join, column = null, where = null)
    avg(table, join, column = null, where = null)
    sum(table, join, column = null, where = null)
    alter(table, action, column)
    action(actions)
```
Usage of _medoo_ is simply like medoo.php, please read [catfan/Medoo doc](http://medoo.in/doc) here is just a little dif.
>As in php, object is use [] to init, but in javascript it use {}.
>So just change [] to {} if nessesary.

># Todo list
* support for other DBs

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