[sqlalchemy] Re: query date field

2007-07-07 Thread Andreas Jung
--On 6. Juli 2007 23:27:30 + jose [EMAIL PROTECTED] wrote: I've got a question that I can't find the answer to. I have a table called seminars with a date field in it to hold the seminar dates. I want to query the table to find all the dates for a specific year. I tried

[sqlalchemy] Re: query date field

2007-07-07 Thread Mike Orr
On 7/6/07, Andreas Jung [EMAIL PROTECTED] wrote: --On 6. Juli 2007 23:27:30 + jose [EMAIL PROTECTED] wrote: I've got a question that I can't find the answer to. I have a table called seminars with a date field in it to hold the seminar dates. I want to query the table to find

[sqlalchemy] Re: How many objects are in a session

2007-07-07 Thread klaus
And when I am at it (this is going off topic): What do you think about len(query) in addition to or instead of query.count()? IMO, count() is nearly as SQLish als select(). Best regards Klaus On Jul 6, 3:20 pm, klaus [EMAIL PROTECTED] wrote: I noticed that Session has no method len.

[sqlalchemy] Re: new Engine document

2007-07-07 Thread Neil Blakey-Milner
On 7/6/07, Michael Bayer [EMAIL PROTECTED] wrote: I just wrote this but haven't had time to carefully proof it...if people have corrections / comments let me know. I think this is a lot easier to understand - thanks and well done. Neil -- Neil Blakey-Milner http://nxsy.org/ [EMAIL PROTECTED]

[sqlalchemy] Re: new Engine document

2007-07-07 Thread Michael Bayer
i edited further, and its now the normal doc on the site. one thing I completely spaced on, is i got explcit / implicit wrong. the way im using these terms now (i.e. in the book), are: explicit: connection.execute(statement) explicit connectionless: engine.execute(statement) implicit

[sqlalchemy] Re: query date field

2007-07-07 Thread Michael Bayer
heh...youve both answered correctly ...based on the databases you happen to be using (oracle, mysql). unfortanately we dont yet have a layer of function abstraction that smooths over differences like these. theres a ticket in place in trac but its awaiting a volunteer for now. On Jul 7, 5:03

[sqlalchemy] Re: No update in cascade

2007-07-07 Thread Michael Bayer
On Jul 7, 9:39 am, Koen Bok [EMAIL PROTECTED] wrote: And you were right. It turned out to be a stupid idea anyway. Let that be a lesson for the next programmer who tries to be lazy ;-) oh, funny. i was expecting to hear the use case you had which needs it. so are you just setting it

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-07 Thread Paul Johnston
Hi, do you mean, the URI would have args that are used by the DBAPI *or* the dialect ? right now, all query strings in the URI go to the DBAPI's connect() method. mixing them up I fear opens the door for name conflicts. what if some DBAPI were suddenly supported that had a connect() argument

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-07 Thread Michael Bayer
On Jul 7, 10:06 am, Paul Johnston [EMAIL PROTECTED] wrote: If that's the intention, I understand your concerns about nameclashes. Actually, if that is the case, MSSQL is doing things slightly wrong and using URI params where we shouldn't be. This would raise an issue for me though - how do

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-07 Thread Paul Johnston
Hi, take a look at test/testbase.py. for DBAPI query args, they can be in the query string sent to --dburi. for other create_engine() args, we generally support them as explicit options accepted by testbase.py (such as postgres --serverside cursors) I see, guess we need to add a couple of

[sqlalchemy] Re: query date field

2007-07-07 Thread Jose Galvez
Thanks, everyone for the pointers. Since func is not database agnostic, I think I'll make my own functions in my database module that simply use func so if I ever do switch form mysql to something else at least I'll know where to find all the stuff that needs changing Jose jose wrote: I've got

[sqlalchemy] Re: Future of migrate project

2007-07-07 Thread Evan Rosson
Yes, a certain level of frustration is bound to occur after you have spent an hour reading about the project, downloading the code and setting up an example - only to find a show stopping bug, report it some time later after finding the right bug tracker... to then notice that there hasn't

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-07 Thread Michael Bayer
On Jul 7, 2007, at 11:32 AM, Paul Johnston wrote: Hi, take a look at test/testbase.py. for DBAPI query args, they can be in the query string sent to --dburi. for other create_engine() args, we generally support them as explicit options accepted by testbase.py (such as postgres