add support for returning `dynamic` from SQL