MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / has_table

Method has_table

lib/sqlalchemy/dialects/oracle/base.py:2166–2186  ·  view source on GitHub ↗

Supported kw arguments are: ``dblink`` to reflect via a db link.

(
        self, connection, table_name, schema=None, dblink=None, **kw
    )

Source from the content-addressed store, hash-verified

2164
2165 @reflection.cache
2166 def has_table(
2167 self, connection, table_name, schema=None, dblink=None, **kw
2168 ):
2169 """Supported kw arguments are: ``dblink`` to reflect via a db link."""
2170 self._ensure_has_table_connection(connection)
2171
2172 if not schema:
2173 schema = self.default_schema_name
2174
2175 params = {
2176 "table_name": self.denormalize_name(table_name),
2177 "owner": self.denormalize_schema_name(schema),
2178 }
2179 cursor = self._execute_reflection(
2180 connection,
2181 self._has_table_query,
2182 dblink,
2183 returns_long=False,
2184 params=params,
2185 )
2186 return bool(cursor.scalar())
2187
2188 @reflection.cache
2189 def has_sequence(

Callers

nothing calls this directly

Calls 5

_execute_reflectionMethod · 0.95
denormalize_nameMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected