Skip to content

Commit

Permalink
chore(mysql): add kwargs docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and jcrist committed Jul 10, 2023
1 parent e3f3e2d commit cb0abfc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ibis/backends/mysql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def do_connect(
database: str | None = None,
url: str | None = None,
driver: Literal["pymysql"] = "pymysql",
**kwargs
**kwargs,
) -> None:
"""Create an Ibis client using the passed connection parameters.
Expand All @@ -52,6 +52,10 @@ def do_connect(
connection arguments are ignored.
driver
Python MySQL database driver
kwargs
Additional keyword arguments passed to `connect_args` in
`sqlalchemy.create_engine`. Use these to pass dialect specific
arguments.
Examples
--------
Expand Down Expand Up @@ -103,7 +107,9 @@ def do_connect(

self.database_name = alchemy_url.database

engine = sa.create_engine(alchemy_url, poolclass=sa.pool.StaticPool, connect_args=kwargs)
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 cb0abfc

Please sign in to comment.