Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 dbapi20 module should be able to create new databases

open
nobody
None
5
2006-04-12
2006-04-12
Wesley J. Chun
No

To startup gadfly on the old/original/current system:

EXISTING:
connection = gadfly.gadfly(DBNAME, DBDIR)

NEW:
connection = gadfly.gadfly()
connection.startup(DBNAME, DBDIR)

The new DB-API 2.0 module (which is incomplete) only
requires the connect() function to work, and it does,
but only for EXISTING databases... it is impossible to
startup a new one with the current code.

EXISTING:
connection = gadfly.dbapi20.connect(DBNAME, DBDIR)

NEW:
*** NOT SUPPORTED ***

This patch consists of modifications to
gadfly/dbapi20.connect() to be able to handle creating
a new database so that only one call is required:

EXISTING and NEW:
connection = gadfly.dbapi20.connect(DBNAME, DBDIR)

Without this patch, you have to open the new database
with the old non-DB-API 2.0-compliant code, then reopen
the database *with* the dbapi20 module.

The database is now created properly. (dbapi20 will
still fails its remaining tests because it is
incomplete -- missing the Type object implementations.)

Discussion

  • Wesley J. Chun
    Wesley J. Chun
    2006-04-12

    patch to dbapi20 and its regressor (2 new *.py files and 2 Unified diffs)

     
    Attachments