deriving MySQLdb class

Sean DiZazzo half.italian at gmail.com
Thu Jan 21 23:48:15 EST 2010


On Jan 21, 8:17 pm, tekion <tek... at gmail.com> wrote:
> Sean,
> I did a little investigation, there are other classes besides
> Connection. So, could I only set up a derived class from Connection
> and still be able to use the connection to query database and retrieve
> data?

Im not sure I understand you completely...

In theory, you could use the C API directly and subclass
_mysql.connection to get at the database.  But I think the point of
MySQLdb is that they've done all the hard work.  Why not use it?

I think the other stuff in the module is in support of the Connection
() class.  ie.  You cant get a cursor unless you already have a
connection.



More information about the Python-list mailing list