{"id":18860091,"url":"https://github.com/plexidev/quickmongo","last_synced_at":"2025-04-14T12:23:17.492Z","repository":{"id":43079888,"uuid":"281072186","full_name":"plexidev/quickmongo","owner":"plexidev","description":"Quick mongodb wrapper for beginners that provides key-value based interface.","archived":false,"fork":false,"pushed_at":"2023-05-04T15:04:09.000Z","size":988,"stargazers_count":77,"open_issues_count":3,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-13T11:42:19.761Z","etag":null,"topics":["database","easy-mongodb","hacktoberfest","key-value","key-value-database","mongodb","mongodb-wrapper","mongoose","mongoose-wrapper","nodejs","quickdb"],"latest_commit_sha":null,"homepage":"https://quickmongo.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plexidev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-20T09:24:33.000Z","updated_at":"2025-02-25T06:35:44.000Z","dependencies_parsed_at":"2024-06-18T14:08:21.501Z","dependency_job_id":null,"html_url":"https://github.com/plexidev/quickmongo","commit_stats":null,"previous_names":["cesiumlabs/quickmongo","devsnowflake/quickmongo"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexidev%2Fquickmongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexidev%2Fquickmongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexidev%2Fquickmongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexidev%2Fquickmongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plexidev","download_url":"https://codeload.github.com/plexidev/quickmongo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248878728,"owners_count":21176369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","easy-mongodb","hacktoberfest","key-value","key-value-database","mongodb","mongodb-wrapper","mongoose","mongoose-wrapper","nodejs","quickdb"],"created_at":"2024-11-08T04:21:18.531Z","updated_at":"2025-04-14T12:23:17.441Z","avatar_url":"https://github.com/plexidev.png","language":"TypeScript","readme":"## ![QuickMongo Logo](https://www.plexidev.org/quickmongo.png)\n\nQuickMongo is a beginner-friendly and feature-rich wrapper for MongoDB that allows you to use Quick.db's Key-Value based syntax.\n\n# Installing\n\n```bash\n$ npm install --save quickmongo\n\nOR\n$ yarn add quickmongo\n```\n\n# Documentation\n**[https://quickmongo.js.org](https://quickmongo.js.org)**\n\n# Features\n- Beginner friendly\n- Asynchronous\n- Dot notation support\n- Key-Value like interface\n- Easy to use\n- TTL (temporary storage) supported\n- Provides quick.db compatible API\n- MongoDriver for quick.db\n\n# Example\n\n## QuickMongo\n\n```js\nimport { Database } from \"quickmongo\";\n\nconst db = new Database(\"mongodb://localhost:27017/quickmongo\");\n\ndb.on(\"ready\", () =\u003e {\n    console.log(\"Connected to the database\");\n    doStuff();\n});\n\n// top-level awaits\nawait db.connect(); \n\nasync function doStuff() {\n    // Setting an object in the database:\n    await db.set(\"userInfo\", { difficulty: \"Easy\" });\n    // -\u003e { difficulty: 'Easy' }\n\n    // Pushing an element to an array (that doesn't exist yet) in an object:\n    await db.push(\"userInfo.items\", \"Sword\");\n    // -\u003e { difficulty: 'Easy', items: ['Sword'] }\n\n    // Adding to a number (that doesn't exist yet) in an object:\n    await db.add(\"userInfo.balance\", 500);\n    // -\u003e { difficulty: 'Easy', items: ['Sword'], balance: 500 }\n\n    // Repeating previous examples:\n    await db.push(\"userInfo.items\", \"Watch\");\n    // -\u003e { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }\n    await db.add(\"userInfo.balance\", 500);\n    // -\u003e { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }\n\n    // Fetching individual properties\n    await db.get(\"userInfo.balance\"); // -\u003e 1000\n    await db.get(\"userInfo.items\"); // -\u003e ['Sword', 'Watch']\n\n    // remove item\n    await db.pull(\"userInfo.items\", \"Sword\");\n    // -\u003e { difficulty: 'Easy', items: ['Watch'], balance: 1000 }\n\n    // set the data and automatically delete it after 1 minute\n    await db.set(\"foo\", \"bar\", 60); // 60 seconds = 1 minute\n\n    // fetch the temporary data after a minute\n    setTimeout(async () =\u003e {\n        await db.get(\"foo\"); // null\n    }, 60_000);\n}\n```\n\n## Usage with quick.db\n\n```js\nconst { QuickDB } = require(\"quick.db\");\n// get mongo driver\nconst { MongoDriver } = require(\"quickmongo\");\nconst driver = new MongoDriver(\"mongodb://localhost/quickdb\");\n\ndriver.connect().then(() =\u003e {\n    console.log(`Connected to the database!`);\n    init();\n});\n\nasync function init() {\n    // use quickdb with mongo driver\n    // make sure this part runs after connecting to mongodb\n    const db = new QuickDB({ driver });\n\n    // self calling async function just to get async\n    // Setting an object in the database:\n    console.log(await db.set(\"userInfo\", { difficulty: \"Easy\" }));\n    // -\u003e { difficulty: 'Easy' }\n\n    // Getting an object from the database:\n    console.log(await db.get(\"userInfo\"));\n    // -\u003e { difficulty: 'Easy' }\n\n    // Getting an object property from the database:\n    console.log(await db.get(\"userInfo.difficulty\"));\n    // -\u003e 'Easy'\n\n    // Pushing an element to an array (that doesn't exist yet) in an object:\n    console.log(await db.push(\"userInfo.items\", \"Sword\"));\n    // -\u003e { difficulty: 'Easy', items: ['Sword'] }\n\n    // Adding to a number (that doesn't exist yet) in an object:\n    console.log(await db.add(\"userInfo.balance\", 500));\n    // -\u003e { difficulty: 'Easy', items: ['Sword'], balance: 500 }\n\n    // Repeating previous examples:\n    console.log(await db.push(\"userInfo.items\", \"Watch\"));\n    // -\u003e { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }\n    console.log(await db.add(\"userInfo.balance\", 500));\n    // -\u003e { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }\n\n    // Fetching individual properties\n    console.log(await db.get(\"userInfo.balance\")); // -\u003e 1000\n    console.log(await db.get(\"userInfo.items\")); // ['Sword', 'Watch']\n\n    // disconnect from the database\n    await driver.close();\n}\n```\n\n**Maintained by Plexi Development**\n\n# Discord Support\n**[Plexi Development](https://discord.gg/plexidev)**\n\n**Acquired from Archaeopteryx on 10/02/2022**\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexidev%2Fquickmongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplexidev%2Fquickmongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexidev%2Fquickmongo/lists"}