MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / has_table

Method has_table

lib/sqlalchemy/dialects/oracle/base.py:2337–2357  ·  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

2335
2336 @reflection.cache
2337 def has_table(
2338 self, connection, table_name, schema=None, dblink=None, **kw
2339 ):
2340 """Supported kw arguments are: ``dblink`` to reflect via a db link."""
2341 self._ensure_has_table_connection(connection)
2342
2343 if not schema:
2344 schema = self.default_schema_name
2345
2346 params = {
2347 "table_name": self.denormalize_name(table_name),
2348 "owner": self.denormalize_schema_name(schema),
2349 }
2350 cursor = self._execute_reflection(
2351 connection,
2352 self._has_table_query,
2353 dblink,
2354 returns_long=False,
2355 params=params,
2356 )
2357 return bool(cursor.scalar())
2358
2359 @reflection.cache
2360 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