Home | Trees | Index | Help |
---|
object
--+
|
BaseCursor
Cursor
,
DictCursor
,
SSCursor
,
SSDictCursor
A base for Cursor classes. Useful attributes:
Method Summary | |
---|---|
__init__(self,
connection)
| |
__del__(self)
| |
__iter__(self)
| |
Execute stored procedure procname with args | |
Close the cursor. | |
Execute a query. | |
Execute a multi-row query. | |
Advance to the next result set. | |
Does nothing, required by DB API. | |
Does nothing, required by DB API. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
Execute stored procedure procname with args
procname -- string, name of procedure to execute on server
args -- Sequence of parameters to use with procedure
Returns the original args.
Compatibility warning: PEP-249 specifies that any modified parameters must be returned. This is currently impossible as they are only available by storing them in a server variable and then retrieved by a query. Since stored procedures return zero or more result sets, there is no reliable way to get at OUT or INOUT parameters via callproc. The server variables are named @_procname_n, where procname is the parameter above and n is the position of the parameter (from zero). Once all result sets generated by the procedure have been fetched, you can issue a SELECT @_procname_0, ... query using .execute() to get any OUT or INOUT values.
Compatibility warning: The act of calling a stored procedure itself creates an empty result set. This appears after any result sets generated by the procedure. This is non-standard behavior with respect to the DB-API. Be sure to use nextset() to advance through all result sets; otherwise you may get disconnected.
Close the cursor. No further queries will be possible.
Execute a query.
query -- string, query to execute on server args -- optional sequence or mapping, parameters to use with query.
Note: If args is a sequence, then %s must be used as the parameter placeholder in the query. If a mapping is used, %(key)s must be used as the placeholder.
Returns long integer rows affected, if any
Execute a multi-row query.
query -- string, query to execute on server
args
Sequence of sequences or mappings, parameters to use with query.
Returns long integer rows affected, if any.
This method improves performance on multiple-row INSERT and REPLACE. Otherwise it is equivalent to looping over args with execute().
Advance to the next result set.
Returns None if there are no more result sets.
Does nothing, required by DB API.
Does nothing, required by DB API.
Home | Trees | Index | Help |
---|