Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

daclusta

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daclusta

An in memory and file based database that can run on multiple threads

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

daclusta

Build Status David DM GitHub code size in bytes GitHub package.json version GitHub

An in memory/file based database that can run on multiple threads.

Installation

npm i --save daclusta

Usage

const db = require('daclusta').promises

async function example () {
  const connection = await db.connect('./db.json');

  const insertedRecord = await db.post(connection, {
    firstName: 'Joe',
    lastName: 'Bloggs
  });

  const readRecord = await db.get(connection, insertedRecord.meta.id);

  await db.close(connection);

  // readRecord.doc === { example: 1 }
}

example()

API

MethodArgumentsDescription
Connection
These methods control opening and closing database connections.
1.1.connectfilenameConnect to a database. Will create if does not exist.
1.2.closeconnectionClose a connection.
Actions
These methods allow operating on a connection
2.1.getconnection, idGet a record on a database by id.
2.2.postconnection, recordCreate a new record on a database.
2.3.putconnection, id, newRecordReplace an existing record with another on a database.
2.4.patchconnection, id, partialRecord, Set some properties on an existing record on a database.
2.5.delconnection, idDelete an existing record on a database.
2.6.addListenerconnection, handlerListen to changes.
2.7.removeListenerconnection, handlerStop listening to changes.

License

This project is licensed under the terms of the AGPL-3.0 license.

FAQs

Package last updated on 20 May 2020

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