summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/_elements_constructors.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/_elements_constructors.py')
-rw-r--r--lib/sqlalchemy/sql/_elements_constructors.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/_elements_constructors.py b/lib/sqlalchemy/sql/_elements_constructors.py
index ea21e01c6..605f75ec4 100644
--- a/lib/sqlalchemy/sql/_elements_constructors.py
+++ b/lib/sqlalchemy/sql/_elements_constructors.py
@@ -389,7 +389,7 @@ def not_(clause: _ColumnExpressionArgument[_T]) -> ColumnElement[_T]:
def bindparam(
- key: str,
+ key: Optional[str],
value: Any = _NoArg.NO_ARG,
type_: Optional[TypeEngine[_T]] = None,
unique: bool = False,
@@ -521,6 +521,11 @@ def bindparam(
key, or if its length is too long and truncation is
required.
+ If omitted, an "anonymous" name is generated for the bound parameter;
+ when given a value to bind, the end result is equivalent to calling upon
+ the :func:`.literal` function with a value to bind, particularly
+ if the :paramref:`.bindparam.unique` parameter is also provided.
+
:param value:
Initial value for this bind param. Will be used at statement
execution time as the value for this parameter passed to the