Changeset 8955
- Timestamp:
- 09/03/08 16:47:57 (10 months ago)
- Files:
-
- django/trunk/docs/ref/models/querysets.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/ref/models/querysets.txt
r8947 r8955 940 940 and then converted into a query using the ``query`` attribute:: 941 941 942 Entry.objects.filter(blog__in=Blog.objects.filter(name__contains='Cheddar').values('pk').query) 942 q = Blog.objects.filter(name__contains='Cheddar').values('pk').query 943 e = Entry.objects.filter(blog__in=q) 944 945 .. warning:: 946 947 This ``query`` attribute should be considered an opaque internal attribute. 948 It's fine to use it like above, but its API may change between Django 949 versions. 943 950 944 951 This queryset will be evaluated as subselect statement:: … … 973 980 974 981 Less than or equal to. 975 976 in977 ~~978 979 In a given list.980 981 Example::982 983 Entry.objects.filter(id__in=[1, 3, 4])984 985 SQL equivalent::986 987 SELECT ... WHERE id IN (1, 3, 4);988 982 989 983 startswith
