_maybe_assert_sql_location_exists

PlasmaCalcs.tools.sql_tools._maybe_assert_sql_location_exists(location, *, assert_exists=None)

depending on assert_exists, may assert location exists or that it does not exist.

location: str

implies sql connection, e.g. “:memory:”, filepath, or online database connection string.
if filepath, should be input as abspath.
assert_exists: None, True, or False
True –> assert that implied location already exists as a file.
False –> assert that implied location does not yet exist as a file.
None –> no assertion is made.
(Here, ‘:memory:’ never “already exists”, since it always means a new database.)