DB API Cursor Class¶
- class attachdb.Cursor¶
- arraysize¶
An integer representing the number of rows to be returned by fetchmany() if not specified by the function call. Defaults to 1
- callproc(name, parameters=None)¶
Call a stored procedure
Parameters: - name (str) – the name of the stored procedure
- parameters (tuple) – parameters for the stored procedure
- close()¶
Close the cursor. This will read through to the end of the result set first if there is one active
- execute(query, parameters=[])¶
Execute a query with optional prepared statement style parameters. Parameter markers should be question marks (?).
Parameters: - query (str) – the query to execute
- parameters (list) – parameters for the query
- executemany(operation, sequence)¶
Execute a query multiple times with each of a sequences of parameters. For use with INSERT or UPDATE queries.
Parameters: - operation (str) – the query to execute
- sequence (list) – a list containing lists of parameters
- fetchone()¶
Fetch the next result from the result set. Returns None if there are now rows left.
Returns: The next row in the result set (or None) Return type: tuple
- fetchmany(size=None)¶
Fetch many rows from a result set. The maximum amount to return is set by the size parameter or arraysize if this is not set.
Parameters: size (int) – the amount of rows to return Returns: a list of row tuples Return type: list
- fetchall()¶
Fetch all the rows in a result set.
Returns: a list of row tuples Return type: list
- nextset()¶
Start receiving the next result set in a multiple result set query
Returns: True if successful, None is there is no more result sets Return type: boolean
- setinputsizes(sizes)¶
Not implemented
- setoutputsizes(size, column=None)¶
Not implemented