Skip to content

DB Backend: make `database.NewDB` take a `*sql.DB`

Administrator requested to merge cc/typed-new-db into main

Created by: camdencheek

This updates database.NewDB to take a *sql.DB directly. Not all callsites can be trivially converted, so I renamed the original form of the function to database.NewUntypedDB() and will work on cleaning up the rest of those call sites in followup PRs, but I wanted to make this PR all trivial changes (it's large, but very mechanical).

The goal continues to be to reduce our dependency on dbutil.DB until I can get rid of it entirely. This is a big step because it makes it clear exactly how many places I need to touch up.

Test plan

Every change was done with the help of gopls, so there should be no breakages here. Depending on unit tests though.

Merge request reports

Loading