How to use the jsonreststores.SimpleDbLayerMixin function in jsonreststores

To help you get started, we’ve selected a few jsonreststores examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mercmobily / hotplate / core_modules / hotCoreStore / hotCoreStore.js View on Github external
exports.get = function( done ){

  if (!cachedGetResults){

    // Simple schema
    var BasicSchema =  declare( [ SimpleSchema, hotplate.config.get( 'hotplate.SchemaMixin') ] );

    // Sets the DB Layer
    var DbLayer = declare([ SimpleDbLayer, hotplate.config.get('hotplate.DbLayerMixin') ], {
      db: hotplate.config.get( 'hotplate.db' )
    });

      // Creates a basic DB store based on that layer
    var BasicDbStore = declare( [ JsonRestStores, JsonRestStores.SimpleDbLayerMixin, JsonRestStores.HTTPMixin ], {
      DbLayer: DbLayer,
      chainErrors: 'all'
    });

    // Legacy names
    var HotSchema = BasicSchema;
    var HotStore = BasicDbStore;

    cachedGetResults = { DbLayer, BasicSchema, HotSchema, BasicDbStore, HotStore }
  }

  if( done ) return done( null, cachedGetResults );
  else return( cachedGetResults );
};
github mercmobily / hotplate / node_modules / hotCoreJsonRestStores / lib / hotCoreJsonRestStores.js View on Github external
}
            self.broadcastStoreChanges( request, m, d[ self.idProperty], d, {}, done );
          });
        },


      });


      // Sets the DB Layer
      var DbLayer = declare([ SimpleDbLayer, hotplate.config.get('hotplate.DbLayerMixin') ], {
        db: hotplate.config.get( 'hotplate.db' )
      });

      // Creates a basic DB store based on that layer
      classes.BasicDbStore = declare( [ JsonRestStores, JsonRestStores.SimpleDbLayerMixin, JsonRestStores.HTTPMixin ], {
        DbLayer: DbLayer,
      });

      // Creates the HotStore: the basic DB store with HotStoreMixin
      classes.HotStore = declare( [ classes.BasicDbStore, classes.HotStoreMixin ]);

      done( null, classes );

    }
  });

jsonreststores

A module to create full Json REST stores in minutes

MIT
Latest version published 5 months ago

Package Health Score

54 / 100
Full package analysis