I went ahead and worked up a short blog post about this: http://xylil.com/2020/07/01/freeswitch-dbh-fetch-convenience-functions-for-lua/