Class omnisci::cursor::Cursor¶
-
class
Cursor
¶ A database cursor.
Public Functions
-
def omnisci.cursor.Cursor.__init__()
-
def omnisci.cursor.Cursor.__iter__()
-
def omnisci.cursor.Cursor.__enter__()
-
def omnisci.cursor.Cursor.__exit__()
-
def omnisci.cursor.Cursor.description()
Read-only sequence describing columns of the result set. Each column is an instance of `Description` describing - name - type_code - display_size - internal_size - precision - scale - null_ok We only use name, type_code, and null_ok; The rest are always ``None``
-
def omnisci.cursor.Cursor.result_set()
-
def omnisci.cursor.Cursor.arraysize()
The number of rows to fetch at a time with `fetchmany`. Default 1. See Also -------- fetchmany
-
def omnisci.cursor.Cursor.arraysize()
Number of items to fetch with :func:`fetchmany`.
-
def omnisci.cursor.Cursor.close()
Close this cursor.
-
def omnisci.cursor.Cursor.execute()
Execute a SQL statement. Parameters ---------- operation: str A SQL query parameters: dict Parameters to substitute into ``operation``. Returns ------- self : Cursor Examples -------- >>> c = conn.cursor() >>> c.execute("select symbol, qty from stocks") >>> list(c) [('RHAT', 100.0), ('IBM', 1000.0), ('MSFT', 1000.0), ('IBM', 500.0)] Passing in ``parameters``: >>> c.execute("select symbol qty from stocks where qty <= :max_qty", ... parameters={"max_qty": 500}) [('RHAT', 100.0), ('IBM', 500.0)]
-
def omnisci.cursor.Cursor.executemany()
Execute a SQL statement for many sets of parameters. Parameters ---------- operation: str parameters: list of dict Returns ------- results: list of lists
-
def omnisci.cursor.Cursor.fetchone()
Fetch a single row from the results set
-
def omnisci.cursor.Cursor.fetchmany()
Fetch ``size`` rows from the results set.
-
def omnisci.cursor.Cursor.fetchall()
-
def omnisci.cursor.Cursor.setinputsizes()
-
def omnisci.cursor.Cursor.setoutputsizes()
Public Members
-
omnisci.cursor.Cursor::connection
-
omnisci.cursor.Cursor::rowcount
Private Members
-
omnisci.cursor.Cursor::_description
-
omnisci.cursor.Cursor::_arraysize
-
omnisci.cursor.Cursor::_result
-
omnisci.cursor.Cursor::_result_set
-