src/nopg.js
function pg_query(query, params) {
	return function(db) {
		var start_time = new Date();
		return do_query(db, query, params).then(function() {

			var end_time = new Date();

			db._record_sample({
				'event': 'query',
				'start': start_time,
				'end': end_time,
				'query': query,
				'params': params
			});

			return db;
		});
	};
}
function pg_query(query, params) {
	return function(db) {
		var start_time = new Date();
		return do_query(db, query, params).then(function() {

			var end_time = new Date();

			db._record_sample({
				'event': 'query',
				'start': start_time,
				'end': end_time,
				'query': query,
				'params': params
			});

			return db;
		});
	};
}
function pg_query ( query , params ) { return function ( db ) { var start_time = new Date ( ) ; return do_query ( db , query , params ) . then ( function ( ) { var end_time = new Date ( ) ; db . _record_sample ( { 'event' : 'query' , 'start' : start_time , 'end' : end_time , 'query' : query , 'params' : params } ) ; return db ; } ) ; } ; }
Run query on the PostgreSQL server
@param query
@param params
@return {Function}
Run query on the PostgreSQL server