Skip to content

Commit

Permalink
fix(mysql): pass-through kwargs to connect_args
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw authored and jcrist committed Jul 10, 2023
1 parent b9977fb commit e3f3e2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibis/backends/mysql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def do_connect(
database: str | None = None,
url: str | None = None,
driver: Literal["pymysql"] = "pymysql",
**kwargs
) -> None:
"""Create an Ibis client using the passed connection parameters.
Expand Down Expand Up @@ -102,7 +103,7 @@ def do_connect(

self.database_name = alchemy_url.database

engine = sa.create_engine(alchemy_url, poolclass=sa.pool.StaticPool)
engine = sa.create_engine(alchemy_url, poolclass=sa.pool.StaticPool, connect_args=kwargs)

@sa.event.listens_for(engine, "connect")
def connect(dbapi_connection, connection_record):
Expand Down

0 comments on commit e3f3e2d

Please sign in to comment.