MCPcopy
hub / github.com/pandas-dev/pandas / has_table

Method has_table

pandas/io/sql.py:2925–2937  ·  view source on GitHub ↗
(self, name: str, schema: str | None = None)

Source from the content-addressed store, hash-verified

2923 return table.insert(chunksize, method)
2924
2925 def has_table(self, name: str, schema: str | None = None) -> bool:
2926 wld = "?"
2927 query = f"""
2928 SELECT
2929 name
2930 FROM
2931 sqlite_master
2932 WHERE
2933 type IN ('table', 'view')
2934 AND name={wld};
2935 """
2936
2937 return len(self.execute(query, [name]).fetchall()) > 0
2938
2939 def get_table(self, table_name: str, schema: str | None = None) -> None:
2940 return None # not supported in fallback mode

Callers 1

delete_rowsMethod · 0.95

Calls 1

executeMethod · 0.95

Tested by

no test coverage detected