phpmyadmin / phpmyadmin/sql-parser

Support for special syntaxes for example in SQL_MODE='ORACLE'

未關閉
#425 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

bug enhancement kind/support
主要語言
PHP
星號
485
分支
119
PR 合併指標
30 天內沒有已合併 PR

描述

Hello!

I know this library is primarily for MySQL dialects, but this is the only PHP SQL parser I could find...

This can't parse the 'custom' Postgres dump, but I found it can sort of parser the plain text format with varying results.

The parser seems to stop after the first timestamp column (it parsed created_at) so I have a bunch of table create statements with only two columns:

CREATE TABLE public.urls (
    id integer NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    long_url text NOT NULL
);

Any ideas why?

Thanks!

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先在 SQL 解析器中重現提供的 CREATE TABLE 陳述式,並檢查帶有「without time zone」的 timestamp 欄位如何進行詞法分析與解析。當解析器能處理 updated_at 和 long_url,而不是在 created_at 之後停止,並且有涵蓋此輸入的回歸測試時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
php, postgresql
領域
databases
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。