MCPcopy Create free account
hub / github.com/dbcli/mycli / tables

Method tables

mycli/sqlexecute.py:414–421  ·  view source on GitHub ↗

Yields table names

(self)

Source from the content-addressed store, hash-verified

412 return SQLResult(preamble=preamble, header=header, rows=cursor, status=status)
413
414 def tables(self) -> Generator[tuple[str], None, None]:
415 """Yields table names"""
416
417 assert isinstance(self.conn, Connection)
418 with self.conn.cursor() as cur:
419 _logger.debug("Tables Query. sql: %r", self.tables_query)
420 cur.execute(self.tables_query)
421 yield from cur
422
423 def table_columns(self, schema: str | None = None) -> Generator[tuple[str, str], None, None]:
424 """Yields (table name, column name) pairs for *schema* (default: current database)."""

Calls 3

cursorMethod · 0.45
debugMethod · 0.45
executeMethod · 0.45