Home | Trees | Index | Help |
---|
Package MySQLdb :: Module connections :: Class Connection |
|
object
--+ |connection
--+ | Connection
Method Summary | |
---|---|
Create a connection to the database. | |
Create a cursor on which queries may be performed. | |
If cursor is not None, (errorclass, errorvalue) is appended to cursor.messages; otherwise it is appended to connection.messages. | |
If o is a single object, returns an SQL literal as a string. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T |
Class Variable Summary | |
---|---|
type |
default_cursor = MySQLdb.cursors.Cursor |
Method Details |
---|
__init__(self,
*args,
**kwargs)
|
cursor(self, cursorclass=None)Create a cursor on which queries may be performed. The optional cursorclass parameter is used to create the Cursor. By default, self.cursorclass=cursors.Cursor is used. |
errorhandler(connection, cursor, errorclass, errorvalue)If cursor is not None, (errorclass, errorvalue) is appended to cursor.messages; otherwise it is appended to connection.messages. Then errorclass is raised with errorvalue as the value. You can override this with your own error handler by assigning it to the instance. |
literal(self, o)If o is a single object, returns an SQL literal as a string. If o is a non-string sequence, the items of the sequence are converted and returned as a sequence. Non-standard. For internal use; do not use this in your applications. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Mon Jan 31 23:02:12 2005 | http://epydoc.sf.net |