3.2.0 • Published 16 days ago

minato v3.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
16 days ago

minato

Codecov downloads npm GitHub

Type Driven Database Framework.

Features

  • Compatibility. Complete driver-independent. Supports many drivers with a unified API.
  • Powerful. It can do everything that SQL can do, even though you are not using SQL drivers.
  • Well-typed. Minato is written with TypeScript, and it provides top-level typing support.
  • Extensible. Simultaneous accesss to different databases based on your needs.
  • Modern. Perform all the operations with a JavaScript API or even in the browser with low code.

Driver Supports

DriverVersionNotes
MySQLnpmMySQL 5.7, MySQL 8.0, MariaDB 10.5
MongoDBnpm
SQLitenpm
MemorynpmIn-memory driver support

Basic Usage

import { Database } from 'minato'

const database = new Database()

await database.connect('mysql', {
  host: 'localhost',
  port: 3306,
  user: 'root',
  password: '',
  database: 'minato',
})

Data Definition

database.extend('user', {
  id: 'number',
  name: 'string',
  age: 'number',
  money: { type: 'number', initial: 100 },
}, {
  primary: 'id',
  autoInc: true,
})

Simple API

create

const user = await driver.create('user', {
  name: 'John',
  age: 20,
}) // { id: 1, name: 'John', age: 20, money: 100 }

get

remove

set

upsert

Selection API

Using TypeScript

Using Multiple Drivers

3.2.0

16 days ago

3.1.1

1 month ago

3.1.0

1 month ago

3.0.2

2 months ago

3.0.1

3 months ago

3.0.0-alpha.1

3 months ago

3.0.0

3 months ago

3.0.0-alpha.0

3 months ago

2.9.0

3 months ago

2.8.1

5 months ago

2.8.0

5 months ago

2.7.0

5 months ago

2.6.1

6 months ago

2.6.0

6 months ago

2.5.0

6 months ago

2.4.1

8 months ago

2.4.3

7 months ago

2.4.2

8 months ago

2.4.0

9 months ago

2.3.2

11 months ago

2.3.0

1 year ago

2.1.2

1 year ago

2.2.0

1 year ago

2.3.1

1 year ago

2.2.2

1 year ago

1.3.2

2 years ago

2.0.3

1 year ago

2.1.1

1 year ago

2.0.2

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.10

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

0.0.1

2 years ago