implement transcoding query builder to array