all files / lib/offshore/adapter/ setupTeardown.js

25% Statements 1/4
0% Branches 0/2
0% Functions 0/1
25% Lines 1/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                                     
/**
 * Setup and Teardown Adapter Normalization
 */
 
module.exports = {
 
  // Teardown is fired once-per-adapter
  // Should tear down any open connections, etc. for each collection
  // (i.e. tear down any remaining connections to the underlying data model)
  // (i.e. flush data to disk before the adapter shuts down)
  teardown: function(cb) {
    if (this.adapter.teardown) {
      return this.adapter.teardown.apply(this, arguments);
    };
 
    cb();
  }
 
};