{
"id": "fastapi-query-in-loop",
"language": "python",
"group": "maintainability",
"listingTitle": "Review query in loop",
"title": "Review query in loop",
"mvvm": false,
"defaultSeverity": "info",
"legacyGroup": "maintainability",
"why": "Database access inside a loop creates an N+1 query pattern.",
"suggestion": "Batch or eager-load the related data outside the loop.",
"version": 3,
"semanticMaturity": "project",
"securityKind": "none",
"taxonomy": [
"maintainability"
],
"requirements": [
"sourceText"
],
"packs": [
"fastapi"
],
"implementation": "src/rules/frameworks/fastapi.rs",
"languages": [
"python"
],
"frameworks": [
"fastapi"
],
"languageVersions": [],
"limitations": [
"Loop bodies are scanned for common database query, execute, scalar, and session or repository get calls.",
"Generic get methods are excluded because they commonly represent dictionaries, HTTP clients, and file-transfer clients."
]
}