Skip to main content

Module sql

Module sql 

Source

StructsΒ§

BackendKeyData
Column
CommandStarting
Description
ExtendedRequest
An request to execute a SQL query using the extended protocol.
Notice
ParameterStatus
SqlError
SqlResponse
The response to a SqlRequest.

EnumsΒ§

Error
ExistingUser
SqlRequest
A request to execute SQL over HTTP.
SqlResult
The result of a single query in a SqlResponse.
StatementResult πŸ”’
WebSocketAuth
WebSocketResponse

StaticsΒ§

PER_REPLICA_LABELS πŸ”’

TraitsΒ§

ResultSender πŸ”’
Trait describing how to transmit a response to a client. HTTP clients accumulate into a Vec and send all at once. WebSocket clients send each message as they occur.

FunctionsΒ§

await_rows πŸ”’
execute_promsql_query πŸ”’
execute_request πŸ”’
Executes an entire SqlRequest.
execute_stmt πŸ”’
Executes a single statement in a SqlRequest.
execute_stmt_group πŸ”’
Returns Ok(Err) if any statement error’d during execution.
forward_notices πŸ”’
Forwards a collection of Notices to the provided WebSocket.
handle_promsql
handle_promsql_query πŸ”’
handle_sql
handle_sql_ws πŸ”’
is_txn_exit_stmt πŸ”’
make_notices πŸ”’
run_ws πŸ”’
run_ws_request πŸ”’
send_and_retire πŸ”’
send_ws_response πŸ”’
Sends a single WebSocketResponse over the provided WebSocket.
stream_ws_peek_rows πŸ”’
Streams a peek (SELECT) result to a WebSocket client one stash batch at a time, flushing between batches so a slow client applies real backpressure and only one batch is resident. This gives a large SELECT over WebSocket the same bounded memory profile as pgwire SELECT, and mirrors the Subscribe arm of WebSocket::add_result.
ws_peek_result πŸ”’
Packages a terminal result of stream_ws_peek_rows, appending any notices still buffered on the session after msgs.