I want to create a query object with multiple constraints, just like adding
commas in the WHERE clause of an sql query. I tried the intuitive
"constraint1 and constraint2" but it just took constraint2 and ignored
constraint1 (probably because the key word "and" isn't overridden and when
applied
On 25 Mar 2013, at 9:13 AM, David Ripplinger wrote:
> I want to create a query object with multiple constraints, just like adding
> commas in the WHERE clause of an sql query. I tried the intuitive
> "constraint1 and constraint2" but it just took constraint2 and ignored
> constraint1 (probably
Thank you, that works! Along the same line, would we then use "!" or "~"
for not, and "|" for or? Do you know if this is documented in the book or
is it only documented in the code/API?
If Massimo reads this, I would suggest that an eventual feature to add to
web2py is for query objects to allo
On 25 Mar 2013, at 9:30 AM, David Ripplinger wrote:
> Thank you, that works! Along the same line, would we then use "!" or "~" for
> not, and "|" for or? Do you know if this is documented in the book or is it
> only documented in the code/API?
It's definitely in the book. Look for the query doc
> That's mentioned in the book as well; Python doesn't support overloading
> those operators.
>
>
I do remember reading that in the book.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving
Ok, I found it in the book. For any who might come across this post and be
wondering where it is, it is not actually under the Queries section. It is
in a subsection of Select, under the heading Logical Operators (in the
chapter on the Data Abstraction Layer):
http://web2py.com/books/default/ch
6 matches
Mail list logo