remove databases, use SQLAlechemy 2.0 instead
Among the many changes we switch to using SQLAlchemy's connection pool, which means we are no longer required to guard against multiple threads working on the database. All db funcs now receive a connection to use as their first argument, this allows the caller to control transaction & rollback behavior.
This commit is contained in:
parent
c63bee072f
commit
4981de4a04
12 changed files with 876 additions and 765 deletions
|
|
@ -6,7 +6,7 @@ dbfile="${UNWIND_DATA:-./data}/tests.sqlite"
|
|||
|
||||
# Rollback in Databases is currently broken, so we have to rebuild the database
|
||||
# each time; see https://github.com/encode/databases/issues/403
|
||||
trap 'rm "$dbfile"' EXIT TERM INT QUIT
|
||||
trap 'rm "$dbfile" "${dbfile}-shm" "${dbfile}-wal"' EXIT TERM INT QUIT
|
||||
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue