diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-11-26 22:42:27 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-11-27 19:47:19 +0200 |
| commit | 1893467784deb6cd8a493997e8bac933cc2e4af9 (patch) | |
| tree | cd70e59bfa04c4c4f8b2d1bf9a7e353b2cb7bab6 /tests/regressiontests/initial_sql_regress/sql | |
| parent | 2ea80b94d7f6e0d25207d6b716c52ca4c57a02fb (diff) | |
Fixed #19274 -- Made db connection creation overridable in subclasses
Connection creation was done in db backend ._cursor() call. This
included taking a new connection if needed, initializing the session
state for the new connection and finally creating the connection.
To allow easier modifying of these steps in subclasses (for example to
support connection pools) the _cursor() now calls get_new_connection()
and init_connection_state() if there isn't an existing connection. This
was done for all non-gis core backends. In addition the parameters used
for taking a connection are now created by get_connection_params().
We should also do the same for gis backends and encourage 3rd party
backends to use the same pattern. The pattern is not enforced in code,
and as the backends are private API this will not be required by
documentation either.
Diffstat (limited to 'tests/regressiontests/initial_sql_regress/sql')
0 files changed, 0 insertions, 0 deletions
