OmniSciDB
a5dc49c757
|
Public Member Functions | |
def | __init__ |
def | __iter__ |
def | __enter__ |
def | __exit__ |
def | description |
def | result_set |
def | arraysize |
def | arraysize |
def | close |
def | execute |
def | executemany |
def | fetchone |
def | fetchmany |
def | fetchall |
def | setinputsizes |
def | setoutputsizes |
Public Attributes | |
connection | |
rowcount | |
Private Attributes | |
_description | |
_arraysize | |
_result | |
_result_set | |
def heavydb.cursor.Cursor.__enter__ | ( | self | ) |
def heavydb.cursor.Cursor.__exit__ | ( | self, | |
exc_type, | |||
exc_val, | |||
exc_tb | |||
) |
Definition at line 28 of file cursor.py.
References heavydb.cursor.Cursor.close(), ai.heavy.jdbc.HeavyAIResultSet.close(), Archive.close(), ai.heavy.jdbc.HeavyAIStatement.close(), heavydb.connection.Connection.close(), ai.heavy.jdbc.HeavyAIConnection.close(), and ai.heavy.jdbc.HeavyAIPreparedStatement.close().
def heavydb.cursor.Cursor.__iter__ | ( | self | ) |
def heavydb.cursor.Cursor.arraysize | ( | self | ) |
The number of rows to fetch at a time with `fetchmany`. Default 1. See Also -------- fetchmany
Definition at line 54 of file cursor.py.
References heavydb.cursor.Cursor._arraysize.
Referenced by heavydb.cursor.Cursor.arraysize(), and heavydb.cursor.Cursor.fetchmany().
def heavydb.cursor.Cursor.arraysize | ( | self, | |
value | |||
) |
Number of items to fetch with :func:`fetchmany`.
Definition at line 64 of file cursor.py.
References heavydb.cursor.Cursor._arraysize, heavydb.cursor.Cursor.arraysize(), and run_benchmark_import.type.
def heavydb.cursor.Cursor.close | ( | self | ) |
Close this cursor.
Definition at line 72 of file cursor.py.
Referenced by heavydb.cursor.Cursor.__exit__().
def heavydb.cursor.Cursor.description | ( | self | ) |
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``
Definition at line 32 of file cursor.py.
References heavydb.cursor.Cursor._description.
def heavydb.cursor.Cursor.execute | ( | self, | |
operation, | |||
parameters = None |
|||
) |
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)]
Definition at line 77 of file cursor.py.
Referenced by heavydb.cursor.Cursor.executemany().
def heavydb.cursor.Cursor.executemany | ( | self, | |
operation, | |||
parameters | |||
) |
Execute a SQL statement for many sets of parameters. Parameters ---------- operation: str parameters: list of dict Returns ------- results: list of lists
Definition at line 133 of file cursor.py.
References LeafAggregator.execute(), DdlCommand.execute(), CreateForeignServerCommand.execute(), AlterForeignServerCommand.execute(), heavydb.cursor.Cursor.execute(), DropForeignServerCommand.execute(), CreateForeignTableCommand.execute(), DropForeignTableCommand.execute(), AlterTableAlterColumnCommand.execute(), AlterTableCommand.execute(), AlterForeignTableCommand.execute(), ShowForeignServersCommand.execute(), ShowCreateServerCommand.execute(), ShowTablesCommand.execute(), ShowTableDetailsCommand.execute(), ShowCreateTableCommand.execute(), ai.heavy.jdbc.HeavyAIStatement.execute(), ShowDatabasesCommand.execute(), ShowFunctionsCommand.execute(), ShowRuntimeFunctionsCommand.execute(), ShowTableFunctionsCommand.execute(), ShowRuntimeTableFunctionsCommand.execute(), ShowModelsCommand.execute(), ShowModelDetailsCommand.execute(), ShowModelFeatureDetailsCommand.execute(), EvaluateModelCommand.execute(), ShowDiskCacheUsageCommand.execute(), ShowUserDetailsCommand.execute(), ShowRolesCommand.execute(), ai.heavy.jdbc.HeavyAIPreparedStatement.execute(), RefreshForeignTablesCommand.execute(), heavydb.connection.Connection.execute(), CreatePolicyCommand.execute(), ShowPoliciesCommand.execute(), DropPolicyCommand.execute(), AlterDatabaseCommand.execute(), ReassignOwnedCommand.execute(), DdlCommandExecutor.execute(), Parser::DDLStmt.execute(), Parser::CreateTableStmt.execute(), Parser::CreateDataframeStmt.execute(), Parser::InsertIntoTableAsSelectStmt.execute(), Parser::CreateTableAsSelectStmt.execute(), Parser::DropTableStmt.execute(), Parser::TruncateTableStmt.execute(), Parser::OptimizeTableStmt.execute(), Parser::ValidateStmt.execute(), Parser::RenameDBStmt.execute(), Parser::RenameUserStmt.execute(), Parser::RenameTableStmt.execute(), Parser::RenameColumnStmt.execute(), Parser::AddColumnStmt.execute(), Parser::DropColumnStmt.execute(), Parser::AlterTableParamStmt.execute(), Parser::DumpTableStmt.execute(), Parser::RestoreTableStmt.execute(), Parser::CopyTableStmt.execute(), Parser::CreateRoleStmt.execute(), Parser::DropRoleStmt.execute(), Parser::GrantPrivilegesStmt.execute(), Parser::RevokePrivilegesStmt.execute(), Parser::ShowPrivilegesStmt.execute(), Parser::GrantRoleStmt.execute(), Parser::RevokeRoleStmt.execute(), Parser::ExportQueryStmt.execute(), Parser::CreateViewStmt.execute(), Parser::DropViewStmt.execute(), Parser::CreateDBStmt.execute(), Parser::DropDBStmt.execute(), Parser::CreateModelStmt.execute(), Parser::DropModelStmt.execute(), Parser::CreateUserStmt.execute(), Parser::AlterUserStmt.execute(), Parser::DropUserStmt.execute(), and Parser::InsertValuesStmt.execute().
def heavydb.cursor.Cursor.fetchall | ( | self | ) |
def heavydb.cursor.Cursor.fetchmany | ( | self, | |
size = None |
|||
) |
Fetch ``size`` rows from the results set.
Definition at line 157 of file cursor.py.
References heavydb.cursor.Cursor.arraysize(), and heavydb.cursor.Cursor.fetchone().
def heavydb.cursor.Cursor.fetchone | ( | self | ) |
Fetch a single row from the results set
Definition at line 150 of file cursor.py.
References heavydb.cursor.Cursor.result_set().
Referenced by heavydb.cursor.Cursor.fetchmany().
def heavydb.cursor.Cursor.result_set | ( | self | ) |
Definition at line 50 of file cursor.py.
References heavydb.cursor.Cursor._result_set.
Referenced by heavydb.cursor.Cursor.__iter__(), and heavydb.cursor.Cursor.fetchone().
def heavydb.cursor.Cursor.setinputsizes | ( | self, | |
sizes | |||
) |
def heavydb.cursor.Cursor.setoutputsizes | ( | self, | |
size, | |||
column = None |
|||
) |
|
private |
Definition at line 14 of file cursor.py.
Referenced by heavydb.cursor.Cursor.arraysize().
|
private |
Definition at line 13 of file cursor.py.
Referenced by heavydb.cursor.Cursor.description(), and heavydb.cursor.Cursor.execute().
|
private |
Definition at line 15 of file cursor.py.
Referenced by heavydb.cursor.Cursor.execute().
|
private |
Definition at line 16 of file cursor.py.
Referenced by heavydb.cursor.Cursor.execute(), and heavydb.cursor.Cursor.result_set().
heavydb.cursor.Cursor.rowcount |
Definition at line 12 of file cursor.py.
Referenced by heavydb.cursor.Cursor.execute().