@@ -110,8 +110,9 @@ class Databases(CollectionBase):
110110
111111 """
112112
113- def __init__ (self , api ):
113+ def __init__ (self , server , api ):
114114 self .api = api
115+ self .server = server
115116
116117 def _list_databases (self ) -> Dict [str , Database ]:
117118 data = self .api .sql_query (
@@ -120,7 +121,7 @@ def _list_databases(self) -> Dict[str, Database]:
120121 name_to_db = {}
121122 for _ , row in data .iterrows ():
122123 name_to_db [row ["NAME" ]] = Database (
123- self , row ["NAME" ], engine = row ["ENGINE" ], params = row ["CONNECTION_DATA" ]
124+ self . server , row ["NAME" ], engine = row ["ENGINE" ], params = row ["CONNECTION_DATA" ]
124125 )
125126 return name_to_db
126127
@@ -153,7 +154,7 @@ def create(
153154 parameters = connection_args ,
154155 )
155156 self .api .sql_query (ast_query .to_string ())
156- return Database (self , name , engine = engine , params = connection_args )
157+ return Database (self . server , name , engine = engine , params = connection_args )
157158
158159 def drop (self , name : str ):
159160 """
0 commit comments