ns they throw. I doubt they could be made consistent without
parsing the text portion of the exceptions.
Incidentally, I tried to pull together a few of these things in sqlapi:
http://sqlobject.org/sqlapi/ -- but I don't really have the time to push
that forward, and I think it
ke that. The
particular motivation here is that given this and some of the other
pieces, web frameworks could just support "databases" and wouldn't
require any specific code related to any one database
wrapper/library/ORM. And the story would be relatively consistent
across env
abase library/framework code can be written in a reasonably
abstract way without worrying about deployment concerns.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
l that said, I think there's also room for more standards, but they
can build on the DB-API instead of extending it.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
ike this:
>
> 'it''s Monty Python'
Postgres and MySQL allow 'it\'s Monty Python'. Parsing SQL for every
query seems like a bit of a performance problem, especially because the
parsing itself can be different for different databases.
--
Ian Bicking
ithin
> quote marks. The parameter substitution mechanism adds quotes as necessary
> when it substitutes a data value for a placeholder.
He's referring to something like this:
def get_androgenous_users(state):
execute("SELECT * FROM users WHERE state = ? and gender =
M.-A. Lemburg wrote:
>>OK, crazy idea: use \x00 as a marker, which requires no quoting or
>>parsing (as it can't be included in any SQL literal anyway).
>
>
> Not sure about that one: some systems such as e.g. Zope use
> \x00 to delimit multi-line SQL statements.
fairly open at this
point, so I'm very open to suggestions or contributions.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
e most efficient one for the driver.
OK, crazy idea: use \x00 as a marker, which requires no quoting or
parsing (as it can't be included in any SQL literal anyway).
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
tyle
> wouldn't be too much of a problem.
AFAIK, they all use %, so you have to do execute("%s like 'foo%%'",
(value,)); this is quite different from qmark.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
__
ou to move a
connection between threads. I'm not actually sure what problems it
causes if you do move them -- it may simply be an overzealous warning.
CCing DB-SIG -- people there might know more details.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
___
th further filtering allowed
* Public introspection interface (sqlmeta)
* Better date support
* New column types: BLOBCol and PickleCol
* Bug fixes, small changes, etc.
See http://sqlobject.org/News.html for details.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianb
.uses_netloc.append("pydbapi-mysql")
urlparse.uses_query.append("pydbapi-mysql")
urlparse.urlparse('pydbapi-mysql://user:[EMAIL
PROTECTED]:port/database?compress=1')
('pydbapi-mysql', 'user:[EMAIL PROTECTED]:port', '/database', '&
the user in setting up
things.
Well, I can say that *I* find them very useful and comfortable when
configuring SQLObject, even though I initially didn't think they were
that important. I suspect that the effect would actually be magnified
for someone with less experience using Pytho
word be used similar to other protocols?
pydbapi:://[:@][:
/
That was my expectation. Any parameters could also be interpreted as
well, like ?autocommit=t&datestyle=mxDateTime -- and so on, which leaves
room for any parameters that would be useful.
--
Ian Bickin
ql://... which feels awfully weird to me.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
from an already-existing connection object, and to store
the original URI if that's how that connection object was originally
created.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
the required functions if it was to be
a DB-API module. Monkey-patching in a uri_connect function seems
easier, if we're going down that route. Hmm... except you can't monkey
patch something in lazily -- i.e., wait until the user actually imports
MySQLdb and then insert the f
st obvious way is to
use the scheme as the module lookup, and let the module's function do
the rest of the parsing. The resulting URIs look fairly URI-ish as well.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG mailli
least initially) support drivers I don't use (which happens
to include mxODBC among others).
I have also noticed that connect functions are rather poorly documented
for many drivers, so my implementation might not be accurate.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.or
d be
better if database drivers included the parsing code in their own packages.
Thoughts?
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
make working with a relational database easier.
Eh... maybe that's a feature to me ;) I'm not a fan of OO design,
insofar as design being good because it is OO. Typically OO has a place
in a good design, but I seldom think it's right to start with ideas like
classes and inherit
Federico Di Gregorio wrote:
Il giorno ven, 28-01-2005 alle 15:11 -0600, Ian Bicking ha scritto:
It doesn't use bound parameters like ?, instead it does all the SQL
generation itself including quotation. So it has to know what database
you are using to actually create the SQL, like &
on. So it has to know what database
you are using to actually create the SQL, like "mysql", "postgresql", etc.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
e expression by
using the various hooks (__add__, __sub__, etc.).
You can find code to do this in sqlobject.sqlbuilder:
http://svn.colorstudy.com/trunk/SQLObject/sqlobject/sqlbuilder.py -- it
doesn't have any (important) dependencies on the rest of SQLObject.
--
Ian Bicking / [EMAIL
ect-discuss
Archives:
http://dir.gmane.org/gmane.comp.python.sqlobject
Download:
http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.1.tar.gz?download
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB
sql://user:[EMAIL PROTECTED]/dbname'
_fromDatabase = True
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
___
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig
27 matches
Mail list logo