npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gudsi-mongodb-plugin

v0.1.0

Published

This plugin provides a mongodb local storage option to Cordova based applications.

Downloads

14

Readme

gudsi-mongodb-plugin

This is a Cordova plugin that exposes the functionality of MongoDB Mobile to a Cordova Android app for local storage.

Install

To install this plugin run cordova plugin add gudsi-mongodb-plugin in your projects root folder.

Ionic integration

To use the plugin in ionic project run npm install ionic-native-mongodb in your projects root folder. Ionic Native MongoDB

Functions

Below are the functions that are exposed in the plugin.


initiate(appId: string)

This function has to be called before doing anything else, this is a mongodb mobile requirement appId the id of this app, this is more usefull when you are using stitch but mongo does it need the initialization.


dropDatabase(databaseName: string)

API reference for dropDatabase

databaseName the name of the database to delete.


createCollection(databaseName: string,collectionName: string,schema?: JSONObject)

API reference for createCollection

databaseName the name of the database. collectionName the name of the new collection. schema the schema with JSON Schema validation $jsonSchema.


dropCollection(databaseName: string,collectionName: string)

API reference for dropCollection

databaseName the name of the database that contains the database to delete. collectionName the name of the collection to delete.


listCollectionNames(databaseName: string)

API reference for getCollectionNames

databaseName the name of the database to explore.


createIndex(databaseName: string, collectionName: string, keys: JSONObject, indexOptions: JSONObject)

API reference for createIndex

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. keys a document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. indexOptions a document that contains a set of options that controls the creation of the index.


dropIndex(databaseName: string, collectionName: string, indexName: string)

API reference for dropIndex

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. indexName Specifies the name of the index to drop.


aggregate(databaseName: string, collectionName: string, pipeline: JSONArray)

API reference for aggregate

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. pipeline A sequence of data aggregation operations or stages. API reference for aggregation pipeline stages


count(databaseName: string, collectionName: string, query?: JSONObject)

API reference for count

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the query selection criteria.


find(databaseName: string, collectionName: string, query?: JSONObject)

API reference for find

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query (optional) Specifies selection filter using query operators. To return all documents in a collection, omit this parameter or pass an empty document


findOne(databaseName: string, collectionName: string, query?: JSONObject)

API reference for findOne

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query (optional) Specifies query selection criteria using query operators.


findById(databaseName: string, collectionName: string, id: string | {$oid:string})

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. id the id of the element to find.


findOneAndUpdate(databaseName: string, collectionName: string, query: JSONObject,update: JSONObject)

API reference for findOneAndUpdate

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the update. The same query selectors as in the find() method are available. update the update document.


findOneAndReplace(databaseName: string, collectionName: string, query: JSONObject,replacement: JSONObject)

API reference for findOneAndReplace

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the update. The same query selectors as in the find() method are available. replacement the replacement document.


findOneAndDelete(databaseName: string, collectionName: string, query: JSONObject)

API reference for findOneAndDelete

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the delete. The same query selectors as in the find() method are available.


insertOne(databaseName: string, collectionName: string, document: JSONObject)

API reference for insertOne

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. document a document to insert into the collection.


insertMany(databaseName: string, collectionName: string, documents: JSONArray)

API reference for insertMany

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. documents an array of documents to insert into the collection.


replaceOne(databaseName: string, collectionName: string, query: JSONObject , replacement: JSONObject)

API reference for replaceOne

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the update. The same query selectors as in the find() method are available. replacement the replacement document.


updateOne(databaseName: string, collectionName: string, query: JSONObject , update: JSONObject)

API reference for updateOne

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the update. The same query selectors as in the find() method are available. update the modifications to apply.


updateMany(databaseName: string, collectionName: string, query: JSONObject , update: JSONObject)

API reference for updateMany

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query the selection criteria for the update. The same query selectors as in the find() method are available. update the modifications to apply.


deleteOne(databaseName: string, collectionName: string, query: JSONObject)

API reference for deleteOne

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query specifies deletion criteria using query operators.


deleteMany(databaseName: string, collectionName: string, query: JSONObject)

API reference for deleteMany

databaseName the name of the database that is to be used. collectionName the name of the collection that is to be used. query specifies deletion criteria using query operators.