- changed milestone to 0.4.0
allow column default functions access to the ExecutionContext
we get a lot of requests for column defaults to look at other parameters being sent.
-
add a step in
schema.ColumnDefault
to inspect the incoming default argument to see if a. its a callable, and b. takes no arguments. if so, wrap it in another function that will takeExecutionContext
as its argument (or should it take just statement + parameters? all args ? probably the context is the most generic). -
change the constructor of
DefaultRunner
to takeExecutionContext
instead of connection/dialect. -
change the
defaultrunner()
function on all dialects to takeExecutionContext
as an argument, instead ofConnection
. -
change
base.connection.execute_default()
to produce a newExecutionContext
in a manner similar toexecute_text()
right below it, and send it to its call todefaultrunner()
. -
change
engine.default.DefaultExecutionContext._process_defaults()
to calldefaultrunner()
with its self as the execution context argument. -
add a unit test to
test/sql/defaults.py
, testing a python default function that looks for acontext
argument, and then pulls some information about the bind parameters when it executes.
Comments (3)
-
reporter -
reporter - changed status to resolved
implemented in changeset:3022
-
reporter - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment