code: function view(query) {
      var queryDefinition;
      if (query instanceof Function) {
          queryDefinition = query();
      }
      else {
          queryDefinition = query;
      }
      var view = new Entity_1.QView([], queryDefinition);
      var customEntity = queryDefinition.select;
      view = convertMappedEntitySelect(customEntity, queryDefinition, view, view, 'f');
      return view;
  }
docs: Created by Papa on 10/25/2016.