All Projects → Devs-Garden → Jsonbase

Devs-Garden / Jsonbase

Licence: apache-2.0
A database software completely built as JSON files in backend. A powerful, portable and simple database works on top of JSON files. It is like a database software, currently having basic CRUD operation features. You can use this as a backend for your ReST APIs as well. The software is completely free and opensource. We are coming up with new features and providing more updates. The another beautiful advantage with JSON-base is since it is a NPM module, this fits well in your nodeJs applications eco system. if you want to develop quick prototypes/poc or need of a database with minimal requirements then, JSONBASe is an must option that you can consider. However there is a limitation if you go beyond a million records per table.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jsonbase

Firebird
Firebird server, client and tools
Stars: ✭ 522 (-5.43%)
Mutual labels:  database
Nitrite Java
Java embedded nosql document store
Stars: ✭ 538 (-2.54%)
Mutual labels:  database
Couchdb
Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
Stars: ✭ 5,166 (+835.87%)
Mutual labels:  database
Laravel Eloquent Query Cache
Adding cache on your Laravel Eloquent queries' results is now a breeze.
Stars: ✭ 529 (-4.17%)
Mutual labels:  database
Kakapo.js
🐦 Next generation mocking framework in Javascript
Stars: ✭ 535 (-3.08%)
Mutual labels:  database
Go Sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
Stars: ✭ 539 (-2.36%)
Mutual labels:  database
Qb
The database toolkit for go
Stars: ✭ 524 (-5.07%)
Mutual labels:  database
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (-0.54%)
Mutual labels:  database
Bustub
The BusTub Relational Database Management System (Educational)
Stars: ✭ 534 (-3.26%)
Mutual labels:  database
Entityauditbundle
Audit for Doctrine Entities
Stars: ✭ 546 (-1.09%)
Mutual labels:  database
Cosette
Cosette is an automated SQL solver.
Stars: ✭ 533 (-3.44%)
Mutual labels:  database
Opencypher
Specification of the Cypher property graph query language
Stars: ✭ 534 (-3.26%)
Mutual labels:  database
Imposm3
Imposm imports OpenStreetMap data into PostGIS
Stars: ✭ 542 (-1.81%)
Mutual labels:  database
Docker Oracle 12c
🐳 Docker image with Oracle Database 12c on board
Stars: ✭ 527 (-4.53%)
Mutual labels:  database
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+4711.41%)
Mutual labels:  database
Ozzo Dbx
A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.
Stars: ✭ 523 (-5.25%)
Mutual labels:  database
Corfudb
A cluster consistency platform
Stars: ✭ 539 (-2.36%)
Mutual labels:  database
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (-0.18%)
Mutual labels:  database
Flink Cdc Connectors
Change Data Capture (CDC) Connectors for Apache Flink
Stars: ✭ 546 (-1.09%)
Mutual labels:  database
Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (-1.09%)
Mutual labels:  database

Json-Base

A database software completely built as JSON files in backend. A powerful, portable and simple database works on top of JSON files. It is like a database software, currently having basic CRUD operation features. You can use this as a backend for your ReST APIs as well. The software is completely free and opensource. We are coming up with new features and providing more updates. The another beautiful advantage with JSON-base is since it is a NPM module, this fits well in your nodeJs applications eco system. if you want to develop quick prototypes/poc or need of a database with minimal requirements then, JSONBASe is an must option that you can consider. However there is a limitation if you go beyond a million records per table.

@@ Currently in Pre-Alpha Version @@

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Checkout the below examples to know how to use the JSON-Base built in APIs.

Installing

A step by step series of examples that tell you how to get started with JSON-Base

npm i @syamdanda/json-base

And then import the json-base npm module into your nodejs application

var jsonDB = require('@syamdanda/json-base');

Documentation

Check-out the below code snippets to use the JSON-Base module in your application.

Database Operations

  • To create database
let options = {
  'name': 'myDatabase'
};
jsonDB.createDatabase(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To delete database
let options = {
  'name': 'myDatabase'
};
jsonDB.dropDatabase(options, function(response) {
	console.log(JSON.stringify(response));
});

⬆ Back to Top

  • Table Operations

    • To create table
let options = {
  'database': 'myDatabase',
  'tableName': 'Users'
};

jsonDB.createTable(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To drop table
let options = {
  'database': 'myDatabase',
  'tableName': 'Users'
};

jsonDB.dropTable(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To insert record table
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'record': {'email': '[email protected]', 'phone': '+1 1234567890', 'name': 'userName'}
};

jsonDB.insertRecord(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To insert more than one record
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'records': [{'email': '[email protected]', 'phone': '+1 1234567890', 'name': 'userName'},{'email': '[email protected]', 'phone': '+1 1234567890', 'name': 'userName2'}]
};

jsonDB.batchInsert(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To get record by Id
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'recordId': 1
};

jsonDB.getRecordById(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To get record by key value

If you want to search and retrieve a record based on some key and value use the below method.

let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'key': 'email', 
   'value': '[email protected]'
};

jsonDB.getRecordByKeyValue(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To get record by more than one key value or object.

If you want to search and retrieve a record based on more than one key and value use the below method.

let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'obj': {'email': '[email protected]', 'phone': '+1 1234567890', 'name': 'userName'}
};

jsonDB.getRecordByObject(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To get records based on search flag you can define any one value for flag
    • beginsWith : searches records whose value is begins with the mentioned value for the key
    • endsWith : searches records whose value is endsWith with the mentioned value for the key
    • contains : searches records whose value contains with the mentioned value for the key
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
  'key': 'email',
  'value': 'gmail',
  'flag': 'contains'
};

jsonDB.getRecordsBySearch(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To get all records from a table
let options = {
  'database': 'myDatabase',
  'tableName': 'Users'
};

jsonDB.getAllRecords(options, function(response) {
  console.log(JSON.stringify(response));
});
  • To delete record by Id
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'recordId': 1
};

jsonDB.deleteRecordById(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To update record by Id
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'recordId': 1,
   'recordObj': {'email': 'new123', 'pwd': 'password'}
};

jsonDB.updateRecordById(options, function(response) {
	console.log(JSON.stringify(response));
});
  • To update record by key value
let options = {
  'database': 'myDatabase',
  'tableName': 'Users',
   'key': 'email',
   'value': '[email protected]',
   'recordObj': {'email': 'new123', 'pwd': 'password'}
};

jsonDB.updateRecordByKeyValue(options, function(response) {
  console.log(JSON.stringify(response));
});

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

  • Issue fixes in 0.1.0 on 01.Jul.2020
  • Added getRecordsBySearch API in 0.0.9 on 01.Jul.2020
  • Documentation and issue fixes in 0.0.8 on 30.Jun.2020
  • Added documentation in 0.0.7 on 29.Jun.2020
  • Current stable version is 0.0.5 which is released on 27.Jun.2020

Authors

See also the list of contributors who participated in this project.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].