Condition could have more detailed fields
還沒有人認領這個 Issue。
評估
研究方向
先找出 parser 的 Condition 實例和現有的 expr 欄位。比較所要求的 c.id = 2 和 customer.address_id IS NOT NULL 範例,接著定義必須公開哪些結構化的 operator 和 operand 資訊;當 conditions 提供這些詳細資訊,而不只是字串時,工作就完成了。
由索引模型根據 Issue 內容生成。
描述
Currently, when I parse a query, I get WHERE as Condition instances. These have an expr field, which is just a string and not very useful when analyzing a query. It would be really nice if we could be able to get more detail from that, like the operator, operands, etc.
Examples:
// c.id = 2
[
leftOperand: ColumnReference [ column: 'id', tableAlias: 'c' ] ,
operator: Equals []
rightOperand: Constant [ value: 2 ]
]
// customer.address_id IS NOT NULL
[
leftOperand: ColumnReference [ column: 'address_id', tableName: 'customer' ] ,
operator: IsNotNull
rightOperand: null
]
- 主要語言
- PHP
- 星號
- 486
- 分支
- 119
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
phpmyadmin/sql-parser 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
phpmyadmin/sql-parser#671 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
phpmyadmin/sql-parser#655 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 55/100
phpmyadmin/sql-parser#666 ·
-
難度 3/5 1-2 天 新手友好度 65/100
phpmyadmin/sql-parser#662 · 2 個 reaction ·
-
kind/support
難度 3/5 1-2 天 新手友好度 45/100
phpmyadmin/sql-parser#653 · 1 個 reaction ·
查看 phpmyadmin/sql-parser 的全部 Issue
相似的 Issue
-
sync-en
難度 2/5 1-2 天 新手友好度 84/100
維護者通常 2 天內回覆
-
feature-request needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
aws/aws-sdk-php#3365 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 90/100
-
bug status: unverified
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
woocommerce/google-listings-and-ads#3884 ·
維護者通常 1 天內回覆