- attached 3074.patch
allow **kw for TypeCompiler, specifically pass the parent SQL expression or column
Issue #3074
resolved
this would allow type-compilation that can be altered by the properties of the enclosing column, such as if nullable affects things.
patch would use a conditional that allows legacy dialects to not require the **kw.
Comments (4)
-
reporter -
reporter - changed status to resolved
- Custom dialects that implement :class:
.GenericTypeCompiler
can now be constructed such that the visit methods receive an indication of the owning expression object, if any. Any visit method that accepts keyword arguments (e.g.**kw
) will in most cases receive a keyword argumenttype_expression
, referring to the expression object that the type is contained within. For columns in DDL, the dialect's compiler class may need to alter itsget_column_specification()
method to support this as well. TheUserDefinedType.get_col_spec()
method will also receivetype_expression
if it provides**kw
in its argument signature. fixes#3074
→ <<cset f3a892a3ef66>>
-
reporter this needed to be in UserDefinedType.get_col_spec() for it to be worth it; so a new metaclass approach to transparently decorating methods with a
**kw
acceptor was added. -
reporter - add a fix to MySQL re:
#3074tests, make sure we check table is present
→ <<cset 0843bbcfbb4a>>
- add a fix to MySQL re:
- Log in to comment