All Projects → GroundMeteor → Db

GroundMeteor / Db

Licence: mit
GroundDB is a thin layer providing Meteor offline database and methods

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Db

Vault
Easy persistence of Contentful data for Android over SQLite.
Stars: ✭ 80 (-85.94%)
Mutual labels:  database, offline
Meteor Service Worker
An universal service worker for meteor apps
Stars: ✭ 132 (-76.8%)
Mutual labels:  meteor, offline
Dexie.js
A Minimalistic Wrapper for IndexedDB
Stars: ✭ 7,337 (+1189.46%)
Mutual labels:  database, offline
Vue Pouch Db
Vue Pouch DB is a VueJS Plugin that binds PouchDB with Vue and keeps a synchronised state with the database. Has support for Mango queries which are processed locally within the VuePouchDB state.
Stars: ✭ 127 (-77.68%)
Mutual labels:  database, offline
Meteor Peerdb
Reactive database layer with references, generators, triggers, migrations, etc.
Stars: ✭ 128 (-77.5%)
Mutual labels:  database, meteor
Drmongo
MongoDB admin app built on MeteorJs.
Stars: ✭ 283 (-50.26%)
Mutual labels:  database, meteor
Android Ddp
[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Stars: ✭ 271 (-52.37%)
Mutual labels:  database, meteor
Sol Journal
✎ Simple, personal journaling progressive web app
Stars: ✭ 470 (-17.4%)
Mutual labels:  database, offline
Jsonbase
A database software completely built as JSON files in backend. A powerful, portable and simple database works on top of JSON files. It is like a database software, currently having basic CRUD operation features. You can use this as a backend for your ReST APIs as well. The software is completely free and opensource. We are coming up with new features and providing more updates. The another beautiful advantage with JSON-base is since it is a NPM module, this fits well in your nodeJs applications eco system. if you want to develop quick prototypes/poc or need of a database with minimal requirements then, JSONBASe is an must option that you can consider. However there is a limitation if you go beyond a million records per table.
Stars: ✭ 552 (-2.99%)
Mutual labels:  database
Alfred Convert
Convert between different units in Alfred
Stars: ✭ 560 (-1.58%)
Mutual labels:  offline
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (-3.51%)
Mutual labels:  database
Meteor User Status
Track user connection state and inactivity in Meteor.
Stars: ✭ 555 (-2.46%)
Mutual labels:  meteor
Pup
The Ultimate Boilerplate for Products.
Stars: ✭ 563 (-1.05%)
Mutual labels:  meteor
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (-3.16%)
Mutual labels:  database
Datasets For Recommender Systems
This is a repository of a topic-centric public data sources in high quality for Recommender Systems (RS)
Stars: ✭ 564 (-0.88%)
Mutual labels:  database
Flink Cdc Connectors
Change Data Capture (CDC) Connectors for Apache Flink
Stars: ✭ 546 (-4.04%)
Mutual labels:  database
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+4567.66%)
Mutual labels:  database
Api
Our Database
Stars: ✭ 568 (-0.18%)
Mutual labels:  database
Mongoui
MongoDB admin UI server written in Node.js 🎮
Stars: ✭ 566 (-0.53%)
Mutual labels:  database
Quark
Stay happy while offline | World's first offline search engine.
Stars: ✭ 561 (-1.41%)
Mutual labels:  offline

ground:db

Build Status semantic-release

GroundDB is a fast and thin layer providing Meteor offline database - Taking cloud data to the ground.

Features

This version of GroundDB is a caching only storage - meaning it does not support resuming of method calls/cross tab updates etc. But it's faster and async supporting local storages like:

  • localstorage
  • indexeddb
  • websql * SQLite (on cordova)

It's using localforage with some minor modifications - hopefully we can use localForage via npm in the future

Notes about migration to GroundDB II

Usage

A pure offline collection

  foo = new Ground.Collection('test');

Ground.Collection is client-side only and depends on LocalCollection for now

Get documents and updates from a Meteor Mongo Collection via DDP

  foo = new Ground.Collection('test');

  foo.observeSource(bar.find());

  Meteor.setTimeout(() => {
    // Stop observing - keeping all documents as is
    foo.stopObserver();
  }, 1000);

Limiting the stored data

If you want to clean up the storage and eg. have it match the current subscription, now you can:

  foo.keep(bar.find());

This will discard all documents not in the subscribed data

Limit the data stored locally

  foo.keep(bar.find({}, { limit: 30 }));

This will discard all but 30 documents

Limit the data stored locall using multiple cursors

  foo.keep(bar.find({ type: 'a' }, { limit: 30 }), bar.find({ type: 'b' }, { limit: 30 }));

This will keep at max 60 documents 30 documents of each type "a"/"b"

Clear the storage

  foo.clear();

This will empty the in memory and the local storage

Need a near backwards compatible solution?

This example behaves much like the previous version of ground db regarding caching a Mongo.Collection - This class inforces a manual clean up. Calling removeLocalOnly() will keep only the documents in the Mongo.Collection.

GroundLegacy = {
  Collection: class GroundLegacy extends Ground.Collection {
    constructor(collection, options) {
      if (!(collection instanceof Mongo.Collection)) {
        throw new Error('GroundLegacy requires a Mongo.Collection');
      }
      if (options.cleanupLocalData !== false) {
        throw new Error('GroundLegacy requires cleanupLocalData to be false');
      }

      // Create an instance of ground db
      super(collection._name);

      this.mongoCollection = collection;

      collection.grounddb = this;

      // Observe on the whole collection
      this.observeSource(collection.find());

      // Store super
      collection.orgFind = collection.find;
      collection.orgFindOne = collection.findOne;

      // Overwrite collection finds using the grounded data
      collection.find = (...args) => {
        return this.find(...args);
      };

      collection.findOne = (...args) => {
        return this.findOne(...args);
      };
    }

    removeLocalOnly() {
      // Remove all documents not in current subscription
      this.keep(this.mongoCollection.orgFind());
    }
  },
};

More

Read about:

Contributions

Feel free to send issues, pull requests all is wellcome

Kind regards Morten

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].