Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Jubilee <[email protected]>
  • Loading branch information
YohDeadfall and workingjubilee authored Nov 25, 2024
1 parent e1c1216 commit 9836848
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pgrx/src/datum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ impl<'src> Datum<'src> {
/// Implemented automatically by `#[derive(PostgresType)]`
pub trait PostgresType {}

/// Creates a [`Vec<pg_sys::Oid>`] containing identifiers of the provded types.
/// Creates an array of [`pg_sys::Oid`] with the OID of each provided type
///
/// # Examples
///
/// ```
/// use pgrx::{oids_of, datum::IntoDatum};
///
/// let oids = oids_of![i32, f64];
/// assert_eq!(oids[0], i32::type_oid().into());
/// assert_eq!(oids[1], f64::type_oid().into());
Expand All @@ -168,6 +169,7 @@ pub trait PostgresType {}
#[macro_export]
macro_rules! oids_of {
() =>(
// avoid coercions to an ambiguously-typed array or slice
[$crate::pg_sys::PgOid::Invalid; 0]
);
($($t:path),+ $(,)?) => (
Expand Down

0 comments on commit 9836848

Please sign in to comment.