Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed ReST formatting bug in db-api.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e243d8287442a65d8c620f5c4f3033aa7d6bbd82 1 parent b68f26e
Adrian Holovaty authored July 19, 2005

Showing 1 changed file with 37 additions and 37 deletions. Show diff stats Hide diff stats

  1. 74  docs/db-api.txt
74  docs/db-api.txt
@@ -49,43 +49,43 @@ translates (roughly) into the following SQL:
49 49
 
50 50
 The DB API supports the following lookup types:
51 51
 
52  
-    ==========  ==============================================================
53  
-    Type        Description
54  
-    ==========  ==============================================================
55  
-    exact       Exact match: ``polls.get_object(id__exact=14)``.
56  
-    iexact      Case-insensitive exact match:
57  
-                ``polls.get_list(slug__iexact="foo")`` matches a slug of ``foo``,
58  
-                ``FOO``, ``fOo``, etc.
59  
-    contains    Case-sensitive containment test:
60  
-                ``polls.get_list(question__contains="spam")`` returns all polls
61  
-                that contain "spam" in the question. (PostgreSQL only. MySQL
62  
-                doesn't support case-sensitive LIKE statements; ``contains``
63  
-                will act like ``icontains`` for MySQL.)
64  
-    icontains   Case-insensitive containment test.
65  
-    gt          Greater than: ``polls.get_list(id__gt=4)``.
66  
-    gte         Greater than or equal to.
67  
-    lt          Less than.
68  
-    lte         Less than or equal to.
69  
-    startswith  Case-sensitive starts-with:
70  
-                ``polls.get_list(question_startswith="Would")``. (PostgreSQL
71  
-                only. MySQL doesn't support case-sensitive LIKE statements;
72  
-                ``startswith`` will act like ``istartswith`` for MySQL.)
73  
-    endswith    Case-sensitive ends-with. (PostgreSQL only. MySQL doesn't
74  
-                support case-sensitive LIKE statements; ``endswith`` will act
75  
-                like ``iendswith`` for MySQL.)
76  
-    istartswith Case-insensitive starts-with.
77  
-    iendswith   Case-insensitive ends-with.
78  
-    range       Range test:
79  
-                ``polls.get_list(pub_date__range=(start_date, end_date))``
80  
-                returns all polls with a pub_date between ``start_date``
81  
-                and ``end_date`` (inclusive).
82  
-    year        For date/datetime fields, exact year match:
83  
-                ``polls.get_count(pub_date__year=2005)``.
84  
-    month       For date/datetime fields, exact month match.
85  
-    day         For date/datetime fields, exact day match.
86  
-    isnull      True/False; does is IF NULL/IF NOT NULL lookup:
87  
-                ``polls.get_list(expire_date__isnull=True)``.
88  
-    ==========  ==============================================================
  52
+    ===========  ==============================================================
  53
+    Type         Description
  54
+    ===========  ==============================================================
  55
+    exact        Exact match: ``polls.get_object(id__exact=14)``.
  56
+    iexact       Case-insensitive exact match:
  57
+                 ``polls.get_list(slug__iexact="foo")`` matches a slug of
  58
+                 ``foo``, ``FOO``, ``fOo``, etc.
  59
+    contains     Case-sensitive containment test:
  60
+                 ``polls.get_list(question__contains="spam")`` returns all polls
  61
+                 that contain "spam" in the question. (PostgreSQL only. MySQL
  62
+                 doesn't support case-sensitive LIKE statements; ``contains``
  63
+                 will act like ``icontains`` for MySQL.)
  64
+    icontains    Case-insensitive containment test.
  65
+    gt           Greater than: ``polls.get_list(id__gt=4)``.
  66
+    gte          Greater than or equal to.
  67
+    lt           Less than.
  68
+    lte          Less than or equal to.
  69
+    startswith   Case-sensitive starts-with:
  70
+                 ``polls.get_list(question_startswith="Would")``. (PostgreSQL
  71
+                 only. MySQL doesn't support case-sensitive LIKE statements;
  72
+                 ``startswith`` will act like ``istartswith`` for MySQL.)
  73
+    endswith     Case-sensitive ends-with. (PostgreSQL only. MySQL doesn't
  74
+                 support case-sensitive LIKE statements; ``endswith`` will act
  75
+                 like ``iendswith`` for MySQL.)
  76
+    istartswith  Case-insensitive starts-with.
  77
+    iendswith    Case-insensitive ends-with.
  78
+    range        Range test:
  79
+                 ``polls.get_list(pub_date__range=(start_date, end_date))``
  80
+                 returns all polls with a pub_date between ``start_date``
  81
+                 and ``end_date`` (inclusive).
  82
+    year         For date/datetime fields, exact year match:
  83
+                 ``polls.get_count(pub_date__year=2005)``.
  84
+    month        For date/datetime fields, exact month match.
  85
+    day          For date/datetime fields, exact day match.
  86
+    isnull       True/False; does is IF NULL/IF NOT NULL lookup:
  87
+                 ``polls.get_list(expire_date__isnull=True)``.
  88
+    ===========  ==============================================================
89 89
 
90 90
 Multiple lookups are allowed, of course, and are translated as "AND"s::
91 91
 

0 notes on commit e243d82

Please sign in to comment.
Something went wrong with that request. Please try again.