sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

A validating SQL lexer and parser with a focus on MySQL dialect.

Results 107 sql-parser issues
Sort by recently updated
recently updated
newest added

Benchmarks indicate a nice performance gain, too. Old: | benchmark | subject | set | revs | its | mem_peak | mode | rstdev | |----------------|---------------------------------------|-----|------|-----|----------|----------|--------| | UtfStringBench | benchBuildUtfString...

I sent an email to [email protected], but have not yet gotten a response. Did it get lost?

bug

Hello, I have query that's not parsed or built properly when `FORCE INDEX` is used: ```sql SELECT a.id, a.name, b.order_id, b.total FROM customers a INNER JOIN orders b FORCE INDEX...

Error validating a MySQL index with a sort order (supported in MySQL 8.0+) ```sql ALTER TABLE myTable ADD INDEX `IDX` (`column1`, `column2` DESC, `column3`, `column4`) ```

bug

11.7 is still alpha, but some new functions and ROW data type were added. ``` https://mariadb.com/kb/en/mariadb-11-6-0-release-notes/ https://mariadb.com/kb/en/mariadb-11-7-0-release-notes/ ```

kind/support

I am not sure if this is the right base and I don't know what the psalm and phpstan changes are about. This should fix https://github.com/phpmyadmin/phpmyadmin/issues/19320

`match` is better optimized than multiple `if` statements, especially when JIT is in use.

``` PS Z:\GitHub\sql-parser> php ./bin/highlight-query --query "SELECT * FROM `test` WHERE `col` = 1" SELECT * FROM est WHERE col = 1 ```

Feeding this SQL to the Parser: ```sql SELECT CASE WHEN a.kol = 1 THEN 'one' ELSE a.kol END as 'case' FROM foo a; ``` will result in errors, and calling...

bug

I wanted to make it into a value object too, but it was too much work to update the tests.