wip: move field selection from api to db layer