On Jan 8, 2014, at 2:39 AM, limodou limo...@gmail.com wrote:
On Wed, Jan 8, 2014 at 3:31 PM, Wichert Akkerman wich...@wiggy.net wrote:
On 08 Jan 2014, at 01:26, limodou limo...@gmail.com wrote:
But I don't know why make this decision. Because where NULL will get
nothing. And in
“WHERE NULL” is not valid, that’s true; hence neither is
select.where(None) anymore, which is what would happen above if
“conditions” were empty (and if conditions is guaranteed not empty, you
could say “cond = conditions[0]; for c in conditions[1:]:…” )
The change includes that it’s safe
Hi
I can successfully use pagination with the following -
mydata=Article.query.filter(Article.author_id==User.id).filter(User.id==g.user.id).paginate(page,
POSTS_PER_PAGE, False)
However, I need to fetch columns from multiple tables. In that case how can
I modify the code above in order to
sorry, this should read:
Therefore, your script cannot work in either 0.8 or 0.9, unless you fix it as
follows, in which case it works the same in both versions:
def my_select(conditions):
cond = None
for c in conditions:
cond = c cond
stmt = select([column(‘x’)])
if
On Jan 8, 2014, at 7:54 AM, limodou limo...@gmail.com wrote:
I think there are two things here:
1. Should None be converted to NULL when deal with condition None or
and_(condition, None)
2. How to combine multiple condition into one condition with and_
And I think the second question
geez..its 10 degrees here, sorry, just scratch that first case, it has to be
like this to be fully compatible both ways:
def my_select(conditions):
stmt = select([column('x')])
if conditions:
stmt = stmt.where(and_(*conditions))
return stmt
“cond None” was never any kind
a new section has been added as the first “Core Behavioral Change”:
http://sqlalchemy.readthedocs.org/en/rel_0_9/changelog/migration_09.html#none-can-no-longer-be-used-as-a-partial-and-constructor
On Jan 8, 2014, at 11:27 AM, Michael Bayer mike...@zzzcomputing.com wrote:
geez..its 10
Typo:
when condition is non-empty
should be
when conditionS is non-empty
On Wed, Jan 8, 2014 at 1:53 PM, Michael Bayer mike...@zzzcomputing.com wrote:
a new section has been added as the first “Core Behavioral Change”:
yeah…plus there’s no need for a “None” check when true() is used. I’m
supposed to be napping right now, this is the problem
On Jan 8, 2014, at 12:01 PM, Claudio Freire klaussfre...@gmail.com wrote:
Typo:
when condition is non-empty
should be
when conditionS is non-empty
On
On Wed, Jan 8, 2014 at 3:37 PM, Mark S dbs...@gmail.com wrote:
Hi
I can successfully use pagination with the following -
mydata=Article.query.filter(Article.author_id==User.id).filter(User.id==g.user.id).paginate(page,
POSTS_PER_PAGE, False)
However, I need to fetch columns from multiple
Hello all,
I keep hitting an assertion error, Dependency Rule Tried To Blank Out
Primary Key... when trying to remove all children using an association
object.
My situation seems very similar
to https://groups.google.com/forum/#!topic/sqlalchemy/3g4__pFHZTs
However, based on Michaels
On Jan 8, 2014, at 5:41 PM, Russell Holloway russ.d.hollo...@gmail.com wrote:
Hello all,
I keep hitting an assertion error, Dependency Rule Tried To Blank Out
Primary Key... when trying to remove all children using an association
object.
My situation seems very similar to
Hi, all. I've been trying to modify the example of a composite association
proxy
(http://www.sqlalchemy.org/docs/orm/extensions/associationproxy.html#composite-association-proxies)
to fit my needs.
In the documentation example, there is a User object, a Keyword object, and
a UserKeyword
OK well to do it exactly the way the example does it, each time we create a
UserCourse, it will also create a Course. That’s pretty simple, we use two
association proxies, one for User.courses and the other for UserCourse.course,
mappings are like this:
class User(Base):
__tablename__ =
Well, if it isn't the man himself. Mike, you're awesome -- thanks for the
hand-holding. Thanks for reading into my use case and providing the second
example.
Also, thanks for the thorough documentation (on SQLAlchemy and Mako). This
would be infinitely more difficult without it.
On another
On Thu, Jan 9, 2014 at 12:20 AM, Michael Bayer mike...@zzzcomputing.comwrote:
On Jan 8, 2014, at 7:54 AM, limodou limo...@gmail.com wrote:
I think there are two things here:
1. Should None be converted to NULL when deal with condition None or
and_(condition, None)
2. How to combine
Mike,
It took a few hours to wrap my head around your work and adapt it to my
actual use case, but it's working great now...except for a particular case
when used with templates.
Basically, I'm querying for relevant courses and then iterating over the
results to construct a form for grade
17 matches
Mail list logo