A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.

Overview

What is dbcopycat

A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.

⚡️ Abilities

  • Creates the file where the json data is kept in the main directory.
  • Adds easy and persistent data to json.
  • Deletes data in json.
  • Updates data in json.
  • Retrieves data in json.
  • Fetch data by id in json

Getting started

Install Database Copycat

npm i -g dbcopycat

Then...

dbcopycat init

Generates a db.json file with some data

Commands

🟦 getAll()

Fetch all data

const dbcopycat = require('dbcopycat');

var data = dbcopycat.getAll();

🟦 getById(arrayName, dataId)

Returns the data that matches the data id

const dbcopycat = require('dbcopycat');

dbcopycat.getById(arrayName, dataId);

🟦 add(arrayName, data)

Adds data to data

const dbcopycat = require('dbcopycat');

var data = {
    "id": 2,
    "categoryId": 1,
    "productName": "Chang",
    "quantityPerUnit": "24 - 12 oz bottles",
    "unitPrice": "21",
    "unitsInStock": 17
}

dbcopycat.add("arrayName", data);

🟦 deleteById(arrayName, dataId)

Deletes data that matches the data ID

const dbcopycat = require('dbcopycat');

dbcopycat.deleteById(arrayName, dataId);

🟦 update(arrayName, data)

Updates data that matches the data id

const dbcopycat = require('dbcopycat');

dbcopycat.update(arrayName, data);

🟦 filter(arrayName, condition)

Filters data by condition

const dbcopycat = require('dbcopycat');

dbcopycat.filter("arrayName", x => x.id == 1)

🟦 find(arrayName, condition)

Returns a single data suitable for the condition

const dbcopycat = require('dbcopycat');

dbcopycat.find("arrayName", x => x.categoryid == 1)
You might also like...

Simple CRUD application with Nestjs, Prisma and Docker with Postgres

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Nov 6, 2022

First NestJS project powered by TypeScript (Simple CRUD)

First Nest TS (TypeScript) First NestJS project powered by TypeScript (Simple CRUD) Routes Get All GET http://localhost:3000/products/ Get one GET htt

Feb 22, 2022

Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion

safety-catch Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion. npm install safety-catch Tri

May 4, 2022

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely.

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely.

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fast, stores the Cache before stopping and restores it again! it uses ENMAP

Dec 18, 2022

The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database.

The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database.

The Wholesome App. A project that allows you to upload images directly to MongoDB Atlas into your collection, a faster cloud database. To upload your cute and wholesome images.

Jul 17, 2022

Bluzelle is a smart, in-memory data store. It can be used as a cache or as a database.

SwarmDB ABOUT SWARMDB Bluzelle brings together the sharing economy and token economy. Bluzelle enables people to rent out their computer storage space

Dec 31, 2022

membuat sebuah module pengganti database engine untuk mengelola data secara advance

membuat sebuah module pengganti database engine untuk mengelola data secara advance

Donate Sosial Media Introduction Database atau basis data adalah kumpulan data yang dikelola sedemikian rupa berdasarkan ketentuan tertentu yang salin

Dec 17, 2021

A Node.js library for retrieving data from a PostgreSQL database with an interesting query language included.

RefQL A Node.js library for retrieving data from a PostgreSQL database with an interesting query language included. Introduction RefQL is about retrie

Nov 2, 2022

Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.

Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.

Azure Data Studio is a data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.

Dec 31, 2022
Comments
  • add function minor bugs are fixed and json writing is edited

    add function minor bugs are fixed and json writing is edited

    Bug Fix

    1. When you want create a new array then add a new value to it, it was impossible. Now you can create a new array with add() function.
    2. When array accidiently edited to a different data type, add function gives an error about it.

    Version Fix

    1. package-lock.js versions fixed with latest version v0.3.2

    Json Writing Edit

    1. Now when you add a new data, it looks more readable.
    opened by mertssmnoglu 0
Releases(v0.5.1)
Owner
İsmail Can Karataş
Web Developer
İsmail Can Karataş
A database library stores JSON file for Node.js.

concisedb English | 简体中文 A database library stores JSON file for Node.js. Here is what updated every version if you want to know. API Document Usage B

LKZ烂裤子 3 Sep 4, 2022
Fast File is a quick and easy-to-use library to convert data sources to a variety of options.

Fast File Converter The Express.js's Fast File Converter Library Fast File Converter Library is a quick and easy-to-use library to convert data source

Ali Amjad 25 Nov 16, 2022
🔥 Dreamy-db - A Powerful database for storing, accessing, and managing multiple database.

Dreamy-db About Dreamy-db - A Powerful database for storing, accessing, and managing multiple databases. A powerful node.js module that allows you to

Dreamy Developer 24 Dec 22, 2022
DolphinDB JavaScript API is a JavaScript library that encapsulates the ability to operate the DolphinDB database, such as: connecting to the database, executing scripts, calling functions, uploading variables, etc.

DolphinDB JavaScript API English | 中文 Overview DolphinDB JavaScript API is a JavaScript library that encapsulates the ability to operate the DolphinDB

DolphinDB 6 Dec 12, 2022
GraphQL API Playground with cascade-like operations

modif ( ?? ?? ?? ) modif is a small GraphQL API with transform capabilities. It takes a string input and outputs a string. Always. TL;DR Go play with

Pedro Palhari 6 Jan 4, 2022
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023
An easy-to-use discord bot including database, slash commands and context menus !

Discord Bot Template An easy-to-use discord bot using Discord.JS V13. Wiki Includes: Slash commands Database User commands and more in future Requirem

Gonz 108 Dec 28, 2022
A simple easy-to-use database, built for beginners.

ByteDatabase: Built for Beginners Table of Content Features Installation Changelog Quick Examples Contributors Features Persistent Storage: Data store

CloudTeam 9 Nov 20, 2022
⚡️ lowdb is a small local JSON database powered by Lodash (supports Node, Electron and the browser)

Lowdb Small JSON database for Node, Electron and the browser. Powered by Lodash. ⚡ db.get('posts') .push({ id: 1, title: 'lowdb is awesome'}) .wri

null 18.9k Dec 30, 2022
Database in JSON, fast and optimize

?? Database-Dev ?? DevNetwork#2103 ?? V 1.0.0 ?? Dependence Libs use ?? NodeJs V 16.14.2 (NodeJs) ?? fs (nodeFS) ?? Use libs import the file in your p

DevNetwork™️ 3 Apr 21, 2022