Support nested folders in `config/queries/` for query organization
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 72/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- sql, typescript
研究方向
先閱讀 plugins/server/utils.js 中的 AppManager.getAppQuery()、getQueries(),以及 typegen 中的 generateQueriesFromDescribe(),然後檢查它們對 flat readdir 和 path.basename 的處理。完成的標準是:巢狀的 .sql 檔案能解析為穩定的相對 query key、驗證接受所選的 separator,且型別產生與前端查找涵蓋文件中的範例。
由索引模型根據 Issue 內容生成。
描述
Support nested folders in config/queries/ for query organization
Problem
As the number of SQL queries in a project grows, config/queries/ becomes a flat bag of files with no way to organize them by feature or domain. The only option is naming conventions (e.g. nego_chart_data.sql, trip_summary.sql), which doesn't scale well and provides no structural separation.
Current behavior
AppManagerhardcodesqueriesDirtopath.resolve(process.cwd(), "config/queries")fs.readdir()is non-recursive — subdirectories are silently ignored- Query key validation (
/^[a-zA-Z0-9_-]+$/) rejects any delimiter that could encode a path generate-types(typegen) also uses flatreaddir+path.basename
Proposed behavior
Allow queries to live in subdirectories:
config/queries/
negotiations/
chart_data.sql
spend_summary.sql
dashboard/
trip_summary.sql
trips_by_day.sql
docs/
annotations.obo.sql
Query key derivation would use the relative path with a separator (e.g. / or .):
negotiations/chart_dataornegotiations.chart_data
Frontend usage:
useAnalyticsQuery('negotiations/chart_data', params)
Minimal change required
The fix is small — roughly 3-4 locations need updating:
AppManager.getAppQuery()— changefs.readdir()tofs.readdir(dir, { recursive: true })and adjust filename matching to include relative subdirectory pathsgetQueries()inplugins/server/utils.js— same recursive readdir changegenerateQueriesFromDescribe()in typegen — derive query names from relative paths instead of justpath.basename()- Query key validation regex — allow
/or.as a path separator
Workarounds
Currently using prefix naming (nego_*, trip_*) which works but doesn't provide IDE folder navigation or structural grouping benefits.
- 主要語言
- TypeScript
- 星號
- 119
- 分支
- 36
- 平均合併
- 4 天 16 小時
- 30 天內合併 PR
- 37
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
databricks/appkit 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 55/100
databricks/appkit#729 ·
維護者通常 3 天內回覆
-
@databricks/lakebase: pool drops maxLifetimeSeconds and other pg options, so connections never recycle and Unity Catalog claims access fails after 4 hours可能已有人在做 @billmcmillin 於 5 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 20/100
databricks/appkit#718 ·
維護者通常 3 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
databricks/appkit#699 ·
維護者通常 3 天內回覆
-
難度 3/5 半天 新手友好度 42/100
databricks/appkit#656 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 4/5 3-5 天 新手友好度 28/100
databricks/appkit#648 · 2 則留言 ·
維護者通常 3 天內回覆
查看 databricks/appkit 的全部 Issue
相似的 Issue
-
Add "append" and "prepend" slots for vue-vuetify extended renderers可能已有人在做 @simeyc 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
eclipsesource/jsonforms#2668 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
README の通知条件を実際の判定処理に合わせる可能已有人在做 @unhappychoice 今天認領。 未關閉factory:in-progress priority:medium
難度 1/5 1 小時以內 新手友好度 90/100
unhappychoice/oss-issue-opener#395 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug Website
難度 2/5 1-3 小時 新手友好度 77/100
OWASP/OWASP-Hunting#88 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆