Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Classe « Dialect »

Méthode sqlalchemy.Dialect.has_table

Signature de la méthode has_table

def has_table(self, connection: 'Connection', table_name: 'str', schema: 'Optional[str]' = None, **kw: 'Any') -> 'bool' 

Description

help(Dialect.has_table)

For internal dialect use, check the existence of a particular table
or view in the database.

Given a :class:`_engine.Connection` object, a string table_name and
optional schema name, return True if the given table exists in the
database, False otherwise.

This method serves as the underlying implementation of the
public facing :meth:`.Inspector.has_table` method, and is also used
internally to implement the "checkfirst" behavior for methods like
:meth:`_schema.Table.create` and :meth:`_schema.MetaData.create_all`.

.. note:: This method is used internally by SQLAlchemy, and is
   published so that third-party dialects may provide an
   implementation. It is **not** the public API for checking for table
   presence. Please use the :meth:`.Inspector.has_table` method.

.. versionchanged:: 2.0:: :meth:`_engine.Dialect.has_table` now
   formally supports checking for additional table-like objects:

   * any type of views (plain or materialized)
   * temporary tables of any kind

   Previously, these two checks were not formally specified and
   different dialects would vary in their behavior.   The dialect
   testing suite now includes tests for all of these object types,
   and dialects to the degree that the backing database supports views
   or temporary tables should seek to support locating these objects
   for full compliance.



Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé