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.

param_types: Vec<u32>

The OID of each parameter data type for which the client wants to prespecify types. A zero OID is equivalent to leaving the type unspecified.

The number of specified parameter data types can be less than the number of parameters specified in the query.

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.

param_formats: Vec<Format>

The formats used to encode the parameters in raw_parameters.

raw_params: Vec<Option<Vec<u8>>>

The value of each parameter, encoded using the formats described by parameter_formats.

result_formats: Vec<Format>

The desired formats for the columns in the result set.

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>)

Tuple Fields

0: Vec<u8>

CopyDone

CopyFail(String)

Tuple Fields

0: String

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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