db.hh: use hasPrefix for prefix comparisons

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>

Created by  Graham Christensen  on February 24, 2021
2W6IGLX4PPTPQLPTM6UX2R3CGDGUQUPNZTRY32J7AOBTUM3LE5TAC
Change contents