[−][src]Struct libpq::Connection
Methods
impl Connection
[src]
pub fn new(dsn: &str) -> Self
[src]
pub fn start(conninfo: &str) -> Self
[src]
pub fn set_db_login(
pghost: Option<&str>,
pgport: Option<&str>,
pgoptions: Option<&str>,
pgtty: Option<&str>,
db_name: Option<&str>,
login: Option<&str>,
pwd: Option<&str>
) -> Self
[src]
pghost: Option<&str>,
pgport: Option<&str>,
pgoptions: Option<&str>,
pgtty: Option<&str>,
db_name: Option<&str>,
login: Option<&str>,
pwd: Option<&str>
) -> Self
pub fn db(&self) -> String
[src]
pub fn user(&self) -> String
[src]
pub fn pass(&self) -> Option<String>
[src]
pub fn host(&self) -> String
[src]
pub fn port(&self) -> String
[src]
pub fn tty(&self) -> Option<String>
[src]
pub fn options(&self) -> Option<String>
[src]
pub fn status(&self) -> Status
[src]
pub fn transaction_status(&self) -> TransactionStatus
[src]
pub fn parameter_status(&self, param: &str) -> String
[src]
pub fn protocol_version(&self) -> i32
[src]
pub fn server_version(&self) -> i32
[src]
pub fn error_message(&self) -> Option<String>
[src]
pub fn socket(&self) -> Result<i32, ()>
[src]
pub fn backend_pid(&self) -> i32
[src]
pub fn poll(&self) -> Status
[src]
pub fn reset(&self)
[src]
pub fn reset_start(&self)
[src]
pub fn reset_poll(&self) -> Status
[src]
pub fn exec(&self, query: &str) -> Result
[src]
pub fn exec_params(
&self,
command: &str,
param_types: &[Type],
param_values: &[Option<&[u8]>],
param_formats: &[i32],
result_format: Format
) -> Result
[src]
&self,
command: &str,
param_types: &[Type],
param_values: &[Option<&[u8]>],
param_formats: &[i32],
result_format: Format
) -> Result
pub fn prepare(
&self,
name: Option<&str>,
query: &str,
param_types: &[Type]
) -> Result
[src]
&self,
name: Option<&str>,
query: &str,
param_types: &[Type]
) -> Result
pub fn exec_prepared(
&self,
name: &str,
params: &[Option<&[u8]>],
param_formats: &[i32],
result_format: Format
) -> Result
[src]
&self,
name: &str,
params: &[Option<&[u8]>],
param_formats: &[i32],
result_format: Format
) -> Result
pub fn escape_string(&self, from: &str) -> Result<String, i32>
[src]
pub fn escape_bytea(&self, from: &[u8]) -> Result<Vec<u8>, String>
[src]
pub fn client_encoding(&self) -> Encoding
[src]
pub fn set_client_encoding(&self, encoding: Encoding)
[src]
pub fn defaults(&self) -> Info
[src]
Trait Implementations
impl Debug for Connection
[src]
impl Drop for Connection
[src]
impl From<*mut pg_conn> for Connection
[src]
impl<'_> Into<*const pg_conn> for &'_ Connection
[src]
impl<'_> Into<*mut pg_conn> for &'_ Connection
[src]
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,