module.exports = function(sql) {
	
	/* Middleware to connect backend to server if there is no connection */
	sql.connect = function() {
		var sql = this;
		return function(options, next) {
			sql.backend.connect(next);
		};
	};
	
	/* Middleware to disconnect the client */
	sql.disconnect = function() {
		var sql = this;
		return function(options, next) {
			sql.backend.disconnect(next);
		};
	};
	
};