class documentation

class DatabaseWrapper(Psycopg2DatabaseWrapper):

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method prepare​_database Hook to do any database check or preparation, generally called before migrating a project or an app.
Instance Variable features Undocumented
Instance Variable introspection Undocumented
Instance Variable ops Undocumented

Inherited from DatabaseWrapper:

Method ​_nodb​_cursor No summary
Method ​_set​_autocommit Backend-specific implementation to enable or disable autocommit.
Method check​_constraints Check constraints by setting them to immediate. Return them to deferred afterward.
Method chunked​_cursor Return a cursor that tries to avoid caching in the database (if supported by the database), otherwise return a regular cursor.
Method create​_cursor Create a cursor. Assume that a connection is established.
Method ensure​_timezone Ensure the connection's timezone is set to self.timezone_name and return whether it changed or not.
Method get​_connection​_params Return a dict of parameters suitable for get_new_connection.
Method get​_new​_connection Open a connection to the database.
Method init​_connection​_state Initialize the database connection settings.
Method is​_usable Test if the database connection is usable.
Method make​_debug​_cursor Create a cursor that logs all queries in self.queries_log.
Method tzinfo​_factory Undocumented
Class Variable ​_named​_cursor​_idx Undocumented
Class Variable data​_type​_check​_constraints Undocumented
Class Variable data​_types Undocumented
Class Variable display​_name Undocumented
Class Variable operators Undocumented
Class Variable pattern​_esc Undocumented
Class Variable pattern​_ops Undocumented
Class Variable vendor Undocumented
Instance Variable isolation​_level Undocumented
Property pg​_version Undocumented

Inherited from BaseDatabaseWrapper (via DatabaseWrapper):

Method ​_close Undocumented
Method ​_commit Undocumented
Method ​_cursor Undocumented
Method ​_prepare​_cursor Validate the connection is usable and perform database cursor wrapping.
Method ​_rollback Undocumented
Method ​_savepoint Undocumented
Method ​_savepoint​_allowed Undocumented
Method ​_savepoint​_commit Undocumented
Method ​_savepoint​_rollback Undocumented
Method check​_settings Undocumented
Method clean​_savepoints Reset the counter used to generate unique savepoint ids in this thread.
Method close Close the connection to the database.
Method close​_if​_unusable​_or​_obsolete Close the current connection if unrecoverable errors have occurred or if it outlived its maximum age.
Method commit Commit a transaction and reset the dirty flag.
Method connect Connect to the database. Assume that the connection is closed.
Method constraint​_checks​_disabled Disable foreign key constraint checking.
Method copy Return a copy of this connection.
Method cursor Create a cursor, opening a connection if necessary.
Method dec​_thread​_sharing Undocumented
Method disable​_constraint​_checking Backends can implement as needed to temporarily disable foreign key constraint checking. Should return True if the constraints were disabled and will need to be reenabled.
Method enable​_constraint​_checking Backends can implement as needed to re-enable foreign key constraint checking.
Method ensure​_connection Guarantee that a connection to the database is established.
Method execute​_wrapper Return a context manager under which the wrapper is applied to suitable database query executions.
Method get​_autocommit Get the autocommit state.
Method get​_rollback Get the "needs rollback" flag -- for advanced use only.
Method inc​_thread​_sharing Undocumented
Method make​_cursor Create a cursor without debug logging.
Method on​_commit Undocumented
Method rollback Roll back a transaction and reset the dirty flag.
Method run​_and​_clear​_commit​_hooks Undocumented
Method savepoint Create a savepoint inside the current transaction. Return an identifier for the savepoint that will be used for the subsequent rollback or commit. Do nothing if savepoints are not supported.
Method savepoint​_commit Release a savepoint. Do nothing if savepoints are not supported.
Method savepoint​_rollback Roll back to a savepoint. Do nothing if savepoints are not supported.
Method schema​_editor Return a new instance of this backend's SchemaEditor.
Method set​_autocommit Enable or disable autocommit.
Method set​_rollback Set or unset the "needs rollback" flag -- for advanced use only.
Method temporary​_connection Context manager that ensures that a connection is established, and if it opened one, closes it to avoid leaving a dangling connection. This is useful for operations outside of the request-response cycle.
Method validate​_no​_atomic​_block Raise an error if an atomic block is active.
Method validate​_no​_broken​_transaction Undocumented
Method validate​_thread​_sharing No summary
Class Variable client​_class Undocumented
Class Variable creation​_class Undocumented
Class Variable data​_types​_suffix Undocumented
Class Variable features​_class Undocumented
Class Variable introspection​_class Undocumented
Class Variable ops​_class Undocumented
Class Variable queries​_limit Undocumented
Class Variable ​Schema​Editor​Class Undocumented
Instance Variable ​_thread​_ident Undocumented
Instance Variable ​_thread​_sharing​_count Undocumented
Instance Variable ​_thread​_sharing​_lock Undocumented
Instance Variable alias Undocumented
Instance Variable autocommit Undocumented
Instance Variable client Undocumented
Instance Variable close​_at Undocumented
Instance Variable closed​_in​_transaction Undocumented
Instance Variable commit​_on​_exit Undocumented
Instance Variable connection Undocumented
Instance Variable creation Undocumented
Instance Variable errors​_occurred Undocumented
Instance Variable execute​_wrappers Undocumented
Instance Variable force​_debug​_cursor Undocumented
Instance Variable in​_atomic​_block Undocumented
Instance Variable needs​_rollback Undocumented
Instance Variable queries​_log Undocumented
Instance Variable run​_commit​_hooks​_on​_set​_autocommit​_on Undocumented
Instance Variable run​_on​_commit Undocumented
Instance Variable savepoint​_ids Undocumented
Instance Variable savepoint​_state Undocumented
Instance Variable settings​_dict Undocumented
Instance Variable validation Undocumented
Property allow​_thread​_sharing Undocumented
Property queries Undocumented
Property queries​_logged Undocumented
Property timezone Return a tzinfo of the database connection time zone.
Property timezone​_name Name of the time zone of the database connection.
Property wrap​_database​_errors Context manager and decorator that re-throws backend-specific database exceptions using Django's common wrappers.
def __init__(self, *args, **kwargs):
def prepare_database(self):
Hook to do any database check or preparation, generally called before migrating a project or an app.