database-operations

有关如何使用 SQLAlchemy 编写数据库查询的说明。

📖 中文导读:有关如何使用 SQLAlchemy 编写数据库查询的说明。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: database-operations description: Instructions on how to write database queries with SQLAlchemy.

When performing database operations using SQLAlchemy, follow these guidelines to ensure efficient and maintainable code:

  • Avoid for-loops. Instead always prefer bulk operations using SQLAlchemy's built-in methods or use SQL joins to get related data in a single query.
  • Database operations should be contained in repository classes