From: Bond, G. <Gre...@it...> - 2008-10-19 23:42:47
|
++++++++++++++++++++++++++++++++++++++++++++++++ The information contained in this communication is strictly confidential and intended solely for the use of the intended recipient(s). The copyright in this communication belongs to ITG Australia Ltd, ITG Hong Kong Limited, ITG Japan Limited, ITG Singapore Pte Ltd and/or their related entities, including Investment Technology Group, Inc., (collectively referred to as “ITG") and may contain information that is private, confidential or subject to legal professional or other privilege. No confidentiality or privilege is waived or lost by any mis-transmission of this email. Access to this email by anyone other than the intended recipient is unauthorized and further distribution of this email is strictly prohibited without the permission of ITG. If you are not the intended recipient of this email, any review, disclosure, copying, distribution, retention or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient of this email, you should not disseminate, distribute or copy this e-mail and you should delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. ITG and/or its affiliates reserve the right to monitor and archive all electronic communications through its/their network. The information contained in this email is believed to be accurate at the time of publication. However, ITG disclaims all responsibility for any loss or damage howsoever arising as a result of any person or entity acting upon the information contained in this email and no liability will be accepted by ITG for any such loss or damage. Any views expressed in this email are those of the individual sender, except where the email states otherwise and the sender is authorized to state them to be the views of ITG. ++++++++++++++++++++++++++++++++++++++++++++++++ |
From: Sébastien S. <sa...@us...> - 2008-10-20 15:10:20
|
[Replying to all] Hi Gregory, sorry for the late reply, I have been very busy at work. I will correct this bug for python-sybase 0.40 which should be released before the end of the year. I should be working nearly full time on python-sybase for the coming month. You should note however that Connection.execute is deprecated so that you should probably plan to migrate to a cursor at some stage. regards -- Sébastien Sablé Bond, Gregory a écrit : > I’ve just added a bug for this: > https://sourceforge.net/tracker/index.php?func=detail&aid=2165436&group_id=184050&atid=907701 > <https://sourceforge.net/tracker/index.php?func=detail&aid=2165436&group_id=184050&atid=907701> > > In previous versions (0.38 all the way back to 0.13!) we could do: > print db.execute('select 1,2,3') > [[(1, 2, 3)]] > > print db.execute('select 1,2,3 select 4,5') > [[(1, 2, 3)], [(4, 5)]] > > In 0.39, execute() now uses a cursor under the hood and returns None. > The use of a cursor means no multiple select statements : > print db.execute('select 1,2,3') > None > > print db.execute('select 1,2,3 select 4,5') > Traceback (most recent call last): > ..... > Sybase.DatabaseError: Msg 3804, Level 16, State 1, Line 1 > More than one SELECT statement is used to define the cursor > 'ctmp823fd0c'. > > We depend fairly heavily on both behaviours (returning resultsets, > taking multiple select statements). > > I’ve worked out a way to support /most/ of the old behaviour, with some > ugly hackery that looks inside Cursor objects (see the bug above), but > it’s not perfect. The last remaining problem is multiple selects – it > mashes all the resultsets into one: > > print db.execute('select 1,2,3 select 4,5') > [[(1, 2, 3), (4, 5)]] > > Any clues how to handle this? Is this behaviour something that was > deliberately removed or would “we” be willing to patch this, if we can > come up with a method? > > -- > *Gregory Bond > Vice President > Product Manager, Middle & Back Office Systems > ITG Australia Limited > Investment Technology Group, Inc. > *-------------------------- > Level 3, Rialto North Tower > 525 Collins Street > Melbourne VIC 3000 > AUSTRALIA > * > *Ph. +61 3 9211 2518 > Fax: +61 3 9211 2599 > > www.itg.com > > > ------------------------------------------------------------------------ > > ++++++++++++++++++++++++++++++++++++++++++++++++ > The information contained in this communication is strictly confidential and intended solely for the use of the intended recipient(s). The copyright in this communication belongs to ITG Australia Ltd, ITG Hong Kong Limited, ITG Japan Limited, ITG Singapore Pte Ltd and/or their related entities, including Investment Technology Group, Inc., (collectively referred to as “ITG") and may contain information that is private, confidential or subject to legal professional or other privilege. No confidentiality or privilege is waived or lost by any mis-transmission of this email. > > Access to this email by anyone other than the intended recipient is unauthorized and further distribution of this email is strictly prohibited without the permission of ITG. If you are not the intended recipient of this email, any review, disclosure, copying, distribution, retention or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient of this email, you should not disseminate, distribute or copy this e-mail and you should delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. ITG and/or its affiliates reserve the right to monitor and archive all electronic communications through its/their network. > > The information contained in this email is believed to be accurate at the time of publication. However, ITG disclaims all responsibility for any loss or damage howsoever arising as a result of any person or entity acting upon the information contained in this email and no liability will be accepted by ITG for any such loss or damage. Any views expressed in this email are those of the individual sender, except where the email states otherwise and the sender is authorized to state them to be the views of ITG. > ++++++++++++++++++++++++++++++++++++++++++++++++ > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Python-sybase-misc mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-sybase-misc |
From: Andrew M. <an...@ob...> - 2008-10-20 22:23:44
|
>You should note however that Connection.execute is deprecated so that >you should probably plan to migrate to a cursor at some stage. When I was working on my PostgreSQL adapter (ocpgdb), I initially added a Connection.execute before I had implemented the Cursor logic, intending to remove it when done. However, there are SQL statements that PostgreSQL will not execute within a cursor which necessitates some mechanism for sending commands not within a cursor. A Connection.execute method seems like the most natural answer to me, so I've left it in. It's also quite a bit faster for some operations, as it requires considerably less round trips to the server. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ |