Skip to main content

Postgres

Struct Postgres 

Source
pub struct Postgres { /* private fields */ }

Implementations§

Source§

impl Postgres

Source

pub fn connect(url: &str, tls: Option<&dyn Tls>) -> Result<Postgres, String>

tls is None in ironwork’s own build, which then connects without TLS.

Source

pub fn source(&self) -> &str

The server and database, as a recording’s header names them.

Trait Implementations§

Source§

impl Database for Postgres

Source§

fn execute(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

Two rows are enough to tell a SELECT INTO’s one row from its too many.

Source§

fn prepare(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

PostgreSQL parses the statement string as Db2’s PREPARE does, so its errors come at PREPARE, and describes its result columns.

Source§

fn insert_rows( &mut self, call: &Call<'_>, rows: &[Vec<Value>], atomic: bool, ) -> Result<Outcome, Abandoned>

ATOMIC inserts every row under the call’s one savepoint, so a failure undoes them all; NOT ATOMIC gives each row its own, as Db2 keeps the rows that went in (numeric::assumptions::NOT_ATOMIC_SUMMARY).

Source§

fn open(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

Source§

fn fetch(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

One row, or no row at the end.
Source§

fn fetch_rows( &mut self, call: &Call<'_>, rows: u32, ) -> Result<Outcome, Abandoned>

Up to rows rows for a rowset FETCH, fewer at the end.
Source§

fn close(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

Source§

fn commit(&mut self, _: &Call<'_>) -> Result<Outcome, Abandoned>

Source§

fn rollback(&mut self, _: &Call<'_>) -> Result<Outcome, Abandoned>

Source§

fn close_all(&mut self) -> Result<(), Abandoned>

Closes every cursor, held ones too, as the end of a CICS task does, so the next task on the same connection finds none open. A backend without cursors of its own has nothing to close.
Source§

fn call(&mut self, call: &Call<'_>) -> Result<Outcome, Abandoned>

CALL of a stored procedure, which a backend that runs none refuses; the answer’s parameters give the arguments as the procedure returns them (numeric::assumptions::CALL_FROM_A_RECORDING).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.