Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Mysql2 connection pool #313

Open
crisward opened this issue Jan 5, 2024 · 0 comments
Open

Getting Mysql2 connection pool #313

crisward opened this issue Jan 5, 2024 · 0 comments

Comments

@crisward
Copy link

crisward commented Jan 5, 2024

I was using an older version of the mysql library (v2) with node-rate-limiter-flexible

https://github.com/animir/node-rate-limiter-flexible/wiki/MySQL

To configure it I have this line

  import connect,{sql} from "@databases/mysql";
  const db = connect(process.env.DATABASE_URL)

  let connection = {
    storeClient:db.pool.pool,
    dbName: db.pool.pool.config.connectionConfig.database,
    tableName: 'ratelimit'
  }

I've recently updated to version 6 and all my tests are passing, apart from those which integrated with this library.
Those above variables are no longer present. I've tried digging through your code to see if I can access the underlying mysql2 connection pool, but I haven't had any luck. I shared this connection with other queries, hence why I'm not using mysql2 directly.

As someone who is more familiar with the code in your library, any ideas if its possible to access this?

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant