Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit 3264f75

Browse files
committed
document that random QuerySet ordering isn't supported
1 parent 3f9b91d commit 3264f75

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ Spanner doesn't have these functions.
130130
This feature uses a column name that starts with an underscore (`_order`) which
131131
Spanner doesn't allow.
132132

133+
### Random `QuerySet` ordering isn't supported
134+
135+
Spanner doesn't support it. For example:
136+
137+
```
138+
>>> ExampleModel.objects.order_by('?')
139+
...
140+
django.db.utils.ProgrammingError: 400 Function not found: RANDOM ... FROM
141+
example_model ORDER BY RANDOM() ASC
142+
```
143+
133144
### Schema migrations
134145

135146
Spanner has some limitations on schema changes which you must respect:

0 commit comments

Comments
 (0)