diff options
| author | Michael Manfre <mmanfre@gmail.com> | 2014-01-08 23:31:34 -0500 |
|---|---|---|
| committer | Michael Manfre <mmanfre@gmail.com> | 2014-02-02 12:47:06 -0500 |
| commit | 0837eacc4e1fa7916e48135e8ba43f54a7a64997 (patch) | |
| tree | acd1f5961d3bbf1a59f9b3ca515712dad4c8e52a /django/db/models/sql/constants.py | |
| parent | ab2f21080d8b3112c1ba9a0bf923eae733be4242 (diff) | |
Made SQLCompiler.execute_sql(result_type) more explicit.
Updated SQLUpdateCompiler.execute_sql to match the behavior described in
the docstring; the 'first non-empty query' will now include all queries,
not just the main and first related update.
Added CURSOR and NO_RESULTS result_type constants to make the usages more
self documenting and allow execute_sql to explicitly close the cursor when
it is no longer needed.
Diffstat (limited to 'django/db/models/sql/constants.py')
| -rw-r--r-- | django/db/models/sql/constants.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/sql/constants.py b/django/db/models/sql/constants.py index 904f7b2c8b..36aab23bae 100644 --- a/django/db/models/sql/constants.py +++ b/django/db/models/sql/constants.py @@ -33,6 +33,8 @@ SelectInfo = namedtuple('SelectInfo', 'col field') # How many results to expect from a cursor.execute call MULTI = 'multi' SINGLE = 'single' +CURSOR = 'cursor' +NO_RESULTS = 'no results' ORDER_PATTERN = re.compile(r'\?|[-+]?[.\w]+$') ORDER_DIR = { |
