select method

Query<T> select(
  1. String fields
)

Please pass in comma seperated field names

e.g.: "oid,name,code,createdAt"

Implementation

Query<T> select(String fields) {
  if (_selectAll) {
    throw Exception("[OData Helper] Defining fields to select when 'selectAll' is enabled is useless");
  }

  if (!RegExp(r"^[a-zA-z_0-9,]*$").hasMatch(fields)) {
    throw Exception("[OData Helper] select fields can only have letters, numbers and underscore");
  }

  return selectList(fields.split(","));
}