Returns one bind-name entry per placeholder occurrence for non-PL/SQL SQL,
and the unique names for PL/SQL, mirroring the reference _add_bind
(impl/thin/statement.pyx:337-354): PL/SQL coalesces duplicate placeholders
into a single bind, whereas plain SQL binds each occurrence separately so a
repeated placeholder consumes one positional value per occurrence.
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).
The complete set of PL/SQL output bind names: the assignment targets plus,
for PL/SQL statements, the binds in SELECT ... INTO and RETURNING ... INTO
clauses. For non-PL/SQL statements this is just plsql_assignment_bind_names
(which is empty). Names are deduplicated case-insensitively in occurrence
order, mirroring the reference’s PL/SQL output-bind detection. The INTO /
RETURNING keywords are located with keyword_token_positions so a keyword
appearing inside a string literal or comment is never mistaken for a clause.
Returns the identifier unchanged when it is a bare Oracle identifier (only
[A-Za-z0-9_$#]), which needs no quoting. Returns None when it would
require a quoted identifier (the caller decides how to surface that). Pure
driver logic lifted out of the PyO3 shim (bead p5o).