taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
820 stars 183 forks source link

refactor: Insert_Replace values chould be Select type #2169

Closed taozhi8833998 closed 1 month ago

taozhi8833998 commented 1 month ago
cansardan commented 1 month ago

did not open a new issue but theres also other props in insert object, specifically on_duplicate_update which need to access { type: "insert", table: [ { db: "mysql", table: "my_table", as: null, }, ], columns: [ "id", "value", ], values: [ { type: "expr_list", value: [ { type: "number", value: 1, }, { type: "number", value: 1, }, ], }, ], partition: null, prefix: "into", on_duplicate_update: { keyword: "on duplicate key update", set: [ { column: "value", value: { type: "number", value: 2, }, table: null, }, ], }, }

taozhi8833998 commented 1 month ago

did not open a new issue but theres also other props in insert object, specifically on_duplicate_update which need to access { type: "insert", table: [ { db: "mysql", table: "my_table", as: null, }, ], columns: [ "id", "value", ], values: [ { type: "expr_list", value: [ { type: "number", value: 1, }, { type: "number", value: 1, }, ], }, ], partition: null, prefix: "into", on_duplicate_update: { keyword: "on duplicate key update", set: [ { column: "value", value: { type: "number", value: 2, }, table: null, }, ], }, }

added it.

cansardan commented 1 month ago

thanks. when can we expect the changes be published?

taozhi8833998 commented 1 month ago

thanks. when can we expect the changes be published?

The new version has been published.