Skip to main content

Module sql

Module sql 

Source

Enums§

SqlError

Functions§

bind_name_matches_key
bind_names_equal
bind_names_per_occurrence
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.
dml_returning_single_bind_name
generated_object_attr_bind_name
is_bind_name_char
is_quoted_bind_name
parse_alter_session_value
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).
plsql_assignment_bind_names
plsql_function_return_bind_name
plsql_output_bind_names
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.
public_bind_name
replace_bind_placeholder
replace_input_bind_placeholder
returning_bind_names
rewrite_dml_returning_projection
scan_bind_names
simple_sql_identifier
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).
single_quote_end
statement_is_ddl
Mirrors the reference statement-type classification for DDL (impl/thin/statement.pyx _determine_statement_type).
statement_is_dml
Mirrors the reference statement-type classification for DML (impl/thin/statement.pyx _determine_statement_type).
statement_is_plsql
unique_bind_names

Type Aliases§

Result