[][src]Struct pgx::spi::Spi

pub struct Spi;

Implementations

impl Spi[src]

pub fn get_one<A: FromDatum + IntoDatum>(query: &str) -> Option<A>[src]

pub fn get_two<A: FromDatum + IntoDatum, B: FromDatum + IntoDatum>(
    query: &str
) -> (Option<A>, Option<B>)
[src]

pub fn get_three<A: FromDatum + IntoDatum, B: FromDatum + IntoDatum, C: FromDatum + IntoDatum>(
    query: &str
) -> (Option<A>, Option<B>, Option<C>)
[src]

pub fn get_one_with_args<A: FromDatum + IntoDatum>(
    query: &str,
    args: Vec<(PgOid, Option<Datum>)>
) -> Option<A>
[src]

pub fn get_two_with_args<A: FromDatum + IntoDatum, B: FromDatum + IntoDatum>(
    query: &str,
    args: Vec<(PgOid, Option<Datum>)>
) -> (Option<A>, Option<B>)
[src]

pub fn get_three_with_args<A: FromDatum + IntoDatum, B: FromDatum + IntoDatum, C: FromDatum + IntoDatum>(
    query: &str,
    args: Vec<(PgOid, Option<Datum>)>
) -> (Option<A>, Option<B>, Option<C>)
[src]

pub fn run(query: &str)[src]

just run an arbitrary SQL statement.

Safety

The statement runs in read/write mode

pub fn explain(query: &str) -> Json[src]

explain a query, returning its result in json form

pub fn execute<F: FnOnce(SpiClient) + UnwindSafe>(f: F)[src]

execute SPI commands via the provided SpiClient

pub fn connect<R: FromDatum + IntoDatum, F: FnOnce(SpiClient) -> Result<Option<R>, SpiError>>(
    f: F
) -> Option<R>
[src]

execute SPI commands via the provided SpiClient and return a value from SPI which is automatically copied into the CurrentMemoryContext at the time of this function call

pub fn check_status(status_code: i32) -> SpiOk[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.