Skip to content

Commit

Permalink
Added list of preprocessors to Database
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Dec 3, 2013
1 parent e26971f commit 2070462
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
var MongoClient = require('mongodb').MongoClient;
var Model = require('./Model');
var Instance = require('./Instance');
var _ = require('lodash');

(require.modules || {}).Database = module.exports = Database;

Expand All @@ -29,6 +30,13 @@ function Database(config) {
Database.Model = Model;
Database.Instance = Instance;

// Add preprocessor accessors
var preprocessors = require('./preprocessors');
for(var k in preprocessors) {
Database[k] = preprocessors[k];
}


Database.prototype.connect = function (cb) {
/// <summary>Connects to the database server specified in the provided configuration</summary>
/// <param name="cb" type="Function">A function to be called when the connection is completed, called immediately if one is already open</param>
Expand Down

0 comments on commit 2070462

Please sign in to comment.