-
-
Notifications
You must be signed in to change notification settings - Fork 117
chore: bump pgrx version to 0.16.0 #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/// GraphQL field and argument name constants used throughout the codebase | ||
/// | ||
/// This module centralizes all magic strings to prevent typos and make refactoring easier. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed clippy warning due to extra line in docs.
pub const SET: &str = "set"; | ||
pub const AT_MOST: &str = "atMost"; | ||
pub const AT: &str = "at"; | ||
pub const DELETE_USING_NODE_ID: &str = "deleteUsingNodeId"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed clippy warning about unused consts.
pub struct SchemaType { | ||
pub schema: Arc<__Schema>, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed clippy warning about unused type.
|
||
use pgrx::prelude::*; | ||
|
||
let spi_result: GraphQLResult<serde_json::Value> = Spi::connect(|mut conn| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change the method being called to get a mutable reference to conn
to make the code compile.
pub(crate) fn get_one_readonly<A: FromDatum + IntoDatum>( | ||
query: &str, | ||
) -> std::result::Result<Option<A>, pgrx::spi::Error> { | ||
Spi::connect(|client| client.select(query, Some(1), None)?.first().get_one()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signature changed in latest pgrx version.
self.params.push(datum_with_oid); | ||
Ok(format!("(${}::{})", self.params.len(), type_name)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes in this file are due to changes in signature of method in latest pgrx version.
This PR bumpgs pgrx to the latest release version 0.16.0. Had to update some code to make the code compile. Also fixed some clippy warnings.