[sqlalchemy] Re: fetchmany() vs sqlite
Michael Bayer wrote: FB - ?? I confirm that the kinterbasdb follows the DBAPI here, and thus its Cursor.fetchmany() accepts an optional positional argument for the size. ciao, lele. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: fetchmany() vs sqlite
Michael Bayer wrote: FB - ?? For what is worth, it actually accepts either a single positional argument or a `size` keyword argument. ciao, lele. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: fetchmany() vs sqlite
On Mar 6, 11:37 pm, Michael Bayer [EMAIL PROTECTED] wrote: OK who can try Mysql, MS-SQL, Oracle, Firebird for me ? while it seems like it should work positionally for all of them, it sort of seems it should work keyword-wise as well if the DBAPI authors actually read the spec they were developing for. MSSQL with pyodbc gives: Traceback (most recent call last): File stdin, line 1, in ? File c:\work_in_progress\sqlalchemy\lib\sqlalchemy\engine\base.py, line 982, in fetchmany rows = self.cursor.fetchmany(size=size) TypeError: fetchmany() takes no keyword arguments MSSQL with adodbapi works ok MSSQL with pymssql works ok The pyodbc cursor.fetchmany *does* allow the rowcount as a positional argument: code from sqlalchemy import * db = create_engine (MSSQL://VODEV1/DEV) q = db.raw_connection ().cursor () q.execute (SELECT * FROM wb_parcels) q.fetchmany (2) # [pyodbc.Row object at 0x00A7A728, pyodbc.Row object at 0x00A7A368] /code TJG --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: fetchmany() vs sqlite
OK its looking like having it as positional might just be what they all commonly had in mind... On Mar 7, 2007, at 5:15 AM, Tim Golden wrote: On Mar 6, 11:37 pm, Michael Bayer [EMAIL PROTECTED] wrote: OK who can try Mysql, MS-SQL, Oracle, Firebird for me ? while it seems like it should work positionally for all of them, it sort of seems it should work keyword-wise as well if the DBAPI authors actually read the spec they were developing for. MSSQL with pyodbc gives: Traceback (most recent call last): File stdin, line 1, in ? File c:\work_in_progress\sqlalchemy\lib\sqlalchemy\engine\base.py, line 982, in fetchmany rows = self.cursor.fetchmany(size=size) TypeError: fetchmany() takes no keyword arguments MSSQL with adodbapi works ok MSSQL with pymssql works ok The pyodbc cursor.fetchmany *does* allow the rowcount as a positional argument: code from sqlalchemy import * db = create_engine (MSSQL://VODEV1/DEV) q = db.raw_connection ().cursor () q.execute (SELECT * FROM wb_parcels) q.fetchmany (2) # [pyodbc.Row object at 0x00A7A728, pyodbc.Row object at 0x00A7A368] /code TJG --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: fetchmany() vs sqlite
I filed a ticket with a patch: http://www.sqlalchemy.org/trac/ticket/505 JP On Mar 7, 11:17 am, Michael Bayer [EMAIL PROTECTED] wrote: OK its looking like having it as positional might just be what they all commonly had in mind... On Mar 7, 2007, at 5:15 AM, Tim Golden wrote: On Mar 6, 11:37 pm, Michael Bayer [EMAIL PROTECTED] wrote: OK who can try Mysql, MS-SQL, Oracle, Firebird for me ? while it seems like it should work positionally for all of them, it sort of seems it should work keyword-wise as well if the DBAPI authors actually read the spec they were developing for. MSSQL with pyodbc gives: Traceback (most recent call last): File stdin, line 1, in ? File c:\work_in_progress\sqlalchemy\lib\sqlalchemy\engine\base.py, line 982, in fetchmany rows = self.cursor.fetchmany(size=size) TypeError: fetchmany() takes no keyword arguments MSSQL with adodbapi works ok MSSQL with pymssql works ok The pyodbc cursor.fetchmany *does* allow the rowcount as a positional argument: code from sqlalchemy import * db = create_engine (MSSQL://VODEV1/DEV) q = db.raw_connection ().cursor () q.execute (SELECT * FROM wb_parcels) q.fetchmany (2) # [pyodbc.Row object at 0x00A7A728, pyodbc.Row object at 0x00A7A368] /code TJG --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---