Socket
Socket
Sign inDemoInstall

sivka-db

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sivka-db

Fast & simple nodejs db query builder, syntax clone of laravel query builder


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
1.07 MB
Created
Weekly downloads
 

Readme

Source

Nodejs clone of laravel QueryBuilder

This library is very fast and simple querybuilder for nodejs. It do not depends of database server connection timeout, and automatically reconnects when server has gone away. Realized almost all features of laravel DB and some sugar added.

Documentation is available in two languages

  • english
  • russian

Getting Started

Installing

npm i sivka-db

Simple example

const config = {
    host: 'localhost',
    user: 'root',
    password: 'root',
    database: 'test',
    port: 3306 // optional, default is 3306
};

const db = require('sivka-db')(config);

(async () => {
	
	let user = await db.table('users').where('id', 1).first(); // or

	user = await db.table('users').find(1);

	let users = await db.table('users').
		where('name', '!=', 'John').orWhere('surname', 'Dou').get(); 

})();

Full documentation read here

Built With

License

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

Keywords

FAQs

Last updated on 12 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc