Check the existence of a particular index name in the database. Given a :class:`_engine.Connection` object, a string ``table_name`` and string index name, return ``True`` if an index of the given name on the given table exists, ``False`` otherwise. The :class:`.Defa
(
self,
connection: Connection,
table_name: str,
index_name: str,
schema: Optional[str] = None,
**kw: Any,
)
| 1914 | raise NotImplementedError() |
| 1915 | |
| 1916 | def has_index( |
| 1917 | self, |
| 1918 | connection: Connection, |
| 1919 | table_name: str, |
| 1920 | index_name: str, |
| 1921 | schema: Optional[str] = None, |
| 1922 | **kw: Any, |
| 1923 | ) -> bool: |
| 1924 | """Check the existence of a particular index name in the database. |
| 1925 | |
| 1926 | Given a :class:`_engine.Connection` object, a string |
| 1927 | ``table_name`` and string index name, return ``True`` if an index of |
| 1928 | the given name on the given table exists, ``False`` otherwise. |
| 1929 | |
| 1930 | The :class:`.DefaultDialect` implements this in terms of the |
| 1931 | :meth:`.Dialect.has_table` and :meth:`.Dialect.get_indexes` methods, |
| 1932 | however dialects can implement a more performant version. |
| 1933 | |
| 1934 | This is an internal dialect method. Applications should use |
| 1935 | :meth:`_engine.Inspector.has_index`. |
| 1936 | |
| 1937 | .. versionadded:: 1.4 |
| 1938 | |
| 1939 | """ |
| 1940 | |
| 1941 | raise NotImplementedError() |
| 1942 | |
| 1943 | def has_sequence( |
| 1944 | self, |
no outgoing calls