Closed ChrisMoth closed 3 years ago
Any pdbmap client class can now: with PDBMapSQLdb() as db: db.this_or_that()
and know that the connection is closed on exit from the block.
Alternately, you bracket the above with: PDBMapSQLdb.open_global_connection() .... PDBMapSQLdb.close_global_connection()
and the connection will stay open across many with.. as type calls.
Any pdbmap client class can now: with PDBMapSQLdb() as db: db.this_or_that()
and know that the connection is closed on exit from the block.
Alternately, you bracket the above with: PDBMapSQLdb.open_global_connection() .... PDBMapSQLdb.close_global_connection()
and the connection will stay open across many with.. as type calls.