mirror of
https://github.com/django/django.git
synced 2025-08-10 13:58:43 +00:00
Fixed #11863: added a Model.objects.raw()
method for executing raw SQL queries and yield models.
See `docs/topics/db/raw.txt` for details. Thanks to seanoc for getting the ball rolling, and to Russ for wrapping things up. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
25ab93457c
commit
20ad30713e
9 changed files with 627 additions and 23 deletions
|
@ -20,6 +20,13 @@ class CyclicDependency(Exception):
|
|||
"""
|
||||
pass
|
||||
|
||||
class InvalidQuery(Exception):
|
||||
"""
|
||||
The query passed to raw isn't a safe query to use with raw.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class CollectedObjects(object):
|
||||
"""
|
||||
A container that stores keys and lists of values along with remembering the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue