singlestoredb.connection.Cursor

class singlestoredb.connection.Cursor(connection: Connection)

Database cursor for submitting commands and queries.

This object should not be instantiated directly. The Connection.cursor method should be used.

__init__(connection: Connection)

Call Connection.cursor instead.

Methods

__init__(connection)

Call Connection.cursor instead.

callproc(name[, params])

Call a stored procedure.

close()

Close the cursor.

execute(query[, args, infile_stream])

Execute a SQL statement.

executemany(query[, args])

Execute SQL code against multiple sets of parameters.

fetchall()

Fetch all rows in the result set.

fetchmany([size])

Fetch size rows from the result.

fetchone()

Fetch a single row from the result set.

is_connected()

Is the cursor still connected?

next()

Return the next row from the result set for use in iterators.

nextset()

Skip to the next available result set.

scroll(value[, mode])

Scroll the cursor to the position in the result set.

setinputsizes(sizes)

Predefine memory areas for parameters.

setoutputsize(size[, column])

Set a column buffer size for fetches of large columns.

Attributes

connection

the connection that the cursor belongs to.

description

The field descriptions of the last query.

messages

Messages created by the server.

rownumber

The last modified row number.

arraysize

Default batch size of fetchmany calls.

rowcount

Number of rows affected by the last query.

lastrowid

Row ID of the last modified row.