import MssqlSnapshot from './MssqlSnapshot';

export default (config) => cb => {
	const connection = new MssqlSnapshot(config);
	return connection.connect()
		.then(() => cb({
			connections: connection._connections,
			create: connection._create,
			restore: connection._restore,
			listAll: connection._listAll,
			delete: connection._delete,
		}))
		.then(connection.closeConnection);
};

import MssqlSnapshot from './MssqlSnapshot';

export default (config) => cb => {
	const snapshotMgr = new MssqlSnapshot(config);
	return snapshotMgr.connect()
		.then(() => cb({
			connections: snapshotMgr._connections,
			create: snapshotMgr._create,
			restore: snapshotMgr._restore,
			listAll: snapshotMgr._listAll,
			delete: snapshotMgr._delete,
		}))
		.then(snapshotMgr.closeConnection);
};

Rename vars to be more reflective of their origin
Rename vars to be more reflective of their origin
