lib/upsert.js
function (db, options, cb) {
	this.db = db;
	this.cb = cb;
	this.updateQueryMaker = options.update;
	this.insertQueryMaker = options.insert;
	this.maxUpdateAttemptsCount = options.maxUpdateAttemptsCount || 2;
	this.transform = options.transform;
	this.insertFirst = !!options.insertFirst;
	this.nonQuery = !!options.nonQuery;

	var self = this;
	this.updateAttemptsCount = 0;
	this.updateOrInsertBound = function () {
		self.updateOrInsert();
	};
}
function (db, options, cb) {
	this.db = db;
	this.cb = cb;
	this.updateQueryMaker = options.update;
	this.insertQueryMaker = options.insert;
	this.maxUpdateAttemptsCount = options.maxUpdateAttemptsCount || 2;
	this.transform = options.transform;
	this.insertFirst = !!options.insertFirst;
	this.nonQuery = !!options.nonQuery;

	var self = this;
	this.updateAttemptsCount = 0;
	this.updateOrInsertBound = function () {
		self.updateOrInsert();
	};
}
function ( db , options , cb ) { this . db = db ; this . cb = cb ; this . updateQueryMaker = options . update ; this . insertQueryMaker = options . insert ; this . maxUpdateAttemptsCount = options . maxUpdateAttemptsCount || 2 ; this . transform = options . transform ; this . insertFirst = ! ! options . insertFirst ; this . nonQuery = ! ! options . nonQuery ; var self = this ; this . updateAttemptsCount = 0 ; this . updateOrInsertBound = function ( ) { self . updateOrInsert ( ) ; } ; }
WARN doesn't support transactions for now
WARN doesn t support transactions for now