@@ -203,7 +203,7 @@ async def init_app(self, app, *, loop=None, dsn='', driver='asyncpg',
203203 host = 'localhost' , port = 5432 ,
204204 user = 'postgres' , password = '' , database = 'postgres' ,
205205 echo = False , pool_min_size = 5 , pool_max_size = 10 ,
206- ssl = None ):
206+ ssl = None , ** kwargs ):
207207 """
208208 Initialize database
209209
@@ -225,6 +225,8 @@ async def init_app(self, app, *, loop=None, dsn='', driver='asyncpg',
225225 pool, default is ``10``.
226226 :param ssl: SSL context passed to ``asyncpg.connect``, default is
227227 ``None``. This can be ``True`` or an instance of ``ssl.SSLContext``.
228+ :param kwargs: other parameters passed to the specified dialects,
229+ like ``asyncpg``. Unrecognized parameters will cause exceptions.
228230 """
229231 if loop is None :
230232 loop = tornado .ioloop .IOLoop .current ()
@@ -243,7 +245,7 @@ async def init_app(self, app, *, loop=None, dsn='', driver='asyncpg',
243245
244246 await self .set_bind (
245247 dsn , echo = echo , min_size = pool_min_size , max_size = pool_max_size ,
246- ssl = ssl , loop = asyncio_loop ,
248+ ssl = ssl , loop = asyncio_loop , ** kwargs ,
247249 )
248250
249251 app .db = self
0 commit comments