Skip to content

Commit a2124c3

Browse files
Merge pull request #2169 from taozhi8833998/refactor-type
refactor: Insert_Replace values chould be Select type
2 parents f693c2c + e136ba2 commit a2124c3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pegjs/mysql.pegjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,7 @@ insert_partition
26592659
= KW_PARTITION __ LPAREN __ head:ident_name tail:(__ COMMA __ ident_name)* __ RPAREN {
26602660
return createList(head, tail)
26612661
}
2662-
/ KW_PARTITION __ v: value_item {
2662+
/ KW_PARTITION __ v:value_item {
26632663
return v
26642664
}
26652665

types.d.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,15 @@ export interface Select {
232232
}
233233
export interface Insert_Replace {
234234
type: "replace" | "insert";
235-
db: string | null;
236235
table: any;
237236
columns: string[] | null;
238-
values: InsertReplaceValue[];
237+
values: InsertReplaceValue[] | Select;
238+
partition: any[];
239+
prefix: string;
240+
on_duplicate_update: {
241+
keyword: "on duplicate key update",
242+
set: SetList[];
243+
};
239244
loc?: LocationRange;
240245
}
241246
export interface Update {

0 commit comments

Comments
 (0)