denisenkom / django-sqlserver

Django backend for MSSQL server using pytds or adodb backend (moved here from https://bitbucket.org/cramm/django-sqlserver)
MIT License
37 stars 15 forks source link

Add support for more detailed connection parameters #22

Open quapka opened 6 years ago

quapka commented 6 years ago

On the front page you mention:

You can also specify additional OPTIONS attribute as described in http://django-mssql.readthedocs.io/en/latest/settings.html#options

The link talks about extra_params. But I don't see it being passed to pytds.connect(). The part of the code responsible for creating the connection dict either hardcodes some values or checks _SUPPORTED_OPTIONS, which contains only failover_partner (that is already retrieved from the options few lines prior to checking _SUPPORTED_OPTIONS).

In my case I'm missing the ability to set timeout and login_timeout (which should as easy as just passing them to connect - e.g. through updating _SUPPORTED_OPTIONS). I don't know about an easy way of adding extra_params support, since I don't see that one being accepted by the connect function.

quapka commented 6 years ago

After the merge of #23 all of the kwargs from pytds.connect() should be supported.

extra_params is not one of those, so it's still not supported.