forked from constructive-io/libpg-query-node
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The Epxr type in @pg-nano/pg-parser/lib/ast.d.ts seems to be missing type MultiAssignRef, based on the AST I get for this example:
UPDATE users
SET (id, name, email) = ROW(1, 'John', NULL)
WHERE id = 1;Parser AST:
{
relation: {
relname: "users",
inh: true,
relpersistence: "p",
location: 20,
},
targetList: [
{
ResTarget: {
name: "id",
val: {
MultiAssignRef: {
source: {
RowExpr: {
args: [
{
A_Const: {
ival: {
ival: 1,
},
location: 66,
},
},
{
A_Const: {
sval: {
sval: "John",
},
location: 69,
},
},
{
A_Const: {
isnull: true,
location: 77,
},
},
],
row_format: "COERCE_EXPLICIT_CALL",
location: 62,
},
},
colno: 1,
ncolumns: 3,
},
},
location: 43,
},
},
{
ResTarget: {
name: "name",
val: {
MultiAssignRef: {
source: {
RowExpr: {
args: [
{
A_Const: {
ival: {
ival: 1,
},
location: 66,
},
},
{
A_Const: {
sval: {
sval: "John",
},
location: 69,
},
},
{
A_Const: {
isnull: true,
location: 77,
},
},
],
row_format: "COERCE_EXPLICIT_CALL",
location: 62,
},
},
colno: 2,
ncolumns: 3,
},
},
location: 47,
},
},
{
ResTarget: {
name: "email",
val: {
MultiAssignRef: {
source: {
RowExpr: {
args: [
{
A_Const: {
ival: {
ival: 1,
},
location: 66,
},
},
{
A_Const: {
sval: {
sval: "John",
},
location: 69,
},
},
{
A_Const: {
isnull: true,
location: 77,
},
},
],
row_format: "COERCE_EXPLICIT_CALL",
location: 62,
},
},
colno: 3,
ncolumns: 3,
},
},
location: 53,
},
},
],
whereClause: {
A_Expr: {
kind: "AEXPR_OP",
name: [
{
String: {
sval: "=",
},
},
],
lexpr: {
ColumnRef: {
fields: [
{
String: {
sval: "id",
},
},
],
location: 101,
},
},
rexpr: {
A_Const: {
ival: {
ival: 1,
},
location: 106,
},
},
location: 104,
},
},
}
Metadata
Metadata
Assignees
Labels
No labels