class HasPrefixes(object):
Known subclasses: sqlalchemy.orm.query.Query
, sqlalchemy.sql.dml.UpdateBase
, sqlalchemy.sql.expression.Select
, sqlalchemy.sql.selectable.CTE
Undocumented
Method | _setup_prefixes |
Undocumented |
Method | prefix_with |
Add one or more expressions following the statement keyword, i.e. SELECT, INSERT, UPDATE, or DELETE. Generative. |
Class Variable | _has_prefixes_traverse_internals |
Undocumented |
Instance Variable | _prefixes |
Undocumented |
Add one or more expressions following the statement keyword, i.e. SELECT, INSERT, UPDATE, or DELETE. Generative.
This is used to support backend-specific prefix keywords such as those provided by MySQL.
E.g.:
stmt = table.insert().prefix_with("LOW_PRIORITY", dialect="mysql") # MySQL 5.7 optimizer hints stmt = select(table).prefix_with( "/*+ BKA(t1) */", dialect="mysql")
Multiple prefixes can be specified by multiple calls
to _expression.HasPrefixes.prefix_with
.
Parameters | |
*expr | textual or _expression.ClauseElement
construct which
will be rendered following the INSERT, UPDATE, or DELETE
keyword. |
**kw | A single keyword 'dialect' is accepted. This is an optional string dialect name which will limit rendering of this prefix to only that dialect. |