# db-unify

> A library to unify the database access for different database engines

Latest version **1.0.3** (published 2023-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install db-unify
pnpm add db-unify
yarn add db-unify
bun add db-unify
```

## 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.3 |
| Published | 2023-10-03 |
| First published | 2023-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 26.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shafi S.Almutairi |
| Maintainers | ssalmutairi |

## Links

- npm: https://www.npmjs.com/package/db-unify
- Repository: https://github.com/ssalmutairi/db-unify
- Homepage: https://github.com/ssalmutairi/db-unify#readme
- Issues: https://github.com/ssalmutairi/db-unify/issues
- npm.io page: https://npm.io/package/db-unify

## Dependencies (8)

- [pg](https://npm.io/package/pg.md) ^8.11.3
- [mysql2](https://npm.io/package/mysql2.md) ^3.6.1
- [mariadb](https://npm.io/package/mariadb.md) ^3.2.1
- [sqlite3](https://npm.io/package/sqlite3.md) ^5.1.6
- [tedious](https://npm.io/package/tedious.md) ^16.4.1
- [oracledb](https://npm.io/package/oracledb.md) ^6.1.0
- [pg-hstore](https://npm.io/package/pg-hstore.md) ^2.3.4
- [sequelize](https://npm.io/package/sequelize.md) ^6.33.0

## Recent versions

- 1.0.3 (latest) — 2023-10-03
- 1.0.2 — 2023-10-03
- 1.0.1 — 2023-10-03
- 1.0.0 — 2023-10-03

## README

# DB-Unity

Unified database operations made easy. Manage, control, and perform unified actions on multiple databases with a single interface.

## Features

- **Unified Interface**: Seamlessly interact with different databases like MySQL, PostgreSQL, SQLite, and MSSQL with one interface.
- **User Management**: Create, update, and list users across databases.

- **Permissions**: Grant and revoke user permissions on specific tables or entire databases.

- **Safety**: Parameterized queries to avoid SQL injection vulnerabilities.

## Installation

```bash
npm install db-unity
```

## Usage

### Initialize

```javascript
const DBUnity = require("db-unity");
const db = new DBUnity("mysql", connectionOptions);
```

### Create a User

```javascript
db.createUser("newUser", "securePassword");
```

### Grant Permissions

```javascript
db.grantPrivileges("newUser", "read", "myDatabase", "*");
```

### List Users

```javascript
const users = db.listUsers();
console.log(users);
```

... [Add more usage examples as needed]

## Contributing

1. Fork the repository.
2. Create your feature branch (`git checkout -b feature/my-new-feature`).
3. Commit your changes (`git commit -am 'Add my new feature'`).
4. Push to the branch (`git push origin feature/my-new-feature`).
5. Open a new pull request.

## License

This project is licensed under the MIT License - see the `LICENSE` file for details.

---

Remember to modify, add, or remove sections to better align with the specifics of `db-unity`. Including screenshots, detailed API documentation, and other relevant sections can make your readme even more helpful for users.

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