Skip to content

Commit

Permalink
Added SSL connection info for MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
ongdisheng committed Dec 29, 2024
1 parent 441743e commit 0483a79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ibis-server/app/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class MySqlConnectionInfo(BaseModel):
database: SecretStr
user: SecretStr
password: SecretStr
kwargs: dict[str, str] | None = Field(
description="Additional keyword arguments to pass to PyMySQL", default=None
)


class ConnectionUrl(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions ibis-server/app/model/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def get_mysql_connection(info: MySqlConnectionInfo) -> BaseBackend:
database=info.database.get_secret_value(),
user=info.user.get_secret_value(),
password=info.password.get_secret_value(),
**info.kwargs if info.kwargs else dict(),
)

@staticmethod
Expand Down

0 comments on commit 0483a79

Please sign in to comment.