Thanks to both of you for the pointers. Unfortunately, the way this is
meant to work is not really an option for me.
At current, I do
sel2 = sel.where(literal(name = '%s' % thing))
to get around using a column reference. This works for now, but I was
hoping for a better solution. I might have
On May 21, 2014, at 2:02 AM, gbr doubl...@directbox.com wrote:
Thanks to both of you for the pointers. Unfortunately, the way this is meant
to work is not really an option for me.
At current, I do
sel2 = sel.where(literal(name = '%s' % thing))
to get around using a column reference.
The above example is just a simplified version of the actual code. In fact,
the construction of `sel` is much more difficult and `product_table` is
actually a `select` made from multiple joins which only really exists
within the function that creates `sel`. One wouldn't be able to reference
it
On May 19, 2014, at 9:12 PM, gbr doubl...@directbox.com wrote:
I'm trying to modify a select statement which is fairly complex and which is
created in a function that I don't want to modify. It is returned from this
function and I'd like to add more WHERE clauses by just referencing the
I'm trying to modify a select statement which is fairly complex and which
is created in a function that I don't want to modify. It is returned from
this function and I'd like to add more WHERE clauses by just referencing
the returned select statement. How can I do this without causing SQLA
Is there some issue with doing: sel2 = sel.where(product_table.c.name
== water) ?
If you really have no reference to the product_table, I think you can
hack it with sel._raw_columns to try and find the column you want to
filter to.
-Ryan Kelly
On Mon, May 19, 2014 at 9:12 PM, gbr