A data-focused entry in TopGit's GitHub warehouse: eggjs/mysql, 331 stars, Data, TypeScript. MySQL plugin for egg
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
scope: A generatorFunction which will execute all sqls of this transaction.
ctx: The context object of current request, it will ensures that even in the case of a nested transaction, there is only one active transaction in a request at the same time.
adventage: easy to use, as if there is no transaction in your code.
disadvantage: all transation will be successful or failed, cannot control precisely
const result = await app.mysql.beginTransactionScope(async conn => {
// don't commit or rollback by yourself
await conn.insert(table, row1);
await conn.update(table, row2);
return { success: true };
}, ctx); // ctx is the context of current request, access by `this.ctx`.
// if error throw on scope, will auto rollback
Advance
Custom SQL splicing
const results = await app.mysql.query(
'update posts set hits = (hits + ?) where id = ?',
[1, postId]
);
Literal
If you want to call literals or functions in mysql , you can use Literal.
Inner Literal
NOW(): The database system time, you can obtain by app.mysql.literals.now.
The most recent commit recorded on eggjs/mysql was 1.6 years ago, based on the GitHub push timestamp. The repository has 59 forks — one of the better signals of community interest.
How many stars does eggjs/mysql have?
eggjs/mysql has 331 GitHub stars — refresh the page for the live number, or check github.com/eggjs/mysql. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is eggjs/mysql open source?
Yes — eggjs/mysql ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/eggjs/mysql.
What else is in the Data space?
eggjs/mysql is tracked by TopGit under the Data category, alongside 4 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is eggjs/mysql?
eggjs/mysql (eggjs/mysql) is a TypeScript project on GitHub. From the project's own README: MySQL plugin for egg
What language is eggjs/mysql written in?
eggjs/mysql is written primarily in TypeScript. GitHub's language field is based on the largest share of bytes in the default branch.
What license does eggjs/mysql use?
eggjs/mysql is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about eggjs/mysql?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/eggjs/mysql is the definitive source.
Read full README in the tab above.
Curious whether mysql is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about mysql.