Would it make sense to add a __nonzero__ method to ResultProxy that
was tied to the rowcount?
def __nonzero__(self):
return bool(self.rowcount)
This would allow code like
if results:
process(results)
I was surprised when this did not work.
--
You received this message because you are
On Oct 14, 2011, at 10:56 AM, Burak Arslan wrote:
On 10/14/11 06:40, Michael Bayer wrote:
its a little awkward but if you use bindparam() in the inner select,
query.params() can access those parameters just fine, you'd just need to use
it in all cases.
there's some related example of
On Oct 14, 2011, at 10:38 AM, Lloyd Kvam wrote:
Would it make sense to add a __nonzero__ method to ResultProxy that
was tied to the rowcount?
def __nonzero__(self):
return bool(self.rowcount)
This would allow code like
if results:
process(results)
I was surprised when this
On 10/14/11 18:01, Michael Bayer wrote:
On Oct 14, 2011, at 10:56 AM, Burak Arslan wrote:
On 10/14/11 06:40, Michael Bayer wrote:
its a little awkward but if you use bindparam() in the inner select,
query.params() can access those parameters just fine, you'd just need to
use it in all
On Oct 14, 11:02 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Oct 14, 2011, at 10:38 AM, Lloyd Kvam wrote:
Would it make sense to add a __nonzero__ method to ResultProxy that
was tied to the rowcount?
def __nonzero__(self):
return bool(self.rowcount)
This would allow
Hello all,
I feel I am seriously missing some point here.
suppose I am creating a class representing a table through orm.
I will asume that it is using declarative syntax.
I wish to know how do we index a field?
that is to say, I need to have indexes on a few fields so that they are
applied to
What is the SA equivalent of:
UPDATE foo SET bar=some_function(baz) WHERE bar IS DISTINCT FROM
some_function(baz)
I get this far (assuming 't' is a Table instance):
t.update().values(t.c.bar=sa.func.some_function(t.c.baz).where( ...
what do I put here )
IS DISTINCT FROM (and IS NOT
On Fri, Oct 14, 2011 at 4:45 PM, Jon Nelson jnel...@jamponi.net wrote:
What is the SA equivalent of:
UPDATE foo SET bar=some_function(baz) WHERE bar IS DISTINCT FROM
some_function(baz)
I get this far (assuming 't' is a Table instance):
for now yes, I've not heard of IS DISTINCT FROM before.
On Oct 14, 2011, at 6:25 PM, Jon Nelson wrote:
On Fri, Oct 14, 2011 at 4:45 PM, Jon Nelson jnel...@jamponi.net wrote:
What is the SA equivalent of:
UPDATE foo SET bar=some_function(baz) WHERE bar IS DISTINCT FROM
some_function(baz)
On Fri, Oct 14, 2011 at 8:12 PM, Michael Bayer mike...@zzzcomputing.com wrote:
for now yes, I've not heard of IS DISTINCT FROM before.
In the right places, it's mighty useful.
--
Jon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to
There are two tables pump and curve. The curve table has three fields,
curve_pn, head and gpm. The design is that the rows with the same curve_pn
value represent x,y points (head,gpm) on a pump performance curve. Each row in
the pump table has a curve_pn column that links to the performance
11 matches
Mail list logo