Skip to content

Commit

Permalink
Upgrade to libpg_query 17
Browse files Browse the repository at this point in the history
  • Loading branch information
msepga committed Nov 26, 2024
1 parent 4bbe866 commit 58fdeb4
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libpg_query
Submodule libpg_query updated 632 files
34 changes: 33 additions & 1 deletion src/node_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,22 @@ impl NodeEnum {
NodeEnum::JsonObjectAgg(n) => NodeRef::JsonObjectAgg(n),
NodeEnum::JsonArrayAgg(n) => NodeRef::JsonArrayAgg(n),
NodeEnum::RtepermissionInfo(n) => NodeRef::RtepermissionInfo(n),
NodeEnum::WindowFuncRunCondition(n) => NodeRef::WindowFuncRunCondition(n),
NodeEnum::MergeSupportFunc(n) => NodeRef::MergeSupportFunc(n),
NodeEnum::JsonBehavior(n) => NodeRef::JsonBehavior(n),
NodeEnum::JsonExpr(n) => NodeRef::JsonExpr(n),
NodeEnum::JsonTablePath(n) => NodeRef::JsonTablePath(n),
NodeEnum::JsonTablePathScan(n) => NodeRef::JsonTablePathScan(n),
NodeEnum::JsonTableSiblingJoin(n) => NodeRef::JsonTableSiblingJoin(n),
NodeEnum::SinglePartitionSpec(n) => NodeRef::SinglePartitionSpec(n),
NodeEnum::JsonArgument(n) => NodeRef::JsonArgument(n),
NodeEnum::JsonFuncExpr(n) => NodeRef::JsonFuncExpr(n),
NodeEnum::JsonTablePathSpec(n) => NodeRef::JsonTablePathSpec(n),
NodeEnum::JsonTable(n) => NodeRef::JsonTable(n),
NodeEnum::JsonTableColumn(n) => NodeRef::JsonTableColumn(n),
NodeEnum::JsonParseExpr(n) => NodeRef::JsonParseExpr(n),
NodeEnum::JsonScalarExpr(n) => NodeRef::JsonScalarExpr(n),
NodeEnum::JsonSerializeExpr(n) => NodeRef::JsonSerializeExpr(n),
}
}

Expand Down Expand Up @@ -1332,7 +1348,7 @@ impl NodeEnum {
NodeEnum::CreateStatsStmt(n) => NodeMut::CreateStatsStmt(n as *mut _),
NodeEnum::AlterCollationStmt(n) => NodeMut::AlterCollationStmt(n as *mut _),
NodeEnum::CallStmt(n) => NodeMut::CallStmt(&mut **n as *mut _),
NodeEnum::AlterStatsStmt(n) => NodeMut::AlterStatsStmt(n as *mut _),
NodeEnum::AlterStatsStmt(n) => NodeMut::AlterStatsStmt(&mut **n as *mut _),
NodeEnum::AExpr(n) => NodeMut::AExpr(&mut **n as *mut _),
NodeEnum::ColumnRef(n) => NodeMut::ColumnRef(n as *mut _),
NodeEnum::ParamRef(n) => NodeMut::ParamRef(n as *mut _),
Expand Down Expand Up @@ -1420,6 +1436,22 @@ impl NodeEnum {
NodeEnum::JsonObjectAgg(n) => NodeMut::JsonObjectAgg(&mut **n as *mut _),
NodeEnum::JsonArrayAgg(n) => NodeMut::JsonArrayAgg(&mut **n as *mut _),
NodeEnum::RtepermissionInfo(n) => NodeMut::RtepermissionInfo(&mut *n as *mut _),
NodeEnum::WindowFuncRunCondition(n) => NodeMut::WindowFuncRunCondition(&mut **n as *mut _),
NodeEnum::MergeSupportFunc(n) => NodeMut::MergeSupportFunc(&mut **n as *mut _),
NodeEnum::JsonBehavior(n) => NodeMut::JsonBehavior(&mut **n as *mut _),
NodeEnum::JsonExpr(n) => NodeMut::JsonExpr(&mut **n as *mut _),
NodeEnum::JsonTablePath(n) => NodeMut::JsonTablePath(&mut *n as *mut _),
NodeEnum::JsonTablePathScan(n) => NodeMut::JsonTablePathScan(&mut **n as *mut _),
NodeEnum::JsonTableSiblingJoin(n) => NodeMut::JsonTableSiblingJoin(&mut **n as *mut _),
NodeEnum::SinglePartitionSpec(n) => NodeMut::SinglePartitionSpec(&mut *n as *mut _),
NodeEnum::JsonArgument(n) => NodeMut::JsonArgument(&mut **n as *mut _),
NodeEnum::JsonFuncExpr(n) => NodeMut::JsonFuncExpr(&mut **n as *mut _),
NodeEnum::JsonTablePathSpec(n) => NodeMut::JsonTablePathSpec(&mut **n as *mut _),
NodeEnum::JsonTable(n) => NodeMut::JsonTable(&mut **n as *mut _),
NodeEnum::JsonTableColumn(n) => NodeMut::JsonTableColumn(&mut **n as *mut _),
NodeEnum::JsonParseExpr(n) => NodeMut::JsonParseExpr(&mut **n as *mut _),
NodeEnum::JsonScalarExpr(n) => NodeMut::JsonScalarExpr(&mut **n as *mut _),
NodeEnum::JsonSerializeExpr(n) => NodeMut::JsonSerializeExpr(&mut **n as *mut _),
}
}
}
34 changes: 33 additions & 1 deletion src/node_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,22 @@ pub enum NodeMut {
JsonObjectAgg(*mut protobuf::JsonObjectAgg),
JsonArrayAgg(*mut protobuf::JsonArrayAgg),
RtepermissionInfo(*mut protobuf::RtePermissionInfo),
WindowFuncRunCondition(*mut protobuf::WindowFuncRunCondition),
MergeSupportFunc(*mut protobuf::MergeSupportFunc),
JsonBehavior(*mut protobuf::JsonBehavior),
JsonExpr(*mut protobuf::JsonExpr),
JsonTablePath(*mut protobuf::JsonTablePath),
JsonTablePathScan(*mut protobuf::JsonTablePathScan),
JsonTableSiblingJoin(*mut protobuf::JsonTableSiblingJoin),
SinglePartitionSpec(*mut protobuf::SinglePartitionSpec),
JsonArgument(*mut protobuf::JsonArgument),
JsonFuncExpr(*mut protobuf::JsonFuncExpr),
JsonTablePathSpec(*mut protobuf::JsonTablePathSpec),
JsonTable(*mut protobuf::JsonTable),
JsonTableColumn(*mut protobuf::JsonTableColumn),
JsonParseExpr(*mut protobuf::JsonParseExpr),
JsonScalarExpr(*mut protobuf::JsonScalarExpr),
JsonSerializeExpr(*mut protobuf::JsonSerializeExpr),
}

impl NodeMut {
Expand Down Expand Up @@ -432,7 +448,7 @@ impl NodeMut {
NodeMut::CreateStatsStmt(n) => Ok(NodeEnum::CreateStatsStmt(n.as_ref().ok_or(err)?.clone())),
NodeMut::AlterCollationStmt(n) => Ok(NodeEnum::AlterCollationStmt(n.as_ref().ok_or(err)?.clone())),
NodeMut::CallStmt(n) => Ok(NodeEnum::CallStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::AlterStatsStmt(n) => Ok(NodeEnum::AlterStatsStmt(n.as_ref().ok_or(err)?.clone())),
NodeMut::AlterStatsStmt(n) => Ok(NodeEnum::AlterStatsStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::AExpr(n) => Ok(NodeEnum::AExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::ColumnRef(n) => Ok(NodeEnum::ColumnRef(n.as_ref().ok_or(err)?.clone())),
NodeMut::ParamRef(n) => Ok(NodeEnum::ParamRef(n.as_ref().ok_or(err)?.clone())),
Expand Down Expand Up @@ -520,6 +536,22 @@ impl NodeMut {
NodeMut::JsonObjectAgg(n) => Ok(NodeEnum::JsonObjectAgg(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonArrayAgg(n) => Ok(NodeEnum::JsonArrayAgg(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::RtepermissionInfo(n) => Ok(NodeEnum::RtepermissionInfo(n.as_ref().ok_or(err)?.clone())),
NodeMut::WindowFuncRunCondition(n) => Ok(NodeEnum::WindowFuncRunCondition(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::MergeSupportFunc(n) => Ok(NodeEnum::MergeSupportFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonBehavior(n) => Ok(NodeEnum::JsonBehavior(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonExpr(n) => Ok(NodeEnum::JsonExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonTablePath(n) => Ok(NodeEnum::JsonTablePath(n.as_ref().ok_or(err)?.clone())),
NodeMut::JsonTablePathScan(n) => Ok(NodeEnum::JsonTablePathScan(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonTableSiblingJoin(n) => Ok(NodeEnum::JsonTableSiblingJoin(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::SinglePartitionSpec(n) => Ok(NodeEnum::SinglePartitionSpec(n.as_ref().ok_or(err)?.clone())),
NodeMut::JsonArgument(n) => Ok(NodeEnum::JsonArgument(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonFuncExpr(n) => Ok(NodeEnum::JsonFuncExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonTablePathSpec(n) => Ok(NodeEnum::JsonTablePathSpec(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonTable(n) => Ok(NodeEnum::JsonTable(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonTableColumn(n) => Ok(NodeEnum::JsonTableColumn(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonParseExpr(n) => Ok(NodeEnum::JsonParseExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonScalarExpr(n) => Ok(NodeEnum::JsonScalarExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
NodeMut::JsonSerializeExpr(n) => Ok(NodeEnum::JsonSerializeExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
}
}
}
Expand Down
34 changes: 33 additions & 1 deletion src/node_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,22 @@ pub enum NodeRef<'a> {
JsonObjectAgg(&'a protobuf::JsonObjectAgg),
JsonArrayAgg(&'a protobuf::JsonArrayAgg),
RtepermissionInfo(&'a protobuf::RtePermissionInfo),
WindowFuncRunCondition(&'a protobuf::WindowFuncRunCondition),
MergeSupportFunc(&'a protobuf::MergeSupportFunc),
JsonBehavior(&'a protobuf::JsonBehavior),
JsonExpr(&'a protobuf::JsonExpr),
JsonTablePath(&'a protobuf::JsonTablePath),
JsonTablePathScan(&'a protobuf::JsonTablePathScan),
JsonTableSiblingJoin(&'a protobuf::JsonTableSiblingJoin),
SinglePartitionSpec(&'a protobuf::SinglePartitionSpec),
JsonArgument(&'a protobuf::JsonArgument),
JsonFuncExpr(&'a protobuf::JsonFuncExpr),
JsonTablePathSpec(&'a protobuf::JsonTablePathSpec),
JsonTable(&'a protobuf::JsonTable),
JsonTableColumn(&'a protobuf::JsonTableColumn),
JsonParseExpr(&'a protobuf::JsonParseExpr),
JsonScalarExpr(&'a protobuf::JsonScalarExpr),
JsonSerializeExpr(&'a protobuf::JsonSerializeExpr),
}

impl<'a> NodeRef<'a> {
Expand Down Expand Up @@ -431,7 +447,7 @@ impl<'a> NodeRef<'a> {
NodeRef::CreateStatsStmt(n) => NodeEnum::CreateStatsStmt((*n).clone()),
NodeRef::AlterCollationStmt(n) => NodeEnum::AlterCollationStmt((*n).clone()),
NodeRef::CallStmt(n) => NodeEnum::CallStmt(Box::new((*n).clone())),
NodeRef::AlterStatsStmt(n) => NodeEnum::AlterStatsStmt((*n).clone()),
NodeRef::AlterStatsStmt(n) => NodeEnum::AlterStatsStmt(Box::new((*n).clone())),
NodeRef::AExpr(n) => NodeEnum::AExpr(Box::new((*n).clone())),
NodeRef::ColumnRef(n) => NodeEnum::ColumnRef((*n).clone()),
NodeRef::ParamRef(n) => NodeEnum::ParamRef((*n).clone()),
Expand Down Expand Up @@ -519,6 +535,22 @@ impl<'a> NodeRef<'a> {
NodeRef::JsonObjectAgg(n) => NodeEnum::JsonObjectAgg(Box::new((*n).clone())),
NodeRef::JsonArrayAgg(n) => NodeEnum::JsonArrayAgg(Box::new((*n).clone())),
NodeRef::RtepermissionInfo(n) => NodeEnum::RtepermissionInfo((*n).clone()),
NodeRef::WindowFuncRunCondition(n) => NodeEnum::WindowFuncRunCondition(Box::new((*n).clone())),
NodeRef::MergeSupportFunc(n) => NodeEnum::MergeSupportFunc(Box::new((*n).clone())),
NodeRef::JsonBehavior(n) => NodeEnum::JsonBehavior(Box::new((*n).clone())),
NodeRef::JsonExpr(n) => NodeEnum::JsonExpr(Box::new((*n).clone())),
NodeRef::JsonTablePath(n) => NodeEnum::JsonTablePath((*n).clone()),
NodeRef::JsonTablePathScan(n) => NodeEnum::JsonTablePathScan(Box::new((*n).clone())),
NodeRef::JsonTableSiblingJoin(n) => NodeEnum::JsonTableSiblingJoin(Box::new((*n).clone())),
NodeRef::SinglePartitionSpec(n) => NodeEnum::SinglePartitionSpec((*n).clone()),
NodeRef::JsonArgument(n) => NodeEnum::JsonArgument(Box::new((*n).clone())),
NodeRef::JsonFuncExpr(n) => NodeEnum::JsonFuncExpr(Box::new((*n).clone())),
NodeRef::JsonTablePathSpec(n) => NodeEnum::JsonTablePathSpec(Box::new((*n).clone())),
NodeRef::JsonTable(n) => NodeEnum::JsonTable(Box::new((*n).clone())),
NodeRef::JsonTableColumn(n) => NodeEnum::JsonTableColumn(Box::new((*n).clone())),
NodeRef::JsonParseExpr(n) => NodeEnum::JsonParseExpr(Box::new((*n).clone())),
NodeRef::JsonScalarExpr(n) => NodeEnum::JsonScalarExpr(Box::new((*n).clone())),
NodeRef::JsonSerializeExpr(n) => NodeEnum::JsonSerializeExpr(Box::new((*n).clone())),
}
}
}

0 comments on commit 58fdeb4

Please sign in to comment.