Set the fields returned the query.

        :type projection: str or sequence of strings
        :param projection: Each value is a string giving the name of a
                           property to be included in the projection query.
969170
def projection(self, projection):
        
        if isinstance(projection, str):
            projection = [projection]
        self._projection[:] = projection
102367
def set_projection(self, val):
        
        knownproj = ["SIN", "ZEA", "TAN", "NCP", "AIT", "ZEA"]  # etc
        assert val.upper() in knownproj
        self._coord["projection"] = val.upper()
766878
public JsonTypeDefinition projectionType(String... properties) {
        if(this.getType() instanceof Map<?, ?>) {
            Map<?, ?> type = (Map<?, ?>) getType();
            Arrays.sort(properties);
            Map<String, Object> newType = new LinkedHashMap<String, Object>();
            for(String prop: properties)
                newType.put(prop, type.get(prop));
            return new JsonTypeDefinition(newType);
        } else {
            throw new IllegalArgumentException("Cannot take the projection of a type that is not a Map.");
        }
    }
227575
def _set_fields(self, positional, options):
        
        dictionary = {}

        if positional is not None and options is not None:
            self.positional = positional.copy()
            self.options = options.copy()
            dictionary = positional.copy()
            dictionary.update(options.copy())
            self.m_reprdict = {"positional": positional.copy(),
                               "options": options.copy()}

        for k, v in dictionary.items():
            if hasattr(v, "strip"):
                v = v.strip("'")
                v = v.strip('"')

            setattr(self, str(k), v)
1092132
def set_fields(self, fields=None, *fields_args, **fields_kwargs):
        
        if fields_args:
            fields = [fields]
            fields.extend(fields_args)
            for field_name in fields:
                self.set_field(field_name)

        elif fields_kwargs:
            fields = make_dict(fields, fields_kwargs)
            for field_name, field_val in fields.items():
                self.set_field(field_name, field_val)

        else:
            if isinstance(fields, Mapping):
                for field_name, field_val in fields.items():
                    self.set_field(field_name, field_val)

            else:
                for field_name in fields:
                    self.set_field(field_name)

        return self
745216
def setValue(self, value):
        
        self.__value = projex.text.decoded(value) if isinstance(value, (str, unicode)) else value
289401
def setProperty(self, name, value):
        
        if type(value) in (unicode, str):
            try:
                value = self._parsers[name](value)
            except StandardError:
                pass
        
        self._properties[name] = value
38896
def project(self, axis):
        
        projection = self.get_projection(axis)
        self.assign(projection)
509796
def set_value(self, field_name, value):
        
        if field_name in self.fields:
            if not value is None:
                self._dict['attributes'][field_name] = _unicode_convert(value)
            else:
                pass
        elif field_name.upper() in ['SHAPE', 'SHAPE@', "GEOMETRY"]:
            if isinstance(value, dict):
                if 'geometry' in value:
                    self._dict['geometry'] = value['geometry']
                elif any(k in value.keys() for k in ['x','y','points','paths','rings', 'spatialReference']):
                    self._dict['geometry'] = value
            elif isinstance(value, AbstractGeometry):
                self._dict['geometry'] = value.asDictionary
            elif arcpyFound:
                if isinstance(value, arcpy.Geometry) and \
                   value.type == self.geometryType:
                    self._dict['geometry']=json.loads(value.JSON)
            self._geom = None
            self._geom = self.geometry
        else:
            return False
        self._json = json.dumps(self._dict, default=_date_handler)
        return True
304496
def P(Document, *fields, **kw):
	""""""
	
	__always__ = kw.pop('__always__', set())
	projected = set()
	omitted = set()
	
	for field in fields:
		if field[0] in ('-', '!'):
			omitted.add(field[1:])
		elif field[0] == '+':
			projected.add(field[1:])
		else:
			projected.add(field)
	
	if not projected:  # We only have exclusions from the default projection.
		names = set(getattr(Document, '__projection__', Document.__fields__) or Document.__fields__)
		projected = {name for name in (names - omitted)}
	
	projected |= __always__
	
	if not projected:
		projected = {'_id'}
	
	return {unicode(traverse(Document, name, name)): True for name in projected}
325965
def set_fields(self, **fields):
        
        for field_name, value in iteritems(fields):
            field = getattr(self, field_name)
            field.proxy_set(value)
933059
public org.grails.datastore.mapping.query.api.ProjectionList groupProperty(String propertyName, String alias) {
        final PropertyProjection proj = Projections.groupProperty(calculatePropertyName(propertyName));
        addProjectionToList(proj, alias);
        return this;
    }
97384
public org.grails.datastore.mapping.query.api.ProjectionList property(String propertyName, String alias) {
        final PropertyProjection propertyProjection = Projections.property(calculatePropertyName(propertyName));
        addProjectionToList(propertyProjection, alias);
        return this;
    }
513754
public static Projection array(String pattern,
                                   Query match,
                                   boolean include,
                                   Projection projection,
                                   Sort sort) {
        Projection p = new Projection(false);
        p.add("field", pattern).add("include", include).add("match", match.toJson());
        if (projection != null) {
            p.add("projection", projection.toJson());
        }
        if (sort != null) {
            p.add("sort", sort.toJson());
        }
        return p;
    }
62894
def setQuery(self, query):
        
        if query is None:
            return
        
        count = {}
        
        for widget in self.findChildren(QWidget):
            column = nativestring(widget.objectName())
            count.setdefault(column, 0)
            count[column] += 1
            
            success, value, _ = query.findValue(column, count[column])
            if success:
                projexui.setWidgetValue(widget, value)
1037129
def iter_column(self, query=None, field="_id", **kwargs):
        
        find_kwargs = {
            "projection": {"_id": False}
        }
        find_kwargs["projection"][field] = True

        cursor = self._collection_with_options(kwargs).find(query, **find_kwargs)  # We only want 1 field: bypass the ORM

        patch_cursor(cursor, **kwargs)

        return (dotdict(x)[field] for x in cursor)
1132066
def build_projection_kwargs(cls, source, mapping):
        """"""
        return cls._map_arg_names(source, cls._default_attr_mapping + mapping)