Struct pgwire::protocol::StateMachine [−][src]
struct StateMachine<'a, A> {
conn: &'a mut FramedConn<A>,
coord_client: &'a mut SessionClient,
metrics: &'a Metrics,
}
Fields
conn: &'a mut FramedConn<A>
coord_client: &'a mut SessionClient
metrics: &'a Metrics
Implementations
impl<'a, A> StateMachine<'a, A> where
A: AsyncRead + AsyncWrite + AsyncReady + Send + Sync + Unpin + 'a,
impl<'a, A> StateMachine<'a, A> where
A: AsyncRead + AsyncWrite + AsyncReady + Send + Sync + Unpin + 'a,
Commits and clears the current transaction.
Rollback and clears the current transaction.
End a transaction and report to the user if an error occurred.
async fn bind(
&mut self,
portal_name: String,
statement_name: String,
param_formats: Vec<Format>,
raw_params: Vec<Option<Vec<u8>>>,
result_formats: Vec<Format>
) -> Result<State, Error>
fn execute(
&mut self,
portal_name: String,
max_rows: ExecuteCount,
get_response: fn(max_rows: ExecuteCount, total_sent_rows: usize, fetch_portal: Option<&mut Portal>) -> BackendMessage,
fetch_portal_name: Option<String>,
timeout: ExecuteTimeout
) -> BoxFuture<'_, Result<State, Error>>
async fn fetch(
&mut self,
name: String,
count: Option<FetchDirection>,
max_rows: ExecuteCount,
fetch_portal_name: Option<String>,
timeout: ExecuteTimeout
) -> Result<State, Error>
async fn send_execute_response(
&mut self,
response: ExecuteResponse,
row_desc: Option<RelationDesc>,
portal_name: String,
max_rows: ExecuteCount,
get_response: fn(max_rows: ExecuteCount, total_sent_rows: usize, fetch_portal: Option<&mut Portal>) -> BackendMessage,
fetch_portal_name: Option<String>,
timeout: ExecuteTimeout
) -> Result<State, Error>
async fn send_rows(
&mut self,
row_desc: RelationDesc,
portal_name: String,
rows: InProgressRows,
max_rows: ExecuteCount,
get_response: fn(max_rows: ExecuteCount, total_sent_rows: usize, fetch_portal: Option<&mut Portal>) -> BackendMessage,
fetch_portal_name: Option<String>,
timeout: ExecuteTimeout
) -> Result<State, Error>
async fn copy_rows(
&mut self,
format: CopyFormat,
row_desc: RelationDesc,
stream: RowBatchStream
) -> Result<State, Error>
async fn copy_from(
&mut self,
id: GlobalId,
columns: Vec<usize>,
params: CopyParams,
row_desc: RelationDesc
) -> Result<State, Error>
async fn copy_from(
&mut self,
id: GlobalId,
columns: Vec<usize>,
params: CopyParams,
row_desc: RelationDesc
) -> Result<State, Error>
Handles the copy-in mode of the postgres protocol from transferring data to the server.
Auto Trait Implementations
impl<'a, A> !RefUnwindSafe for StateMachine<'a, A>
impl<'a, A> Send for StateMachine<'a, A> where
A: Send,
impl<'a, A> Sync for StateMachine<'a, A> where
A: Sync,
impl<'a, A> Unpin for StateMachine<'a, A>
impl<'a, A> !UnwindSafe for StateMachine<'a, A>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more