Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minato

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minato

Type Driven Database Framework

  • 3.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
increased by6.45%
Maintainers
1
Weekly downloads
 
Created
Source

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
MemorynpmIn-memory driver support
MongoDBnpm
MySQLnpmMySQL 5.7+, MariaDB 10.5
PostgreSQLnpmPostgreSQL 14+
SQLitenpm

Basic Usage

import Database from 'minato'
import MySQLDriver from '@minatojs/driver-mysql'

const database = new Database()

await database.connect(MySQLDriver, {
  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

Keywords

FAQs

Package last updated on 03 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc