"""
def create_foreign_key(
- constraint_name: str,
+ constraint_name: Optional[str],
source_table: str,
referent_table: str,
local_cols: List[str],
off normally. The :class:`~sqlalchemy.schema.AddConstraint`
construct is ultimately used to generate the ALTER statement.
- :param name: Name of the foreign key constraint. The name is necessary
- so that an ALTER statement can be emitted. For setups that
- use an automated naming scheme such as that described at
+ :param constraint_name: Name of the foreign key constraint. The name
+ is necessary so that an ALTER statement can be emitted. For setups
+ that use an automated naming scheme such as that described at
:ref:`sqla:constraint_naming_conventions`,
``name`` here can be ``None``, as the event listener will
apply the name to the constraint object when it is associated
"""
def create_primary_key(
- constraint_name: str,
+ constraint_name: Optional[str],
table_name: str,
columns: List[str],
schema: Optional[str] = None,
off normally. The :class:`~sqlalchemy.schema.AddConstraint`
construct is ultimately used to generate the ALTER statement.
- :param name: Name of the primary key constraint. The name is necessary
- so that an ALTER statement can be emitted. For setups that
- use an automated naming scheme such as that described at
+ :param constraint_name: Name of the primary key constraint. The name
+ is necessary so that an ALTER statement can be emitted. For setups
+ that use an automated naming scheme such as that described at
:ref:`sqla:constraint_naming_conventions`
``name`` here can be ``None``, as the event listener will
apply the name to the constraint object when it is associated
op.execute("INSERT INTO table (foo) VALUES ('\:colon_value')")
- :param sql: Any legal SQLAlchemy expression, including:
+ :param sqltext: Any legal SQLAlchemy expression, including:
* a string
* a :func:`sqlalchemy.sql.expression.text` construct.
def create_primary_key(
cls,
operations: "Operations",
- constraint_name: str,
+ constraint_name: Optional[str],
table_name: str,
columns: List[str],
schema: Optional[str] = None,
off normally. The :class:`~sqlalchemy.schema.AddConstraint`
construct is ultimately used to generate the ALTER statement.
- :param name: Name of the primary key constraint. The name is necessary
- so that an ALTER statement can be emitted. For setups that
- use an automated naming scheme such as that described at
+ :param constraint_name: Name of the primary key constraint. The name
+ is necessary so that an ALTER statement can be emitted. For setups
+ that use an automated naming scheme such as that described at
:ref:`sqla:constraint_naming_conventions`
``name`` here can be ``None``, as the event listener will
apply the name to the constraint object when it is associated
def create_foreign_key(
cls,
operations: "Operations",
- constraint_name: str,
+ constraint_name: Optional[str],
source_table: str,
referent_table: str,
local_cols: List[str],
off normally. The :class:`~sqlalchemy.schema.AddConstraint`
construct is ultimately used to generate the ALTER statement.
- :param name: Name of the foreign key constraint. The name is necessary
- so that an ALTER statement can be emitted. For setups that
- use an automated naming scheme such as that described at
+ :param constraint_name: Name of the foreign key constraint. The name
+ is necessary so that an ALTER statement can be emitted. For setups
+ that use an automated naming scheme such as that described at
:ref:`sqla:constraint_naming_conventions`,
``name`` here can be ``None``, as the event listener will
apply the name to the constraint object when it is associated
op.execute("INSERT INTO table (foo) VALUES ('\:colon_value')")
- :param sql: Any legal SQLAlchemy expression, including:
+ :param sqltext: Any legal SQLAlchemy expression, including:
* a string
* a :func:`sqlalchemy.sql.expression.text` construct.