Revert "port prepSqlWithExt back to DbRecord"

This reverts commit 8547de6a2d5a415698a058bc871e7a9dee978ae9.