1
0
mirror of https://github.com/django/django.git synced 2024-12-27 19:46:22 +00:00
Commit Graph

417 Commits

Author SHA1 Message Date
Adam Alton
6e9c5ee88f
Removed unnecessary sentence in QuerySet docs. 2020-08-07 08:05:47 +02:00
Alexandr Tatarinov
f4ac167119 Fixed #27719 -- Added QuerySet.alias() to allow creating reusable aliases.
QuerySet.alias() allows creating reusable aliases for expressions that
don't need to be selected but are used for filtering, ordering, or as
a part of complex expressions.

Thanks Simon Charette for reviews.
2020-07-31 13:19:33 +02:00
Ramiro Morales
51e536178c Fixed typo in docs/ref/models/querysets.txt. 2020-07-22 22:53:20 +02:00
Adam Johnson
bc4fea92b2 Doc'd Model.MultipleObjectsReturned docs and improved documentation related with models exceptions. 2020-07-22 14:21:08 +01:00
Simon Charette
ca6c5e5fc2 Fixed #31770 -- Allowed select_for_update(of) on MySQL 8.0.1+. 2020-07-13 10:15:43 +02:00
matt ferrante
7d6916e827 Fixed #29789 -- Added support for nested relations to FilteredRelation. 2020-07-09 20:24:00 +02:00
davidchorpash
779e615e36 Fixed #31573 -- Made QuerySet.update() respect ordering on MariaDB/MySQL. 2020-07-08 11:43:50 +02:00
Tobias Krönke
69e0d9c553 Fixed #31689 -- Doc'd caveat about using bulk_create()'s ignore_conflicts on MariDB and MySQL. 2020-06-15 12:10:15 +02:00
David Smith
dbdc192ca3 Preferred usage of among/while to amongst/whilst. 2020-06-03 21:02:48 +02:00
Manuel Weitzman
a4e6030904 Fixed #30375 -- Added FOR NO KEY UPDATE support to QuerySet.select_for_update() on PostgreSQL. 2020-05-21 10:51:10 +02:00
Mariusz Felisiak
4c5236ef93 Removed versionadded/changed annotations for 3.0. 2020-05-13 09:07:51 +02:00
Adam Johnson
83c631ade7
Improved wording in Q() docs. 2020-05-06 06:43:28 +02:00
Adam Johnson
d17b380653 Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments. 2020-05-04 12:10:47 +02:00
Adam Johnson
93ed71e058 Fixed #31403 -- Added support for returning fields from INSERT statements on MariaDB 10.5+. 2020-03-31 07:25:50 +02:00
Hasan Ramezani
53b6a466d8 Refs #29724 -- Added is_dst parameter to QuerySet.datetimes().
Thanks Simon Charette for the review and Mariusz Felisiak for tests.
2020-03-20 12:55:33 +01:00
Mariusz Felisiak
30ca66eadd
Added missing backticks in various docs. 2020-03-06 11:52:49 +01:00
Adam Johnson
382af9b141 Fixed #31003 -- Doc'd and tested return value of QuerySet.bulk_create(). 2020-02-10 08:36:50 +01:00
Mariusz Felisiak
0107e3d105
Fixed #30953 -- Made select_for_update() lock queryset's model when using "self" with multi-table inheritance.
Thanks Abhijeet Viswa for the report and initial patch.
2019-12-02 07:57:19 +01:00
kola-er
d94d7b113c Fixed #30928 -- Clarified MySQL/MariaDB support of QuerySet.select_for_update() options.
Thanks Par Andersson for reporting the issue.
2019-11-05 14:34:40 +01:00
Carlton Gibson
cabf1fe37e Refs #30897 -- Made cosmetic edits to QuerySet.explain() documentation. 2019-10-24 15:16:25 +02:00
Nick Pope
55df1750be Refs #30897 -- Added support for ANALYZE option to Queryset.explain() on MariaDB and MySQL 8.0.18+. 2019-10-24 15:13:26 +02:00
Nick Pope
742961332e Refs #30897 -- Added support for TREE format to Queryset.explain() on MySQL 8.0.16+. 2019-10-24 15:13:23 +02:00
Antonio Dudarev
6c23b43655 Refs #13724 -- Corrected QuerySet signature in docs. 2019-10-22 14:23:21 +02:00
André Ericson
31174031f1 Fixed #30841 -- Deprecated using non-boolean values for isnull lookup. 2019-10-21 08:44:20 +02:00
Anatol Ulrich
8ed6788aa4 Fixed #30821 -- Added ExtractIsoWeekYear database function and iso_week_day lookup. 2019-10-02 10:41:34 +02:00
Mariusz Felisiak
416c584cab Removed versionadded/changed annotations for 2.2. 2019-09-10 12:01:00 +02:00
Tobias Kunze
4a954cfd11 Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question.
Rather, I went through all of the occurrences of the words listed
below, and judged if they a) suggested the reader had some kind of
knowledge/experience, and b) if they added anything of value (including
tone of voice, etc). I left most of the words alone. I looked at the
following words:

- simply/simple
- easy/easier/easiest
- obvious
- just
- merely
- straightforward
- ridiculous

Thanks to Carlton Gibson for guidance on how to approach this issue, and
to Tim Bell for providing the idea. But the enormous lion's share of
thanks go to Adam Johnson for his patient and helpful review.
2019-09-06 13:27:46 +02:00
Andrew
29adcd215f Fixed #30733 -- Doc'd that datetime lookups require time zone definitions in the database.
Note was missing for date, year, iso_year, week, time, hour, minute,
and second lookups.
2019-08-28 08:42:55 +02:00
Étienne Beaulé
5f24e7158e Fixed #30665 -- Added support for distinct argument to Avg() and Sum(). 2019-07-31 11:22:50 +02:00
Alex
1686dce06c Fixed #30199 -- Adjusted QuerySet.get_or_create() docs to highlight atomicity warning. 2019-05-17 12:23:10 +02:00
Daniel Musketa
6fd9c9daa6 Fixed #30365 -- Fixed syntax highlighting in SQL examples.
Sphinx interprets some "%[a-z]" in SQL statements as a
"Literal.String.Interpol" which leads to incorrect highlighting.
2019-04-23 12:37:50 +02:00
Ville Skyttä
03db5fddfd Fixed typos in docs, comments, and exception messages. 2019-04-18 09:33:53 +02:00
Nick Pope
198a2a9381 Removed unnecessary /static from links to PostgreSQL docs. 2019-03-29 21:49:44 -04:00
Paul Wayper
1025e76429 Fixed #30253 -- Doc'd how to order nulls in QuerySet.order_by(). 2019-03-18 10:32:38 -04:00
Mariusz Felisiak
759a9b710c
Updated Oracle docs links to Oracle 18c. 2019-02-07 09:59:47 +01:00
Nick Pope
24b82cd201 Fixed #30159 -- Removed unneeded use of OrderedDict.
Dicts preserve order since Python 3.6.
2019-02-06 13:48:39 -05:00
Tim Graham
39ebdf5a3c Fixed #30155 -- Dropped support for PostgreSQL 9.4 and PostGIS 2.1. 2019-02-04 18:07:02 -05:00
Sergey Fedoseev
ba7a420012 Corrected output of Prefetch.to_attr example. 2019-01-31 09:09:08 -05:00
Day Barr
51fa59f0b3 Fixed typo in QuerySet.bulk_update documentation (#10859)
Looks like an accidental carry over from the pre-existing
QuerySet.bulk_create documentation.
2019-01-17 12:31:48 -05:00
Tim Graham
ec7e179aeb Removed versionadded/changed annotations for 2.1. 2019-01-17 10:50:25 -05:00
Nick Pope
6d4efa8e6a Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:39:46 -05:00
Nick Pope
e85afa5943 Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:38:00 -05:00
Nick Pope
c690afb873 Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:35:41 -05:00
Hasan Ramezani
52d06d3041 Fixed #29968 -- Doc'd that QuerySet.bulk_update() doesn't check for duplicates. 2019-01-09 17:54:46 -05:00
Nick Pope
83677faf86 Fixed #30056 -- Added SQLite support for StdDev and Variance functions. 2018-12-24 11:14:58 -05:00
Nick Pope
e626a3f993 Renamed Sqlite and Sqlite3 references to SQLite. 2018-12-22 18:52:54 -05:00
Tim Graham
926fa7116f Fixed #29317 -- Doc'd filter argument in contrib.postgres aggregates. 2018-11-27 11:20:23 -05:00
Simon Charette
9a7d336c38 Corrected Aggregate docs to reflect that it accepts multiple expressions. 2018-11-27 09:22:24 -05:00
ovalseven8
d093e01ec0 Clarified when QuerySet.select_for_update() locks. 2018-10-03 15:29:33 -04:00
Tom Forbes
9cbdb44014 Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models. 2018-09-18 16:14:44 -04:00
Sigurd Ljødal
3e09b37f80 Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup. 2018-08-18 13:09:15 -04:00
Tom
f1fbef6cd1 Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts. 2018-08-03 17:40:46 -04:00
Adam Johnson
2e3ba9f592 Removed out of place sentence in QuerySet.count() docs. 2018-08-02 17:36:02 -04:00
Andrew Brown
c0e3c65b9d Fixed #29563 -- Added result streaming for QuerySet.iterator() on SQLite. 2018-07-25 18:08:57 -04:00
Colm O'Connor
c530428d36 Fixed #21333 -- Doc'd the & and | queryset operators. 2018-06-29 20:39:18 -04:00
Christian Ledermann
11bfe3a83d Refs #29493 -- Doc'd that the QuerySet in lookup accepts a string. 2018-06-16 15:53:54 -04:00
Tim Graham
7543ab1f8d Removed versionadded/changed annotations for 2.0. 2018-05-17 11:00:10 -04:00
Tom
c1c163b427 Fixed #28574 -- Added QuerySet.explain(). 2018-04-19 10:52:19 -04:00
Daniel Roseman
e6c21217d3 Fixed reference to nonexistent __between lookup. 2018-04-04 09:43:36 -04:00
Quentin Agren
34c5222837 Fixed #29148 -- Doc'd how to use get_or_create() with Q objects. 2018-03-28 10:46:34 -04:00
Alasdair Nicol
0c100f8b57 Clarified docs about ISO 8601 week numbering. 2018-03-21 20:00:39 -04:00
Tim Graham
548f78ba46
Removed redundant lookup name in register_lookup() calls. 2018-02-19 13:12:13 -05:00
Tim Graham
e917ea6bec Fixed #29126 -- Doc'd the behavior of QuerySet.update_or_create() with manually specified pks. 2018-02-15 13:17:37 -05:00
Matthew Wilkes
2162f0983d Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields). 2018-02-10 19:08:55 -05:00
Sergey Fedoseev
01bfa9219b Fixed typo in bulk_create() documentation. 2018-02-08 10:33:45 +01:00
Tim Graham
e6f0e324e2 Fixed #29081 -- Clarified comments in QuerySet.select_related() example. 2018-01-29 11:11:43 -05:00
Sigurd Ljødal
a455e732a0 Fixed #28650 -- Added TruncWeek database function. 2018-01-27 09:59:13 -05:00
Mariusz Felisiak
7fbb1bd00d
Fixed #29032 -- Fixed an example of using expressions in QuerySet.values(). 2018-01-19 08:55:29 +01:00
Botond Béres
52aa26e697 Fixed #28231 -- Doc'd that QuerySet.bulk_create() casts objs to a list. 2018-01-12 19:56:16 -05:00
Mariusz Felisiak
2d3cc94284
Fixed #28781 -- Added QuerySet.values()/values_list() support for union(), difference(), and intersection().
Thanks Tim Graham for the review.
2017-11-12 14:28:11 +01:00
Tim Graham
327f0f37ce
Fixed #28770 -- Warned that quoting a placeholder in a raw SQL string is unsafe.
Thanks Hynek Cernoch for the report and review.
2017-11-07 13:07:12 -05:00
Tim Graham
5587485d49
Fixed #28765 -- Clarified docs about what types the __in lookup accepts. 2017-11-06 13:12:14 -05:00
Ran Benita
03049fb8d9 Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.
Thanks Adam Chidlow for polishing the patch.
2017-10-28 20:33:42 -04:00
Botond Beres
ec5f7cb92e Fixed typo in docs/ref/models/querysets.txt. 2017-10-25 19:03:21 -04:00
Botond Beres
95a14cfc47 Fixed #28395 -- Doc'd that QuerySet.first() can affect aggregation queries. 2017-10-25 18:46:25 -04:00
Jozef
3bd69b1261 Fixed typo in docs/ref/models/querysets.txt. 2017-10-17 10:07:20 -04:00
Stefan Schneider
08c8c3ead9 Fixed #28653 -- Added missing ForeignKey.on_delete argument in docs. 2017-09-29 11:38:28 -04:00
Tim Graham
5446b72003 Removed versionadded/changed annotations for 1.11. 2017-09-22 12:51:18 -04:00
Nicolas Delaby
01d440fa1e Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support.
Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-22 11:53:17 -04:00
Mads Jensen
d549b88050 Fixed #26608 -- Added support for window expressions (OVER clause).
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes,
Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie
Cockburn for initial patch.
2017-09-18 09:42:29 -04:00
Tim Graham
44a6c27fd4 Fixed #28561 -- Removed inaccurate docs about QuerySet.order_by() and joins.
As of ccbba98131, both examples don't use
a join.
2017-09-06 19:21:38 -04:00
Sergey Fedoseev
f3c9562143 Fixed #15648 -- Allowed QuerySet.values_list() to return a namedtuple. 2017-09-06 15:32:32 -04:00
François Freitag
ad4a8acdb5 Fixed #11557 -- Added support for a list of fields in Meta.get_latest_by and QuerySet.earliest()/latest(). 2017-09-05 20:14:54 -04:00
Tom
b78d100fa6 Fixed #27849 -- Added filtering support to aggregates. 2017-08-12 17:58:28 -04:00
Tom Carrick
3159ad4df6 Fixed #27970 -- Allowed QuerySet.in_bulk() to fetch on fields besides primary key. 2017-07-21 08:34:35 -04:00
Florian Apolloner
adab280cef Fixed #28399 -- Fixed QuerySet.count() for union(), difference(), and intersection() queries. 2017-07-15 08:20:12 -04:00
Tim Graham
2457c1866e Refs #28352 -- Corrected another QuerySet.values_list() return type in docs example. 2017-07-11 14:22:46 -04:00
Irindu Indeera
babe9e64a6 Fixed #28352 -- Corrected QuerySet.values_list() return type in docs examples. 2017-07-11 14:15:17 -04:00
Ran Benita
b9f7dce84b Fixed #28010 -- Added FOR UPDATE OF support to QuerySet.select_for_update(). 2017-06-29 16:00:15 -04:00
Tim Graham
0877989c94 Fixed typo in docs/ref/models/querysets.txt. 2017-06-09 12:48:24 -04:00
Mads Jensen
c7f6ffbdcf Fixed #28103 -- Added quarter extract, truncation, and lookup.
Thanks Mariusz Felisiak, Tim Graham, and Adam Johnson for review.
2017-06-08 15:15:29 -04:00
François Freitag
edee5a8de6 Fixed #27639 -- Added chunk_size parameter to QuerySet.iterator(). 2017-06-01 17:50:41 -04:00
François Freitag
bf50ae8210 Clarified QuerySet.iterator()'s docs on server-side cursors. 2017-06-01 15:38:30 -04:00
François Freitag
88336fdbb5 Fixed #28062 -- Added a setting to disable server-side cursors on PostgreSQL.
When a connection pooler is set up in transaction pooling mode, queries
relying on server-side cursors fail. The DISABLE_SERVER_SIDE_CURSORS
setting in DATABASES disables server-side cursors for this use case.
2017-05-06 06:59:04 -04:00
Ran Benita
2a6b4e6521 Updated docs after changing select_for_update() to raise NotSupportedError.
Follow up to 054a44d6f0.
2017-04-11 11:52:53 -04:00
Sudhanshu Mishra
9f0c82971d Fixed #28025 -- Fixed typo in docs/ref/models/querysets.txt. 2017-04-05 07:23:40 -04:00
Alexkane
b427f0d674 Made a few queryset lookup examples consistent. 2017-02-24 16:35:08 -05:00
Vytis Banaitis
d1bab24e01 Refs #23919, #27778 -- Removed obsolete mentions of unicode. 2017-01-26 08:19:27 -05:00
Tim Graham
9d27478958 Refs #23919 -- Removed docs references to long integers. 2017-01-19 13:19:26 -05:00
Tim Graham
f6acd1d271 Refs #23919 -- Removed Python 2 notes in docs. 2017-01-18 11:51:29 -05:00