• Home
  • Raw
  • Download

Lines Matching +full:where +full:- +full:object

11 import django.db.models.sql.where
19 Data validation error in adding or updating an object. The associated
84 class _WhereClause(object):
85 """Object allowing us to inject arbitrary SQL into Django queries.
87 By using this instead of extra(where=...), we can still freely combine
122 LEFT OUTER JOIN and an appropriate WHERE condition)
123 @param force_left_join - if true, a LEFT OUTER JOIN will be used
150 query_set = query_set.extra(where=[full_join_key + ' IS NULL'])
167 rhs_where = join_to_query.query.where
172 # query returns at most one record. For it to be used in WHERE clause,
188 this model table <---> M2M pivot table <---> joined model table
217 assert len(rhs_ids) == 1, ('Many-to-many custom field joins can only '
218 'match a single related object.')
233 on a many-valued relationsip. join_to_query should be a simple query
237 For many-to-one relationships, the joined table contains the matching
240 For many-to-many relationships, the joined table contains the matching
265 def add_where(self, query_set, where, values=()): argument
267 query_set.query.where.add(self._WhereClause(where, values),
268 django.db.models.sql.where.AND)
305 # Chose the connection that's responsible for this type of object
315 MANY_TO_ONE = object()
316 M2M_ON_RELATED_MODEL = object()
317 M2M_ON_THIS_MODEL = object()
323 related_model must have some sort of many-valued relationship to this
325 @returns (relationship_type, field), where relationship_type is one of
327 is the Django field object for the relationship.
339 # maybe this model has the many-to-many field
355 related_object) for each relationship between a base object and a
356 related object. all base_object instances come from base_objects_by_id.
357 Note -- this depends on Django model internals.
377 @returns a pivot iterator - see _get_pivot_iterator()
382 # lookup base object in the dict, rather than grabbing it from the
383 # related object. we need to return instances from the dict, not
407 WHERE %(from_field)s IN (%(id_list)s)
414 # Chose the connection that's responsible for this type of object
417 # self is only a ExtendedManager, not the object.
429 @returns a pivot iterator - see _get_pivot_iterator()
448 related_model must be in a many-to-one or many-to-many relationship with
450 @param base_objects - list of instances of this model
451 @param related_model - model class related to this model
452 @param related_list_name - attribute name in which to store the related
453 object list.
537 On deserializion, if the object to persist already exists, local fields
545 Performs conversions on user-supplied field data, to make it
546 easier for users to pass human-readable data.
549 from human-readable strings to enum values, if necessary. This
555 the name of the object as a string.
557 If to_human_readable=True, perform the inverse - i.e. convert
560 This method modifies data in-place.
629 field_name -> error_list.
667 Returns a new object created with the given data (a dictionary
685 Updates the object with the given data (a dictionary mapping
707 @returns a tuple of dicts (special_params, regular_filters), where
722 Apply presentation parameters -- sorting and paging -- to the given
746 Returns a QuerySet object for querying the given model_class
749 -query_start: index of first return to return
750 -query_limit: maximum number of results to return
751 -sort_by: list of fields to sort on. prefixing a '-' onto a
753 -extra_args: keyword args to pass to query.extra() (see Django
755 -extra_where: extra WHERE clause to append
756 -no_distinct: if True, a DISTINCT will not be added to the SELECT
778 extra_args.setdefault('where', []).append(extra_where)
805 Take a list of dicts corresponding to object (as returned by
831 smart_get(integer) -> get object by ID
832 smart_get(string) -> get object by name_field
866 Return a dictionary mapping fields to this object's values. @param
868 the fields defined on this object.
924 """Serializes the object with dependencies.
927 this function will serialize with the object.
930 objects this object depends on.
936 @returns: Dictionary representation of the object.
960 @returns For To-Many relationships a list of the serialized related
961 objects, for To-One relationships the serialized related object.
966 # One-To-One relationships that point to None may raise this
978 """This splits local from foreign values in a serialized object.
980 @param data: The serialized object.
1051 # - the overwritten methods depend on ACL groups that don't yet exist
1053 # - the overwritten methods think this object already exists in the db
1081 @return: An object with matching data.
1090 """Recursively deserializes and saves an object with it's dependencies.
1095 If an object of the same type with the same id already exists, it's
1101 I.e. this is necessary to add users to an already existing acl-group.
1103 @param data: Representation of an object and its dependencies, as
1106 @returns: The object represented by data if it didn't exist before,
1107 otherwise the object that existed before and has the same type
1140 """Updates local fields of an existing object from a serialized form.
1150 @param serialized: Representation of an object and its dependencies, as
1173 """Deserializes related objects and sets references on this object.
1176 For many-to-one or one-to-one relations custom_deserialize_relation
1184 @param data: Serialized representation of the related object(s).
1185 This means a list of dictionaries for to-many relations,
1186 just a dictionary for to-one relations.
1197 """Deserialize related objects for one to-many relationship.
1203 this class has a one-to-many relationship.
1213 # RelatedMangager would query for the 1-to-many relationship. E.g.
1216 # We use it to delete objects related to the current object.
1226 Subclass with attribute-like model should override this to
1229 to clear the one-to-many relations first on deserialization of object.
1244 # see if this object was previously added and invalidated
1251 # no existing object
1260 "undeleting" a previously deleted object. Can be overridden by
1269 This method is called when an object is marked invalid.
1271 should no longer exist if the object were deleted.
1289 class Manipulator(object):
1291 Force default manipulators to look only at valid objects -
1301 class ModelWithAttributes(object):
1310 keyword_args), where attribute_model is a model class and keyword_args
1312 instance of the given attribute on this object.
1329 'is static. Use go/chromeos-skylab-inventory-tools to '
1343 'is static. Use go/chromeos-skylab-inventory-tools to '