Skip to content

Commit be305ff

Browse files
Add some documentation.
1 parent ec32a70 commit be305ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/io/sql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,13 +969,17 @@ def __init__(
969969
raise ValueError("Empty table name specified")
970970

971971
def _drop_temporary_table(self):
972+
"""Drop a temporary table. Temporary tables are not in a database's meta data
973+
and need to be dropped hard coded."""
972974
if self.schema is None:
973975
query = f"DROP TABLE {self.name}"
974976
else:
975977
query = f"DROP TABLE {self.schema}.{self.name}"
976978
self.pd_sql.execute(query)
977979

978980
def _exists_temporary(self):
981+
"""Check if a temporary table exists. Temporary tables are not in a database's
982+
meta data. The existence is duck tested by a SELECT statement."""
979983
from sqlalchemy.exc import (
980984
OperationalError,
981985
ProgrammingError,

0 commit comments

Comments
 (0)