phpmyadmin / phpmyadmin/sql-parser
Support for special syntaxes for example in SQL_MODE='ORACLE'
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 485
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided CREATE TABLE statement in the SQL parser and inspect how timestamp columns with “without time zone” are tokenized and parsed. Done means the parser processes updated_at and long_url instead of stopping after created_at, with a regression test covering this input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100