Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

qjs-db

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qjs-db

A lightweight local NoSQL database

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
0
Created
Source

Filexdb

Installation

npm install filexdb

Usage

import FileXdb from 'filexdb'

// Initiate database
const db = new FileXdb('filexdb/data/filex.db')

// Create collection
const User = await db.collection('user')

// Start using database
const user = await User.insertOne({ name: "Sam", email: 'sam@codingsamrat.com' })

Methods

Database Methods

filexdb.collection(collectionName)
filexdb.listCollection()

Collection Methods

await Collection.find(query, option)
await Collection.findOne(query)
await Collection.findById(_id)

await Collection.create(document)
await Collection.insertOne(document)
await Collection.insertMany(documents)

await Collection.deleteOne(query)
await Collection.deleteMany(query)
await Collection.findByIdAndDelete(_id)

await Collection.updateOne(query, payload, option)
await Collection.updateMany(query, payload)
await Collection.findByIdAndUpdate(_if, payload, option)

await Collection.export()

await Collection.count()
await Collection.drop()
await Collection.rename()

More Features

FileXdb is in Beta stage. Currently we have above features only. We will come back to you with other advanced features soon.

You may also contribute in this journey.

Contributing

Thank you for investing your time in contributing to our project! Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community. Any contribution you make will be reflected on github.com/CodingSamrat/FileXdb.js✨.

Contributions to FileXdb are welcome! Here's how to get started:

  • Open an issue or find for related issues to start a discussion around a feature idea or a bug.
  • Fork the repository on GitHub.
  • Create a new branch of the master branch and start making your changes.
  • Make a meaning-full commit.
  • Write a test, which shows that the bug is fixed or the feature works as expected.
  • Send a pull request and wait until it gets merged and published.

Keywords

nosql

FAQs

Package last updated on 17 Nov 2024

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