Enum pgwire::message::FrontendMessage [−][src]
pub enum FrontendMessage {
Show 14 variants
Query {
sql: String,
},
Parse {
name: String,
sql: String,
param_types: Vec<u32>,
},
DescribeStatement {
name: String,
},
DescribePortal {
name: String,
},
Bind {
portal_name: String,
statement_name: String,
param_formats: Vec<Format>,
raw_params: Vec<Option<Vec<u8>>>,
result_formats: Vec<Format>,
},
Execute {
portal_name: String,
max_rows: i32,
},
Flush,
Sync,
CloseStatement {
name: String,
},
ClosePortal {
name: String,
},
Terminate,
CopyData(Vec<u8>),
CopyDone,
CopyFail(String),
}
Expand description
A decoded frontend pgwire message, representing instructions for the backend.
Variants
Query
Fields
sql: String
The SQL to execute.
Execute the specified SQL.
This is issued as part of the simple query flow.
Parse
Fields
name: String
The name of the prepared statement to create. An empty string specifies the unnamed prepared statement.
sql: String
The SQL to parse.
Parse the specified SQL into a prepared statement.
This starts the extended query flow.
DescribeStatement
Fields
name: String
The name of the prepared statement to describe.
Describe an existing prepared statement.
This command is part of the extended query flow.
DescribePortal
Fields
name: String
The name of the portal to describe.
Describe an existing portal.
This command is part of the extended query flow.
Bind
Fields
portal_name: String
The destination portal. An empty string selects the unnamed
portal. The portal can later be executed with the Execute
command.
statement_name: String
The source prepared statement. An empty string selects the unnamed prepared statement.
Bind an existing prepared statement to a portal.
Note that we can’t actually bind parameters yet (issue#609), but that is an important part of this command.
This command is part of the extended query flow.
Execute
Fields
portal_name: String
The name of the portal to execute.
max_rows: i32
The maximum number number of rows to return before suspending.
0 or negative means infinite.
Execute a bound portal.
This command is part of the extended query flow.
Flush
Flush any pending output.
This command is part of the extended query flow.
Sync
Finish an extended query.
This command is part of the extended query flow.
CloseStatement
Fields
name: String
Close the named statement.
This command is part of the extended query flow.
ClosePortal
Fields
name: String
Close the named portal.
Terminate
Terminate a connection.
CopyData(Vec<u8>)
CopyDone
CopyFail(String)
Tuple Fields
0: String
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FrontendMessage
impl Send for FrontendMessage
impl Sync for FrontendMessage
impl Unpin for FrontendMessage
impl UnwindSafe for FrontendMessage
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