class documentation

class MySQLExecutionContext_pyodbc(MySQLExecutionContext):

View In Hierarchy

Undocumented

Method get​_lastrowid return self.cursor.lastrowid, or equivalent, after an INSERT.

Inherited from MySQLExecutionContext:

Method create​_server​_side​_cursor Undocumented
Method fire​_sequence Undocumented
Method should​_autocommit​_text Parse the given textual statement and return True if it refers to a "committable" statement

Inherited from DefaultExecutionContext (via MySQLExecutionContext):

Method create​_cursor Return a new cursor generated from this ExecutionContext's connection.
Method get​_current​_parameters Return a dictionary of parameters applied to the current row.
Method get​_out​_parameter​_values Return a sequence of OUT parameter values from a cursor.
Method get​_result​_processor Return a 'result processor' for a given type as present in cursor.description.
Method handle​_dbapi​_exception Receive a DBAPI exception which occurred upon execute, result fetch, etc.
Method lastrow​_has​_defaults Return True if the last INSERT or UPDATE row contained inlined or database-side defaults.
Method post​_exec Called after the execution of a compiled statement.
Method pre​_exec Called before an execution of a compiled statement.
Instance Variable current​_parameters A dictionary of parameters applied to the current row.
Class Method ​_init​_compiled Initialize execution context for a Compiled construct.
Class Method ​_init​_ddl Initialize execution context for a DDLElement construct.
Class Method ​_init​_default Initialize execution context for a ColumnDefault construct.
Class Method ​_init​_statement Initialize execution context for a string SQL statement.
Method ​_exec​_default Undocumented
Method ​_exec​_default​_clause​_element Undocumented
Method ​_execute​_scalar Execute a string statement on the current cursor, returning a scalar result.
Method ​_get​_cache​_stats Undocumented
Method ​_process​_executemany​_defaults Undocumented
Method ​_process​_executesingle​_defaults Undocumented
Method ​_set​_input​_sizes Given a cursor and ClauseParameters, call the appropriate style of setinputsizes() on the cursor, using DB-API types from the bind parameter's TypeEngine objects.
Method ​_setup​_dml​_or​_text​_result Undocumented
Method ​_setup​_ins​_pk​_from​_empty Undocumented
Method ​_setup​_ins​_pk​_from​_implicit​_returning Undocumented
Method ​_setup​_ins​_pk​_from​_lastrowid Undocumented
Method ​_setup​_out​_parameters Undocumented
Method ​_setup​_result​_proxy Undocumented
Method ​_use​_server​_side​_cursor Undocumented
Method create​_default​_cursor Undocumented
Method get​_insert​_default Undocumented
Method get​_update​_default Undocumented
Method supports​_sane​_multi​_rowcount Undocumented
Method supports​_sane​_rowcount Undocumented
Class Variable ​_translate​_colname Undocumented
Class Variable cache​_stats Undocumented
Class Variable exclude​_set​_input​_sizes Undocumented
Class Variable include​_set​_input​_sizes Undocumented
Instance Variable ​_dbapi​_connection Undocumented
Instance Variable ​_expanded​_parameters Undocumented
Instance Variable ​_is​_explicit​_returning Undocumented
Instance Variable ​_is​_future​_result Undocumented
Instance Variable ​_is​_implicit​_returning Undocumented
Instance Variable ​_is​_server​_side Undocumented
Instance Variable ​_soft​_closed Undocumented
Instance Variable cache​_hit Undocumented
Instance Variable compiled Undocumented
Instance Variable compiled​_parameters Undocumented
Instance Variable cursor Undocumented
Instance Variable dialect Undocumented
Instance Variable executemany Undocumented
Instance Variable execution​_options Undocumented
Instance Variable extracted​_parameters Undocumented
Instance Variable invoked​_statement Undocumented
Instance Variable is​_crud Undocumented
Instance Variable is​_text Undocumented
Instance Variable isddl Undocumented
Instance Variable isdelete Undocumented
Instance Variable isinsert Undocumented
Instance Variable isupdate Undocumented
Instance Variable parameters Undocumented
Instance Variable result​_column​_struct Undocumented
Instance Variable returned​_default​_rows Undocumented
Instance Variable root​_connection Undocumented
Instance Variable statement Undocumented
Instance Variable unicode​_statement Undocumented
Property connection Undocumented
Property engine Undocumented
Property identifier​_preparer Undocumented
Property inserted​_primary​_key​_rows Undocumented
Property no​_parameters Undocumented
Property postfetch​_cols Undocumented
Property prefetch​_cols Undocumented
Property returning​_cols Undocumented
Property rowcount Undocumented
Property should​_autocommit Undocumented

Inherited from ExecutionContext (via MySQLExecutionContext, DefaultExecutionContext):

Method get​_result​_cursor​_strategy Return a result cursor strategy for a given result object.
Method get​_rowcount Return the DBAPI cursor.rowcount value, or in some cases an interpreted value.
def get_lastrowid(self):

return self.cursor.lastrowid, or equivalent, after an INSERT.

This may involve calling special cursor functions, issuing a new SELECT on the cursor (or a new one), or returning a stored value that was calculated within post_exec().

This function will only be called for dialects which support "implicit" primary key generation, keep preexecute_autoincrement_sequences set to False, and when no explicit id value was bound to the statement.

The function is called once for an INSERT statement that would need to return the last inserted primary key for those dialects that make use of the lastrowid concept. In these cases, it is called directly after .ExecutionContext.post_exec.