Giter Site home page Giter Site logo

daviemakz / mysql-connection-pool-manager Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 7.0 2.01 MB

This is a mySQL Connection Pool Manager wrapper powered by mysqljs/mysql and allows for intelligent management & load balancing mysql connection pools.

Home Page: https://www.npmjs.com/package/mysql-connection-pool-manager

License: MIT License

JavaScript 97.34% Shell 2.66%
mysql connection pool manager load loadbalancing throughput nodejs instance

mysql-connection-pool-manager's People

Contributors

daviemakz avatar dependabot[bot] avatar fossabot avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mysql-connection-pool-manager's Issues

Is to possible add streaming query?

I think about similar code:

var query = connection.query('SELECT * FROM posts');
query
  .on('error', function(err) {
    // Handle error, an 'end' event will be emitted after this as well
  })
  .on('fields', function(fields) {
    // the field packets for the rows to follow
  })
  .on('result', function(row) {
    // Pausing the connnection is useful if your processing involves I/O
    connection.pause();

    processRow(row, function() {
      connection.resume();
    });
  })
  .on('end', function() {
    // all rows have been received
  });

This is streaming query. I'm using them i my project.
Is any option to implement in this project?
Is any suggestions?

How to use Transaction without creating a raw connection first?

Hi, I could not find example of using Transaction in this module. What I am doing is to create a raw connection first:
var connection = pool.raw.createConnection({...});
then using the mysqljs/mysql's transaction:
connection.beginTransaction(function (err) {...}

Is there native support of transaction inside your module?
Also, I saw your in your example of using mysqljs/mysql's connection, you call
connection.end();
This will kill the connection. But what if I want to reuse the connection and want to release it back to the pool. Is there some api similar to the mysqljs/mysql's connection.release()?

Thanks.

An in-range update of mocha is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 5.1.0 of mocha was just published.

Branch Build failing 🚨
Dependency mocha
Current Version 5.0.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v5.1.0

5.1.0 / 2018-04-12

🎉 Enhancements

🐛 Fixes

📖 Documentation

🔩 Other

Commits

The new version differs by 23 commits ahead by 23, behind by 2.

  • 40d9ea3 Release v5.1.0
  • bf34e42 update CHANGELOG for v5.1.0 [ci skip]
  • 63462dd Implement API documentation using npm:documantation.
  • 741b0bd fix circular objects in json reporter; closes #2433 (#3318)
  • 8010501 fix wrong version in package.json! [ci skip]
  • 94e7289 doc precision for exclusive tests
  • 8b6c957 optimize package-scripts.js
  • d71b80a PATH workaround for Travis CI bug
  • 7544bd3 further build improvements (#3315)
  • 88b9882 update package-lock.json for v5.0.5 [ci skip]
  • 4ae26b2 improve caching performance in CI (#3310)
  • ff9f3cf update stages and build matrices (#3308)
  • f2560e7 add update-contributors script; closes #3289 (#3290)
  • cd1c835 upgrade eslint; lint
  • 35dac3e use build stages for Travis CI (#3302)

There are 23 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

How to make it work on Windows 10?

Hi,

I have installed the package. I am on Windows 10 x64 with mySQL community. I run mySql directly without xampp.

I don't have mysqld.sock file on my system even if mySql is running. I think it's normal.

What should I do for : socketPath: '/var/run/mysqld/mysqld.sock' ??

Thanks in advance
Carl

An in-range update of prettier is breaking the build 🚨

Version 1.12.1 of prettier was just published.

Branch Build failing 🚨
Dependency prettier
Current Version 1.12.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Feature Request: Promise Queries

Hi,

Can you foresee any issues with implementing a way to query that works with async/await?

I've got a version on a local fork of this ready to go (passes all the tests too) but if there is a reason you haven't done this already, I won't consider a PR :)

Btw, this package saved my butt this morning! 🎉

Question - Why not integrate into `mysql` module?

Neat project! I'm wondering why this wouldn't be integrated into the Node.js mysql package directly. Any thoughts?

Also, have you considered making mysql a peer dependency so users can specify their own mysql version?

DB Connections

I've been testing this library so far, and i have to say what a fantastic rock solid library it is. So well done! I'm incredibility grateful and happy to send you some coffee money (sort of patreon) or to help cover some costs of a few beers.

My issue is wanting to swtich DB connections on the host under certain conditions (i.e. custom's db instance etc), I know on the native MySql you can use changeUser, reading the docs on connection pool manage says to user mySQL.config and presumable just change the Database property on the options object and throw it in there before the query is executing.

Am I reading the docs right, any hints/guidance would be great. Very grateful and hats off to you.

Kind regards

 Karl

Bulk insert like mysqljs

Hi!

I have one problem using this lib, i have to do a bulk insert like in mysqljs module

this.connection.query(SQLstring, [values] , (error, result)=> {
//..do error result check and return result
})
where "[values]" is an array like ->
values = [
['demian', '[email protected]', 1],
['john', '[email protected]', 2],
['mark', '[email protected]', 3],
['pete', '[email protected]', 4]
];

Is there a way to do this with this lib?
Just read tha documentation and doesn't explain this scenario.

Greetings...

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of async is breaking the build 🚨

The dependency async was updated from 3.1.1 to 3.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

async is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.