Skip to content
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

Spi Arguments have no working examples or docs #1976

Open
danielgerlag opened this issue Feb 6, 2025 · 1 comment
Open

Spi Arguments have no working examples or docs #1976

danielgerlag opened this issue Feb 6, 2025 · 1 comment

Comments

@danielgerlag
Copy link

danielgerlag commented Feb 6, 2025

It seems that PR - #1858 was merged in October 2024. Which changes how arguments are passed to Spi. These changes have not been published to crates.io, so by using the version available on crates.io, there are no longer any valid examples or documentation on how to pass arguments to Spi.

This is what you need to consume

fn get_one_with_args<A: FromDatum + IntoDatum>(
        query: &str,
        args: Vec<(PgOid, Option<pg_sys::Datum>)>,
    ) -> Result<Option<A>>

All examples show how to consume this

fn get_one_with_args<'mcx, A: FromDatum + IntoDatum>(
        query: &str,
        args: &[DatumWithOid<'mcx>],
    ) -> Result<Option<A>>
@workingjubilee
Copy link
Member

I was not aware that docs.rs had stopped hosting the documentation for previous versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants