Cursor Object Methods

The API used for cursor objects.

close
cursor.close()
callproc

Calls a stored database procedure with the given name. After fetching all the result sets and rows, use the proc_status attribute to check the status result of the stored procedure.

cursor.callproc()
execute

Prepares and executes a query.

cursor.execute()
executemany

Prepares a database operation and executes it against all parameter sequences found in the sequence seq_of_parameters.

cursor.executemany()
fetch

Fetches the next row of a query result set, returning a single sequence, or None when no more data is available.

cursor.fetch()
fetchmany

Fetches the next set of rows of a query result, returning a sequence of sequences, for example, a list of tuples. An empty sequence is returned when no rows are available.

cursor.fetchmany()
fetchall

Fetches all (remaining) rows of a query result, returning them as a sequence of sequences.

cursor.fetchall()
description

A read-only attribute describing the column information.

cursor.description()
nextset

Forces the cursor to skip to the next available set, discarding any remaining rows from the current set.

cursor.nextset()
arraysize

This read/write attribute specifies the number of rows to fetch at a time with fetchmany(). It defaults to 1 which indicates to fetch a single row at a time.

cursor.arraysize()
proc_status

Read/write attribute specifies the number of rows to fetch at a time with fetchmany(). Defaults to 1 which indicates to fetch a single row at a time.

cursor.proc_status