Re: [DB-SIG] Extending DB-API

2006-11-26 Thread Ian Bicking
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

Re: [DB-SIG] Extending DB-API

2006-11-16 Thread Ian Bicking
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

[DB-SIG] Extending DB-API

2006-11-16 Thread Ian Bicking
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

Re: [DB-SIG] Proposed improvements to DBAPI 2.0 Cursor.execute() method.

2006-08-16 Thread Ian Bicking
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

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-24 Thread Ian Bicking
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

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-20 Thread 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 = &#x

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-20 Thread Ian Bicking
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.

[DB-SIG] SQL-API

2006-04-19 Thread Ian Bicking
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

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-19 Thread Ian Bicking
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

Re: [DB-SIG] paramstyles (mysql string length?)

2006-04-19 Thread Ian Bicking
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 __

Re: [DB-SIG] [Web-SIG] WSGI thread affinity/interleaving

2005-12-18 Thread Ian Bicking
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 ___

[DB-SIG] ANN: SQLObject 0.7.0

2005-10-01 Thread Ian Bicking
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

Re: [DB-SIG] URI syntax for database

2005-04-04 Thread Ian Bicking
.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', '&

Re: [DB-SIG] URI syntax for database (was: [SQLObject] Re: SQLite connection - relative filename)

2005-04-04 Thread Ian Bicking
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

Re: [DB-SIG] URI syntax for database (was: [SQLObject] Re: SQLite connection - relative filename)

2005-04-04 Thread Ian Bicking
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

Re: [DB-SIG] [SQLObject] Re: SQLite connection - relative filename

2005-04-01 Thread Ian Bicking
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

[DB-SIG] [SQLObject] Re: SQLite connection - relative filename

2005-04-01 Thread Ian Bicking
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

Re: [DB-SIG] URI syntax for databases

2005-03-31 Thread Ian Bicking
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

Re: [DB-SIG] URI syntax for databases

2005-03-30 Thread Ian Bicking
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

Re: [DB-SIG] URI syntax for databases

2005-03-30 Thread Ian Bicking
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

[DB-SIG] URI syntax for databases

2005-03-30 Thread Ian Bicking
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

Re: [DB-SIG] Re: [Pycon2005-attendees] Pycon2005 and database divide (ODB vs relational DB)

2005-03-27 Thread Ian Bicking
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

Re: [DB-SIG] Table Oriented Programming

2005-01-29 Thread Ian Bicking
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 &

Re: [DB-SIG] Table Oriented Programming

2005-01-28 Thread Ian Bicking
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

Re: [DB-SIG] Table Oriented Programming

2005-01-28 Thread Ian Bicking
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

[DB-SIG] [ANN] SQLObject 0.6.1

2005-01-25 Thread Ian Bicking
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

Re: [DB-SIG] Python with Rails?

2005-01-25 Thread Ian Bicking
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