MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_sequence

Method has_sequence

lib/sqlalchemy/engine/reflection.py:444–461  ·  view source on GitHub ↗

r"""Return True if the backend has a sequence with the given name. :param sequence_name: name of the sequence to check :param schema: schema name to query, if not the default schema. :param \**kw: Additional keyword argument to pass to the dialect specific implement

(
        self, sequence_name: str, schema: Optional[str] = None, **kw: Any
    )

Source from the content-addressed store, hash-verified

442 )
443
444 def has_sequence(
445 self, sequence_name: str, schema: Optional[str] = None, **kw: Any
446 ) -> bool:
447 r"""Return True if the backend has a sequence with the given name.
448
449 :param sequence_name: name of the sequence to check
450 :param schema: schema name to query, if not the default schema.
451 :param \**kw: Additional keyword argument to pass to the dialect
452 specific implementation. See the documentation of the dialect
453 in use for more information.
454
455 .. versionadded:: 1.4
456
457 """
458 with self._operation_context() as conn:
459 return self.dialect.has_sequence(
460 conn, sequence_name, schema, info_cache=self.info_cache, **kw
461 )
462
463 def has_index(
464 self,

Callers

nothing calls this directly

Calls 1

_operation_contextMethod · 0.95

Tested by

no test coverage detected