Skip to content

Parsing CAST function in MySQL #1929

@1ilit

Description

@1ilit

Describe the bug
Throws SyntaxError when parsing CAST()

Database Engine
MySQL

To Reproduce
-the SQL that be parsed

CREATE TABLE some_table (
    col JSON,
    KEY `idx_col` ((CAST(`col` AS CHAR(12) ARRAY)))
);

-the node-sql-parser version
v5.1.0
-the node version
v18.20.3

Expected behavior
Produce ast

Additional context
Minimal reproducible example: https://stackblitz.com/edit/stackblitz-starters-9dpxty?file=index.js

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions