🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

simdatabase

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

simdatabase

A simple module for storing and managing data

1.0.0
unpublished
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Installing

Just installing module

$ npm install simple-databse

Quick start

Creating file with

import { SimpleDatabase } from 'simple-database'
const simd = new SimpleDatabase('example.simd')

Adding table columns

simd.addColumn('id', 'number', {
  unique: true
})

// or multi-adding columns

simd.addColumns([{
  name: 'name',
  type: 'string',
  default: 'No Name',
  unique: true
}, {
  name: 'suranme',
  type: 'string',
  unique: true
}])

Insert, update and delete data from table

// inserting into table
simd.insert({
  id: 12345,
  name: 'Kio',
  surname: 'gia'
})

// updating columns where "id" == 12345
simd.update({
  surname: 'Gia'
}, {
  column: 'id',
  operand: 12345
}) 

// delete columns where "name" != Kio
simd.delete({
  column: 'name',
  operator: '!=',
  operand: 'Kio'
})

Getting data

// selecting rows where "name" == Kio
simd.select({
  column: 'name',
  operand: 'Kio'
})
// returns [] 

// or selecting rows where unique column "id" == 12345
simd.selectByUnique({
  column: 'id',
  operand: 12345
})
// returns {} or undefined

// forEach loop 
simd.forEach((row, rowIndex, rows) => {
  // some operation
})

// or select all rows 
simd.getAll
// returns []

Classes

SimpleDatabase

Soon...

Visualizer

Soon...

Keywords

database

FAQs

Package last updated on 22 Jan 2023

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