phpmyadmin / phpmyadmin/sql-parser
Condition could have more detailed fields
オープン
まだ誰も着手していません。
enhancement
- 主要言語
- PHP
- スター
- 485
- フォーク
- 119
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
]
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、parser の Condition インスタンスと既存の expr フィールドを見つけます。要求されている c.id = 2 と customer.address_id IS NOT NULL の例を比較し、どのような構造化された operator と operand の情報を公開する必要があるかを定義します。conditions が単なる文字列ではなく、その詳細を提供できるようになった時点で作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php, sql
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100