create-manager.js 2.1 KB

1234567891011121314151617181920212223242526
  1. // ██████╗██████╗ ███████╗ █████╗ ████████╗███████╗
  2. // ██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██╔════╝
  3. // ██║ ██████╔╝█████╗ ███████║ ██║ █████╗
  4. // ██║ ██╔══██╗██╔══╝ ██╔══██║ ██║ ██╔══╝
  5. // ╚██████╗██║ ██║███████╗██║ ██║ ██║ ███████╗
  6. // ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝
  7. //
  8. // ███╗ ███╗ █████╗ ███╗ ██╗ █████╗ ██████╗ ███████╗██████╗
  9. // ████╗ ████║██╔══██╗████╗ ██║██╔══██╗██╔════╝ ██╔════╝██╔══██╗
  10. // ██╔████╔██║███████║██╔██╗ ██║███████║██║ ███╗█████╗ ██████╔╝
  11. // ██║╚██╔╝██║██╔══██║██║╚██╗██║██╔══██║██║ ██║██╔══╝ ██╔══██╗
  12. // ██║ ╚═╝ ██║██║ ██║██║ ╚████║██║ ██║╚██████╔╝███████╗██║ ██║
  13. // ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
  14. //
  15. // Create a new connection manager to use.
  16. var MySQL = require('machinepack-mysql');
  17. module.exports = function createManager(url, config) {
  18. var report = MySQL.createManager({
  19. connectionString: url,
  20. meta: config
  21. }).execSync();
  22. return report;
  23. };