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

MariaDB support

Open nene opened this issue 3 years ago • 0 comments

Most of MariaDB syntax is the same as MySQL. This issue lists only the differences.

Expressions

  • [x] No JSON operators (->, ->>)
  • [x] No MEMBER OF operator

Query syntax

  • [x] SQL_CACHE modifier
  • [x] No WITH ROLLUP in ORDER BY
  • [x] Limiting:
    • [x] ROWS EXAMINED rows_limit
    • [x] OFFSET start {ROW ROWS}
    • [x] FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES }
  • [ ] PROCEDURE clause
  • [x] No FOR SHARE (only FOR UPDATE)
  • [ ] LOCK IN SHARE MODE with lock_option parameter (I've found no examples of this lock_option being used).
  • [ ] FROM clause:
    • [ ] No ODBC { OJ } syntax
    • [ ] No LATERAL
    • [ ] No NATURAL INNER JOIN
    • [ ] FOR SYSTEM_TIME specification (combined with PARTITION)
  • [ ] MINUS {ALL | DISTINCT} in addition to UNION etc.

Statements

  • [ ] DELETE
    • [ ] FOR PORTION OF period FROM _ TO _
    • [x] RETURNING clause
    • [ ] DELETE HISTORY
    • [x] No WITH clause
  • [ ] UPDATE
    • [ ] FOR PORTION OF period FROM _ TO _
    • [ ] No WITH clause
    • [ ] PARTITION (..) clause
  • [x] INSERT
    • [x] RETURNING clause

DDL Statements

  • [ ] CREATE TABLE
    • [ ] CONSTRAINT [name] can only be used with CHECK(), PRIMARY KEY, FOREIGN KEY, UNIQUE.
    • [x] no support for [NOT] ENFORCED modifier on CHECK() (or any other) constraint.
  • [ ] RENAME TABLE
    • [ ] TABLE[S]
    • [ ] IF EXISTS
    • [ ] WAIT n | NOWAIT
  • [ ] DROP TABLE
    • [ ] WAIT n | NOWAIT
  • [ ] ALTER TABLE
    • [ ] ALTER [ONLINE] [IGNORE] TABLE
    • [ ] IF EXISTS
    • [ ] WAIT n | NOWAIT
    • [ ] alter actions:
      • [ ] no RENAME [AS], only RENAME [TO]
      • [x] ADD [COLUMN] [IF NOT EXISTS]
      • [ ] ADD [CONSTRAINT [symbol]] FOREIGN KEY [IF NOT EXISTS] ...
      • [x] DROP CONSTRAINT IF EXISTS
      • [x] no ALTER CONSTRAINT
      • [x] no DROP CHECK
      • [x] no ALTER COLUMN SET {VISIBLE | INVISIBLE}
  • [ ] CREATE VIEW
    • [ ] DEFINER = user | CURRENT_USER | role | CURRENT_ROLE
    • [x] IF NOT EXISTS
  • [ ] ALTER VIEW
    • [ ] DEFINER = user | CURRENT_USER

nene avatar Mar 05 '23 19:03 nene