Giter Club home page Giter Club logo

dbms's Introduction

Node Database Management System (ORM)

Professional Support Chat with contributors NPM version NPM downloads MIT License

  • Documentation
  • installation $ npm install dbms
  • supports Total.js NoSQL embedded
  • supports PostgreSQL and MongoDB

Initialization

const dbms = require('dbms');

dbms.init([alias], connection_string);
// @alias {String} Optional, alias for connection string (default: 'default')
// @connection_string {String} A connection string to DB

// PostgreSQL
dbms.init('postgresql://user:pass@localhost:5432/dbname');
dbms.init('mypg', 'postgresql://user:pass@localhost:5432/dbname'); // with a name for more DB engines

// Total.js NoSQL embedded
dbms.init('nosql');
dbms.init('mynosql', 'nosql'); // with a name for more DB engines

// Total.js Table
dbms.init('table');
dbms.init('mytable', 'nosql'); // with a name for more DB engines

Simple usage

// Is a global method
var db = DBMS();

// Finds records
// A response: Array
// returns QueryBuilder
db.find('collection_table_name');
db.find('mypg/collection_table_name');
db.find('mynosql/collection_table_name');
db.find('mytable/collection_table_name');

// Finds the one record
// A response: Object
// returns QueryBuilder
db.one('collection_table_name');
db.one('mypg/collection_table_name');
db.one('mynosql/collection_table_name');
db.one('mytable/collection_table_name');

// Inserts a new record
// A response: Number
// returns QueryBuilder
db.insert('collection_table_name', document, [unique]);
db.insert('mypg/collection_table_name', document, [unique]);
db.insert('mynosql/collection_table_name', document, [unique]);
db.insert('mytable/collection_table_name', document, [unique]);

Contributors

Contributor Type E-mail
Peter Širka author + support [email protected]
Martin Smola contributor + support [email protected]

Contact

Do you have any questions? Contact us https://www.totaljs.com/contact/

Professional Support Chat with contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.