Simplifies code working with the sqlite wrapper. Should not require a bigger stack nor trigger excessive copying. #8777