diff options
author | Frederick Muriuki Muriithi | 2022-03-26 14:07:18 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-03-26 14:47:56 +0300 |
commit | a0b150cf2eaed00ca56634da404e621eb6e73484 (patch) | |
tree | 0cbd3340e913c398fea20882bebe87cccaa7382c /gn3/api/gemma.py | |
parent | 5906098d32e7aa1ab155d5dd49cd3b04b06684eb (diff) | |
download | genenetwork3-a0b150cf2eaed00ca56634da404e621eb6e73484.tar.gz |
Make creation of database connections more flexible
* Pass the URI string to parse into `gn3.db_utils.parse_db_url` rather than
relying on a global variable.
* Pass the URI string to use to generate the database connection to the
`gn3.db_utils.database_connector` function rather than depending on a global
variable. Use the global `SQL_URI` variable as a default value if one is not
provided when calling the function.
The changes above make the creation of the database connection more flexible,
since the database URI passed into the function can be changed at the site
where the call is made.
The port is also parsed, and used where present, to allow for either a socket
connection or one based on a port.
Diffstat (limited to 'gn3/api/gemma.py')
0 files changed, 0 insertions, 0 deletions