sidorares / sidorares/node-mysql2

[Docs] Pool execute or query is automatically create and release a connection

Open Beginner friendly
#745 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

The docs should mention that methods of connection pool execute() and query() internally create and release a connection each time it called:

await = pool.execute(query);

is same as

const conn = await pool.getConnection();
await conn.execute(query);
conn.release();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No documentation file or test is named. Start by locating the connection-pool API documentation for execute() and query(), then compare its existing guidance with the issue's getConnection(), execute(), and release() example. Done means the docs clearly state that these methods create and release a connection for each call.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, nodejs, typescript
Domain
database, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.