connector-manager.js 855 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = (function(){
  2. var ConnectorManager = function(sequelize, config) {
  3. throw new Error('Define the constructor!')
  4. }
  5. ConnectorManager.prototype.query = function(sql, callee, options) {
  6. throw new Error('Define the query method!')
  7. }
  8. ConnectorManager.prototype.afterTransactionSetup = function(callback) {
  9. callback()
  10. }
  11. ConnectorManager.prototype.connect = function() {
  12. throw new Error('Define the connect method!')
  13. }
  14. ConnectorManager.prototype.disconnect = function() {
  15. throw new Error('Define the disconnect method!')
  16. }
  17. ConnectorManager.prototype.reconnect = function() {
  18. this.disconnect()
  19. this.connect()
  20. }
  21. ConnectorManager.prototype.cleanup = function() {
  22. if (this.onProcessExit) {
  23. process.removeListener('exit', this.onProcessExit)
  24. }
  25. }
  26. return ConnectorManager
  27. })()