Skip to content

Commit d20593b

Browse files
authored
Merge pull request #12 from RedMarkerTech/ssl
support passing any config to connection
2 parents 1d22d7c + fc421c2 commit d20593b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pymysqlpool/pool.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def __init__(self,
7878
multiple=4,
7979
counter=0,
8080
accumulation=0,
81-
ping_check: (int, bool) = False):
81+
ping_check: (int, bool) = False,
82+
**configs):
8283
self.host = host
8384
self.port = port
8485
self.user = user
@@ -106,6 +107,7 @@ def __init__(self,
106107
self.ping_check = ping_check
107108

108109
self.unix_socket=unix_socket
110+
self.configs=configs
109111

110112
def create_conn(self):
111113
"""Create mysql connection by pymysql and to add unuse_list"""
@@ -118,7 +120,8 @@ def create_conn(self):
118120
charset=self.charset,
119121
cursorclass=self.cursorclass,
120122
autocommit=self.autocommit,
121-
unix_socket=self.unix_socket
123+
unix_socket=self.unix_socket,
124+
**self.configs
122125
)
123126
self.unuse_list.add(c)
124127

0 commit comments

Comments
 (0)