Hi Folks,
After an hour or so of browsing the net and documentations, getting
increasingly frustrated and being about to just - nah, I didn't really
consider throwing sqlalchemy out of my project. But still. Anyway, I'm
trying to make a select-query which would send something like this to
Hi all,
I wonder if SA can handle this use case:
An Account can contain Entries ordered by 'position' attribute.
mapper(Account, table_accounts, properties = dict(
entries = relation(Entry, lazy=True, collection_class=ordering_list
('position'),
order_by=[table_entries.c.position],
Thanks for your suggestion, but no such luck. From the sql error I get
I gathered that that just creates an actual if_ function..
On Apr 5, 9:08 pm, a...@svilendobrev.com wrote:
try with func.if_()
On Sunday 05 April 2009 21:19:29 Wouter van Vliet wrote:
Hi Folks,
After an hour or
Michael Bayer schrieb:
the close() will remove any objects left in the session and may help with
unit tests in that the subsequent tests aren't interfered with by objects
remaining from the previous test.
Where is the difference between a process running several tests and one
answering
jean-philippe dutreve wrote:
Hi all,
I wonder if SA can handle this use case:
An Account can contain Entries ordered by 'position' attribute.
mapper(Account, table_accounts, properties = dict(
entries = relation(Entry, lazy=True, collection_class=ordering_list
('position'),
And then I realised that I was barking up the wrong tree. Too used to
mysql's if(cond,true_val,else_val) syntax I didn't even check if
postgressql even know the same thing. Newsflash; it doesn't.
Instead, it has the 'case' expression. To be found in the
sqlalchemy.sql.expressions module.
On Apr
I have been working with Python 2.5 and SQLAlchemy. I recently upgraded to
Python 2.6 on my Windows machine and I receive the following message:
D:\Python26\lib\site-packages\sqlalchemy-0.5.3-py2.6.egg\sqlalchemy\databases\ms
sql.py:977: DeprecationWarning: object.__new__() takes no parameters
i think you're looking for CASE. We have a case() construct which
creates this.
On Apr 5, 2009, at 3:03 PM, Wouter van Vliet wrote:
Thanks for your suggestion, but no such luck. From the sql error I get
I gathered that that just creates an actual if_ function..
On Apr 5, 9:08 pm,
this is not an error, it is only a warning.There should be no
difference in behavior between py2.5 and 2.6. The code you have below
may not necessarily create any data if you didn't commit your
transaction.
On Apr 5, 2009, at 6:05 PM, Michael Mileusnich wrote:
I have been working
On Apr 5, 2009, at 3:34 PM, Diez B. Roggisch wrote:
Michael Bayer schrieb:
the close() will remove any objects left in the session and may
help with
unit tests in that the subsequent tests aren't interfered with by
objects
remaining from the previous test.
Where is the difference
The code used to work in 2.5. A simple add and flush was all I needed to
do. I tried to use a commit but that did not work either. Am I missing
something here?
On Sun, Apr 5, 2009 at 4:58 PM, Michael Bayer mike...@zzzcomputing.comwrote:
this is not an error, it is only a warning.There
youd have to provide us a test case. to my knowledge our tests pass
with MS on python 2.6.
On Apr 5, 2009, at 7:59 PM, Michael Mileusnich wrote:
The code used to work in 2.5. A simple add and flush was all I
needed to do. I tried to use a commit but that did not work
either. Am I
and i would also suggest investigating if the DBAPI you're using is
somehow different than the one you've used with 2.5, or unsupported on
py2.6.
On Apr 5, 2009, at 7:59 PM, Michael Mileusnich wrote:
The code used to work in 2.5. A simple add and flush was all I
needed to do. I tried
On Sun, Apr 5, 2009 at 9:46 PM, Michael Bayer mike...@zzzcomputing.comwrote:
and i would also suggest investigating if the DBAPI you're using is somehow
different than the one you've used with 2.5, or unsupported on py2.6.
On Apr 5, 2009, at 7:59 PM, Michael Mileusnich wrote:
The code used
I tried to the same py scripts with sqllite and that works fine. The issues
seems to be with pyodbc however I am using the version from the site.
http://code.google.com/p/pyodbc/downloads/detail?name=pyodbc-2.1.3.win32-py2.6.execan=2q=
My db.py file has all my tables and mappers in it and the
15 matches
Mail list logo