Skip to content

Commit

Permalink
chore: use gen_name instead of guid
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Aug 25, 2023
1 parent a562439 commit 6a81a51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ibis/backends/mysql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _metadata(self, table: str) -> Iterable[tuple[str, dt.DataType]]:
yield name, MySQLType.from_string(type_string, nullable=is_nullable)

def _get_schema_using_query(self, query: str):
table = f"__ibis_mysql_metadata_{util.guid()}"
table = util.gen_name("mysql_metadata")

with self.begin() as con:
con.exec_driver_sql(f"CREATE TEMPORARY TABLE {table} AS {query}")
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/oracle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def current_database(self) -> str:
return self._scalar_query("SELECT * FROM global_name")

def _metadata(self, query: str) -> Iterable[tuple[str, dt.DataType]]:
table = f"__ibis_oracle_metadata_{util.guid()}"
table = util.gen_name("oracle_metadata")

with self.begin() as con:
con.exec_driver_sql(
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/sqlite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def _current_schema(self) -> str | None:
return self.current_database

def _metadata(self, query: str) -> Iterator[tuple[str, dt.DataType]]:
view = f"__ibis_sqlite_metadata_{util.guid()}"
view = util.gen_name("sqlite_metadata")

with self.begin() as con:
if query in self.list_tables():
Expand Down

0 comments on commit 6a81a51

Please sign in to comment.