transaction-management by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill transaction-management实现具备 ACID 合规性、并发控制和错误处理的健壮事务管理。涵盖隔离级别、锁定策略和死锁解决方案。
简单事务:
-- 开始事务
BEGIN;
-- 多个语句
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
-- 提交更改
COMMIT;
-- 或回滚
ROLLBACK;
references/ 目录下的详细实现:
| 指南 | 内容 |
|---|---|
| PostgreSQL 事务 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| PostgreSQL 事务 |
| MySQL 事务 | MySQL 事务 |
| PostgreSQL 隔离级别 | PostgreSQL 隔离级别 |
| MySQL 隔离级别 | MySQL 隔离级别 |
| PostgreSQL 显式锁定 | PostgreSQL 显式锁定 |
| MySQL 锁定 | MySQL 锁定 |
| 死锁预防 | PostgreSQL - 死锁检测: |
每周安装量
110
代码仓库
GitHub 星标数
121
首次出现
2026年1月21日
安全审计
安装于
opencode93
gemini-cli92
codex89
cursor85
claude-code80
github-copilot77
Implement robust transaction management with ACID compliance, concurrency control, and error handling. Covers isolation levels, locking strategies, and deadlock resolution.
Simple Transaction:
-- Start transaction
BEGIN;
-- Multiple statements
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
-- Commit changes
COMMIT;
-- Or rollback
ROLLBACK;
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| PostgreSQL Transactions | PostgreSQL Transactions |
| MySQL Transactions | MySQL Transactions |
| PostgreSQL Isolation Levels | PostgreSQL Isolation Levels |
| MySQL Isolation Levels | MySQL Isolation Levels |
| PostgreSQL Explicit Locking | PostgreSQL Explicit Locking |
| MySQL Locking | MySQL Locking |
| Deadlock Prevention | PostgreSQL - Deadlock Detection: |
Weekly Installs
110
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode93
gemini-cli92
codex89
cursor85
claude-code80
github-copilot77
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
120,000 周安装