Skip to main content

parse_alter_session_value

Function parse_alter_session_value 

Source
pub fn parse_alter_session_value(statement: &str, key: &str) -> Option<String>
Expand description

Parses the value assigned by an ALTER SESSION SET <key> = <value> statement, case-insensitively, returning the (unquoted) value when statement is exactly that alter for key. Used to track session state (e.g. current_schema, edition) that the server reflects back without a round trip (reference connection.pyx reads these from the executed alter session). Pure driver logic lifted out of the PyO3 shim (bead p5o).