https://github.com/plexidev/quick.db

An easy, open-source, Node.js database designed for complete beginners getting into the concept of coding.

https://github.com/plexidev/quick.db

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

beginners-friendly database easy-to-use hacktoberfest nodejs open-source sqlite3

Keywords from Contributors

example plagiarism-checker communication snapshot-testing sequences symbolic-computation fitting projection zsh-plugin interactive
Last synced: 5 months ago · JSON representation

Repository

An easy, open-source, Node.js database designed for complete beginners getting into the concept of coding.

Basic Info
  • Host: GitHub
  • Owner: plexidev
  • License: mit
  • Language: TypeScript
  • Default Branch: dev
  • Homepage: http://docs.plexidev.org/
  • Size: 5.37 MB
Statistics
  • Stars: 325
  • Watchers: 5
  • Forks: 100
  • Open Issues: 5
  • Releases: 10
Archived
Topics
beginners-friendly database easy-to-use hacktoberfest nodejs open-source sqlite3
Created over 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Quick.db Logo

Need a powerful, low-cost VPS for hosting your applications & bots 24/7? Check out our partner, Contabo! 🎉

Auto Generated Docs docs
Guide Guide
Support: discord.gg/plexidev
NPM: npmjs.com/quick.db

Quick.db is an open-source package meant to provide an easy way for beginners and people of all levels to access & store data in a low to medium volume environment. All data is stored persistently via either better-sqlite3, mysql2, pg or mongoose and comes way various other quality-of-life features.

  • Persistent Storage - Data doesn't disappear through restarts
  • Multiple Drivers - SQLite, MySQL, Postgres, Mongoose
  • Works out of the box - No need to set up a database server, all the data is stored locally in the same project
  • Beginner Friendly - Originally created for use in tutorials, the documentation is straightforward and jargon-free
  • & more...

If you want to support me

"Buy Me A Coffee"

Installation

bash npm i quick.db


Mac Prerequisites

bash 1. Install XCode 2. Run `npm i -g node-gyp` in terminal 3. Run `node-gyp --python /path/to/python` in terminal

If you're having troubles installing, please follow this troubleshooting guide. Windows users may need to do additional steps listed here.

Example With Sqlite (Default driver)

NOTE: In order to use this driver, install npm i better-sqlite3 separately.

```js const { QuickDB } = require("quick.db"); const db = new QuickDB(); // will make a json.sqlite in the root folder // if you want to specify a path you can do so like this // const db = new QuickDB({ filePath: "source/to/path/test.sqlite" });

(async () => { // Init the database, this is always needed! await db.init();

// self calling async function just to get async
// Setting an object in the database:
await db.set("userInfo", { difficulty: "Easy" });
// -> { difficulty: 'Easy' }

// Getting an object from the database:
await db.get("userInfo");
// -> { difficulty: 'Easy' }

// Getting an object property from the database:
await db.get("userInfo.difficulty");
// -> 'Easy'

// Setting an object in the database:
await db.set("userInfo", { difficulty: "Easy" });
// -> { difficulty: 'Easy' }

// Pushing an element to an array (that doesn't exist yet) in an object:
await db.push("userInfo.items", "Sword");
// -> { difficulty: 'Easy', items: ['Sword'] }

// Adding to a number (that doesn't exist yet) in an object:
await db.add("userInfo.balance", 500);
// -> { difficulty: 'Easy', items: ['Sword'], balance: 500 }

// Repeating previous examples:
await db.push("userInfo.items", "Watch");
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }
await db.add("userInfo.balance", 500);
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }

// Fetching individual properties
await db.get("userInfo.balance"); // -> 1000
await db.get("userInfo.items"); // ['Sword', 'Watch']

})(); ```

Example With MySQLDriver

NOTE: In order to use this driver, install npm i mysql2 separately.

```js const { QuickDB } = require("quick.db"); const { MySQLDriver } = require("quick.db/MySQLDriver"); (async () => { const mysqlDriver = new MySQLDriver({ host: "localhost", user: "me", password: "secret", database: "my_db", });

const db = new QuickDB({ driver: mysqlDriver });
await db.init(); // Connects and setup the database
// Now you can use quick.db as normal

await db.set("userInfo", { difficulty: "Easy" });
// -> { difficulty: 'Easy' }

})(); ```

Example With PostgresDriver

NOTE: In order to use this driver, install npm i pg separately.

```js const { QuickDB } = require("quick.db"); const { PostgresDriver } = require("quick.db/PostgresDriver"); (async () => { const postgresDriver = new PostgresDriver({ host: "localhost", user: "me", password: "secret", database: "my_db", });

const db = new QuickDB({ driver: postgresDriver });
await db.init(); // Connects and setup the database
// Now you can use quick.db as normal

await db.set("userInfo", { difficulty: "Easy" });
// -> { difficulty: 'Easy' }

})(); ```

Example With MongoDriver

NOTE: In order to use this driver, install npm i mongoose separately.

```js const { QuickDB } = require("quick.db"); const { MongoDriver } = require("quick.db/MongoDriver"); (async () => { const mongoDriver = new MongoDriver("mongodb://localhost/quickdb");

const db = new QuickDB({ driver: mongoDriver });
await db.init(); // Connects and setup the database
// Now you can use quick.db as normal

await db.set("userInfo", { difficulty: "Easy" });
// -> { difficulty: 'Easy' }

await mongoDriver.close();
// disconnect from the database

})(); ```

Example With JSONDriver

NOTE: In order to use this driver, install npm i write-file-atomic separately.

```js const { QuickDB } = require("quick.db"); const { JSONDriver } = require("quick.db/JSONDriver"); const jsonDriver = new JSONDriver(); const db = new QuickDB({ driver: jsonDriver });

// Init the database, this is always needed! await db.init(); await db.set("userInfo", { difficulty: "Easy" }); ```

Example With MemoryDriver

Note: In-memory database is not persistent and is suitable for temporary caching.

```js const { QuickDB } = require("quick.db"); const { MemoryDriver } = require("quick.db/MemoryDriver"); const memoryDriver = new MemoryDriver(); const db = new QuickDB({ driver: memoryDriver });

// Init the database, this is always needed! await db.init(); await db.set("userInfo", { difficulty: "Easy" }); ```

Owner

  • Name: Plexi Development
  • Login: plexidev
  • Kind: organization
  • Email: hello@plexidev.org
  • Location: United States

Development Community

GitHub Events

Total
  • Issues event: 1
  • Watch event: 9
  • Fork event: 5
Last Year
  • Issues event: 1
  • Watch event: 9
  • Fork event: 5

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 909
  • Total Committers: 58
  • Avg Commits per committer: 15.672
  • Development Distribution Score (DDS): 0.705
Past Year
  • Commits: 82
  • Committers: 9
  • Avg Commits per committer: 9.111
  • Development Distribution Score (DDS): 0.476
Top Committers
Name Email Commits
Zelak312 z****2@g****m 268
renovate[bot] 2****] 214
Glitch (quickdb-latest) n****e 109
Loren Cerri t****s@g****m 101
Loren Cerri l****i@g****m 45
StasiumDev 4****v 35
Cohen Erickson c****n@g****m 14
Ayyan Lewis a****s@g****m 10
DarkenLM t****l@g****m 10
Zoro- s****1@g****m 9
realCartar 3****r 8
Snowflake d****7@g****m 7
lieuwe-berg 3****g 7
Aidak 8****e 6
dependabot[bot] 4****] 4
Chroventer c****r@g****m 4
Nigelrex 7****x 4
Ashley i****y@d****m 3
YodaLightsabr 7****r 3
iMorfixx 3****x 2
Dalibor Trampota 3****a 2
DevAndromeda 4****a 2
FC 6****0 2
Xandrrrr 5****3 2
David Neidhart d****t@g****t 2
Josh hi@j****f 2
Loren Cerri l****i@p****g 2
Mantou1233 l****y@d****l 2
Αξονας 1****s 1
warwicklol14 4****4 1
and 28 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 20
  • Total pull requests: 289
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 16
  • Total pull request authors: 19
  • Average comments per issue: 2.85
  • Average comments per pull request: 0.14
  • Merged pull requests: 261
  • Bot issues: 1
  • Bot pull requests: 223
Past Year
  • Issues: 1
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: about 10 hours
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pendragons-code (2)
  • ShadowGaming100 (2)
  • FraglyG (2)
  • AlloryDante (2)
  • Laqota (1)
  • peterhanania (1)
  • tayron1 (1)
  • Sobhan-SRZA (1)
  • tzwel (1)
  • makarasty (1)
  • ServerDeveloper9447 (1)
  • Ianyourgod (1)
  • Xander1233 (1)
  • TentacleSama4254 (1)
  • renovate[bot] (1)
Pull Request Authors
  • renovate[bot] (222)
  • Zelak312 (38)
  • dependabot[bot] (9)
  • lorencerri (4)
  • joshiewtf (4)
  • StasiumDev (4)
  • DarkenLM (3)
  • sebas-inf (2)
  • HawkeyNL (2)
  • 4x0n4s (2)
  • slxca (2)
  • roni0028 (2)
  • Xander1233 (2)
  • Mantou1233 (1)
  • wiletki (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (9) hacktoberfest (1)

Dependencies

package.json npm
  • @babel/core ^7.16.5 development
  • @babel/preset-env ^7.16.5 development
  • @babel/preset-typescript ^7.16.5 development
  • @faker-js/faker ^6.1.2 development
  • @types/better-sqlite3 ^7.4.2 development
  • @types/jest ^27.0.3 development
  • @types/lodash ^4.14.178 development
  • @typescript-eslint/eslint-plugin ^5.8.1 development
  • @typescript-eslint/parser ^5.8.1 development
  • babel-jest ^27.4.5 development
  • better-sqlite3 ^7.4.5 development
  • eslint ^8.5.0 development
  • eslint-config-prettier ^8.3.0 development
  • husky ^7.0.4 development
  • jest ^27.4.5 development
  • prettier ^2.5.1 development
  • promise-mysql ^5.0.4 development
  • typescript ^4.5.4 development
  • lodash ^4.17.21