My vote - +1 for making qmark mandatory and everything else optional
My ramblings -
M.-A. Lemburg wrote:
> Markers such as %i and %s could be treated as meaning: bind
> these variables as integer and string. This implicit type
> information might be vital to some modules.
>
>
I have to confess
In reference to finding question marks in SQL queries and ignoring
string literals
M.-A. Lemburg wrote:
> Does anyone know a good implementation of such a search&replace
> mechanism ?
>
I've not seen any existing code to deal with this BUT there are a couple
of places to check:
* SnakeSQ
Chris Curvey wrote:
> I really like the pyodbc package for getting to MS-SQL on Windows.
> Has anyone been able to make this work with ODBC drivers on OSX? (Or
> is there another open source solution that works?)
I've not tried it personally, I get the impression pyodbc is Windows
focused at
Art Protin wrote:
> Dear folks,
> Carsten Haese wrote:
>> On Fri, 2006-11-10 at 19:03 +0100, M.-A. Lemburg wrote:
>>
>>> It is common practice to do
>>>
>>> cursor.execute('select * from mytable where 1=0')
>>> print cursor.description
>>>
> The DBMS that I am writing the interface for
M.-A. Lemburg wrote:
>Mario Frasca wrote:
>
>
>>On 2006-1121 16:23:26, M.-A. Lemburg wrote:
>>
>>
>>>Mario Frasca wrote:
>>>
>>>
[...] it would be nice (I mean, I think it would)
if also the logging policy would be stated in the db-api2++
>>>I'm not really su
Michael Bayer wrote:
> However i might suggest that this whole thread, "controlling return
> types", perhaps be expanded to include "controlling *input* types and
> return types"
The pysqlite register_adapter and register_converter do this (in that
order). I've not used it in
Anthony Tuininga wrote:
I've been following this thread and it would appear that no real
consensus has been reached as of yet. I've looked at the api used by
sqlite and knowing its storage and type definition system it makes
good sense. I am considering adding the following to cx_Oracle,
followin
Carl Karsten wrote:
> Carsten Haese wrote:
>
>> On Tue, 22 May 2007 17:33:27 -0500, Carl Karsten wrote
>>
>>> Or some such abomination of results of one query as a parameter of a
>>> 2nd.
>>>
>>> given my use case, I can understand why this isn't in the spec, and
>>> why it may never be.
+1 on qmark
+0 on named
+0 on numeric
-1 on format
-1 on pyformat -- wish I could vote -2 ;-)
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
Have you taken a look at http://pyxmdb.googlepages.com/
Chris
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
On 10/16/2008 5:55 PM, Peter Machell wrote:
...If I hard code the password, the connection works fine:
cnxn = pyodbc.connect("DSN=test;UID=test;PWD=test")
However substituting a variable fails:
passwd='test'
connectstring='pyodbc.connect("DSN=test;UID=test;PWD='+passwd+'")'
cnxn = connectstrin
The great thing about standards is there are so many of them to pick
from! I don't recall who originally said that but it is sort of apt here :-)
I'm using http://stuartbishop.net/Software/DBAPI20TestSuite/ which is
the original that Vernon was referring to. Vernon is your Launchpad
project on
Thought I'd check here before I post to the IronPython list.
Is anyone here using IronPython with (any kind of) dbapi driver?
I pulled down FePy http://fepy.sourceforge.net/ a few months back, added
support for Ingres and fixed some problems related to date types (type
support was incomplete).
Andy Dustman wrote:
On Mon, Aug 2, 2010 at 5:57 AM, Vernon Cole wrote:
...1) I am not confident in my ability to understand Regular Expression
strings.
It seems to me that this code could be confused by the substring 'SELECT'
being included as part of a longer string, or in a string lit
Andy Dustman wrote:
On Sun, Nov 21, 2010 at 3:02 PM, John Q. Public wrote:
Is this how my createdb() method should look like?
How would you write this method so it is both readable and correct?
Thank you for your time and patience.
def createdb(self):
try:
con = sqlite3.connect(db
Kwon, Chan Young wrote:
> I am implementing new DB API for new Database according to DB API 2.0. (as
> C-Extension)
> There is no specification about LOB in DB API 2.0
> Especially, I need LOB object for piecewise LOB writing/reading after query
> execution.
> So I defined my own LOB object.
> I
M.-A. Lemburg wrote:
Kwon, Chan Young wrote:
Hi,
Let me describe more...
1. My suggestion of LOB object is kind of Locator object. It does not contain
whole massive data. It just passes small piece of data when its methods are
called.
2. buffer object is not enough to handle various kinds
M.-A. Lemburg wrote:
Daniele Varrazzo wrote:
On Jul 19, 2011 3:44 AM, "Federico Di Gregorio"
wrote:
At least 2 drivers (psycopg and pysqlite) provide a Python->backend
mechanism based on PEP 246, "Object Adaptation". If other implementors
are interested I can write a short explanatio
Carl Karsten wrote:
On Tue, Jul 19, 2011 at 6:39 PM, Ethan Furman wrote:
I am finally adding Null support to my dbf package
(http://pypi.python.org/pypi/dbf) and, as usual, the VFP side is being a
pain.
The issue is that the Logical, Date, and DateTime field types, even when the
table does
I've posted a new (incomplete) dbapi driver at
http://code.google.com/p/jyjdbc/
It is a pure Jython JDBC driver, so if customization is needed it is
much easier for a Python developer to modify and extend than the regular
Java driver that ships with Jython.
Right now it works with Ingres
The pure Jython (Python in the JVM) JDBC dbapi pep-249 driver, jyjdbc
0.0.2 is now available from:
http://code.google.com/p/jyjdbc/
At the moment jyjdbc passes more of
http://stuartbishop.net/Software/DBAPI20TestSuite/ than zxJDBC.
I suspect I'm the only user of jyjdbc at the moment :-)
I
The pure Jython (Python in the JVM) JDBC dbapi pep-249 driver, jyjdbc
0.0.3 is now available from:
http://code.google.com/p/jyjdbc/
Main high light is that it can now be used as a drop in replacement for
zxJDBC in most existing applications by simply replacing:
from com.ziclix.python.sql im
Hi All,
I was discussing with someone today autocommit support and found an area
of pep-249 where I think we could improve the wording (and the spec):
http://www.python.org/dev/peps/pep-0249/
.
.commit()
Commit any pending transaction to the database. Note tha
Vernon Cole wrote:
Properties are just the right tools for this
task, and appear to be the most used solution in popular drivers.
I think that term "attributes" is more commonly used, rather than
"properties", but I agree completely.
"conn.autocommit = True" seems pythonic, as does "if not
Joshua D. Drake wrote:
On 09/13/2011 09:39 AM, Chris Clark wrote:
Vernon Cole wrote:
Properties are just the right tools for this
task, and appear to be the most used solution in popular drivers.
So I think we have 3 people each advocating slightly different options
for what to do when
M.-A. Lemburg wrote:
Chris Clark wrote:
Hi All,
I was discussing with someone today autocommit support and found an area
of pep-249 where I think we could improve the wording (and the spec):
http://www.python.org/dev/peps/pep-0249/
.
.commit()
Commit any
Joshua D. Drake wrote:
On 09/13/2011 09:12 PM, Michael Bayer wrote:
On Sep 13, 2011, at 9:15 PM, Joshua D. Drake wrote:
conn=psycopg2.connect("dbname='foo' user='dbuser', AUTOCOMMIT=TRUE)
cur = conn.cursor()
cur.execute("""INSERT""")
cur.execute("""SELECT * from bar""")
cur.begin()
cur.exe
M.-A. Lemburg wrote:
Chris Clark wrote:
M.-A. Lemburg wrote:
Chris Clark wrote:
Hi All,
I was discussing with someone today autocommit support and found an area
of pep-249 where I think we could improve the wording (and the spec):
http://www.python.org/dev/peps/pep-0249
On Wednesday 2012-04-11 12:44 (-0700), Peter Eisentraut
wrote:
So, in terms of code, which one of these is "better"?
1a.
rv = plpy.execute("some SQL command")
try:
output(rv.colnames())
except SomeException:
output("it's a utility command")
1b.
rv = plpy.execute("some SQL comm
your new api.
I agree with Chris Clark here... doing so saves you complexity in the
dbapi layer you intend to write on top of the low level API.
That would require populating this structure on every call, which would
be expensive for such a low-level API, or turning the attribute into a
fake fun
On Tuesday 2012-05-15 10:16 (-0700), M.-A. Lemburg wrote:
What you're describing sounds a lot like the catalog methods in
the ODBC standard.
Those are typically implemented by either
having the ODBC drivers implement a set of queries that generate
result sets in a predefined format, or by addin
On Thursday 2012-11-01 08:57 (-0700), M.-A. Lemburg wrote:
Christoph Zwerschke wrote:
We're currently preparing a new release of PyGreSQL and want to make use of
context managers. My
obvious idea was to let connections and cursors act as context managers that
just close themselves,
and add a
If you are based in Europe could you take a look at
http://pyfound.blogspot.ca/2013/02/python-trademark-at-risk-in-europe-we.html
please?
This is slightly off topic for the db-sig list but I can name at least
one company on this list who is based in the EU that has Python on their
web site :-
On Wed, 08 May 2013 12:59:08 +0200, M.-A. Lemburg wrote:
On 08.05.2013 11:48, Vernon D. Cole wrote:
I am working on code (django-mssql) where I found the following test:
##expected = (
##Decimal('0.00'),
##Decimal('0.0'),
##Decimal('-
On Mon, 20 May 2013 12:40:04 -0400, Michael Bayer
wrote:
On May 20, 2013, at 11:20 AM, Carl Karsten wrote:
Does anyone on in this discussion actually want named parameters for
their own use, or does it seem like something someone might want, so
lets try to make that happen just in case?
I ca
On Tue, 21 May 2013 21:24:19 +0200, M.-A. Lemburg wrote:
On 21.05.2013 20:55, Michael Bayer wrote:
On May 21, 2013, at 2:30 PM, M.-A. Lemburg wrote:
Something we do need to address in a paramstyle spec for
qmark and named is SQL comments. Perhaps easiest would be
to disallow them in SQL stat
On Thu, 23 May 2013 17:44:35 +0200, M.-A. Lemburg wrote:
I've done some research on escaping parameter markers. Here's what
I came up with:
ODBC: Supports only qmark ('?'). The standard doesn't specify an
escape sequence for ? in SQL statements.
JDBC: Supports qmark ('?') and named (':p
On Thu, 23 May 2013 16:59:27 +0200, M.-A. Lemburg wrote:
On 22.05.2013 00:52, Michael Bayer wrote:
As a total aside, I also have issues with some DBAPIs that accept *only* a list for the "sequence",
others that accept *only* a tuple (this may be only when the parameter list is empty, however).
On Thu, 23 May 2013 13:33:20 -0700, Chris Clark
wrote:
On Thu, 23 May 2013 16:59:27 +0200, M.-A. Lemburg wrote:
On 22.05.2013 00:52, Michael Bayer wrote:
As a total aside, I also have issues with some DBAPIs that accept
*only* a list for the "sequence", others that accept *onl
On Fri, 24 May 2013 10:23:41 +0200, M.-A. Lemburg wrote:
On 23.05.2013 23:37, Chris Clark wrote:
On Thu, 23 May 2013 13:33:20 -0700, Chris Clark wrote:
On Thu, 23 May 2013 16:59:27 +0200, M.-A. Lemburg wrote:
On 22.05.2013 00:52, Michael Bayer wrote:
As a total aside, I also have issues
On Fri, 24 May 2013 17:53:39 +0100, Daniele Varrazzo
wrote:
On Fri, 2013-05-24 at 08:54 -0700, Chris Clark wrote:
.executemany(sql, [0])
Again, this is valid, a single tuple with an integer value of zero.
For consistency between execute and executemany, I think
".executemany(sq
I don’t have any skin in the game (ergo not updating the ticket) that’s the
same route I went for the Python access to the Ingres DBMS (with pypyodbc as a
fallback).
Chris
From: DB-SIG [mailto:db-sig-bounces+chris.clark=actian@python.org] On
Behalf Of Randy Syring
Sent: Wednesday, January
Optional extension to pep-249, DB-API 2.0 works for me, where #3 is:
3. We leave these semantics open and up to the database module
to determine.
For DB-API 3.0 I would prefer we go with option #1 when the setautocommit()
method is called. I wouldn’t be completely devastated if I was opt
Good idea!
A statement to the effect that it is DBMS (and potentially driver) dependent
seems a good clarification.
Chris
From: DB-SIG On Behalf Of
Mike Bayer
Sent: Friday, April 7, 2023 10:15 AM
To: db-sig@python.org
Subject: [DB-SIG] documenting whether or not the seq_of_parameters to
exec
44 matches
Mail list logo