Home | History | Annotate | Download | only in afe

Lines Matching refs:Query

11 from django.db.models.sql import query
30 """Query manager for unleased, unlocked hosts.
42 class CustomQuery(query.Query):
75 Convert the query set's "query" attribute to a CustomQuery.
77 # Make a copy of the query set
79 query_set.query = query_set.query.clone(
139 join_type = query_set.query.LOUTER
141 join_type = query_set.query.INNER
144 query_set.query.add_custom_join(join_table,
159 @param join_to_query: the query over the related model that we're
168 rhs_where = join_to_query.query.where
170 compiler = join_to_query.query.get_compiler(using=join_to_query.db)
173 if hasattr(join_to_query.query, 'extra_where'):
174 all_clauses += join_to_query.query.extra_where
187 @param join_to_query: the query over the related model that we're
228 """Join to a related model to create a custom field in the given query.
230 This method is used to construct a custom field on the given query based
231 on a many-valued relationsip. join_to_query should be a simple query
264 """Get a non-null column on the table joined for the given query.
278 query_set.query.where.add(self._WhereClause(where, values),
299 """Execute a custom select query.
301 @param query_set: query set as returned by query_objects.
304 @returns: Result of the query as returned by cursor.fetchall().
306 compiler = query_set.query.get_compiler(using=query_set.db)
310 if query_set.query.distinct:
396 # from the related models incurs a DB query each time).
415 query = """
430 cursor.execute(query)
482 class ModelWithInvalidQuerySet(dbmodels.query.QuerySet):
726 def apply_presentation(cls, query, filter_data):
729 query.
730 @returns new query with presentation applied
736 query = query.extra(order_by=sort_by)
745 return query[query_start:query_limit]
759 -extra_args: keyword args to pass to query.extra() (see Django
773 query = initial_query.filter(**regular_filters)
777 query = query.distinct()
786 query = query.extra(**extra_args)
792 query = cls.apply_presentation(query, filter_data)
794 return query
804 query = cls.query_objects(filter_data, initial_query=initial_query)
805 return query.count()
812 query.values()) and clean the data to be more suitable for
827 query
828 extra_fields = query.query.extra_select.keys()
830 for model_object in query]
1087 @param data: A dictionary containing the information to use in a query
1227 # RelatedMangager would query for the 1-to-many relationship. E.g.