Cursor Objects
These objects represent a database cursor, which manages the context of a fetch operation.
Cursor objects should respond to the following
methods and attributes:
-
description This read-only attribute is a sequence of seven-item sequences. Each of these sequences contains information describing one result column: (
name,type_code,display_size,internal_size,precision,scale,null_ok). This attribute isNonefor operations that don’t return rows or if the cursor has not yet had an operation invoked via theexecuteXXX()method.The
type_codecan be interpreted by comparing it to theTypeobjects specified in the next section.-
rowcount This read-only attribute specifies the number of rows the last
executeXXX()produced (for DQL statements such asselect) or affected (for DML statements such asupdateorinsert).The attribute is -1 if no
executeXXX()has been performed on the cursor or the row count of the last operation can’t be determined by the interface.Note 5-
callproc(procname[,parameters]) This method is optional since not all databases provide stored procedures. Note 3
Calls a stored database procedure with the given name. The sequence of parameters must contain one entry for each argument the procedure expects. The result of the call is returned as modified copy of the input sequence. Input parameters are left untouched, output and input/output parameters are replaced with possibly new values.
The procedure may also provide a result set as output. This must ...