Add session info accessor for copy out
This commit is contained in:
parent
6e99874bd9
commit
20ce974662
@ -528,7 +528,7 @@ impl Format {
|
||||
/// # Warning
|
||||
///
|
||||
/// The underlying connection may not be used while a `CopyOutReader` exists.
|
||||
/// Any calls to the connection with panic.
|
||||
/// Any attempt to do so will panic.
|
||||
pub struct CopyOutReader<'a> {
|
||||
conn: RefMut<'a, InnerConnection>,
|
||||
format: Format,
|
||||
@ -554,6 +554,11 @@ impl<'a> CopyOutReader<'a> {
|
||||
&self.column_formats
|
||||
}
|
||||
|
||||
/// Returns session info for the associated connection.
|
||||
pub fn session_info<'b>(&'b self) -> SessionInfo<'b> {
|
||||
SessionInfo::new(&*self.conn)
|
||||
}
|
||||
|
||||
/// Consumes the `CopyOutReader`, throwing away any unread data.
|
||||
///
|
||||
/// Functionally equivalent to `CopyOutReader`'s `Drop` implementation,
|
||||
|
Loading…
Reference in New Issue
Block a user