Allow SQLResult to take in None or Statement values.

Review Request #11104 — Created July 30, 2020 and submitted

chipx86
Django Evolution
master
django-evolution

SQLResult now gracefully handles adding a None value, ignoring the
value instead of raising an exception. This helps avoid issues and
simplifies code that otherwise had to check values before adding to the
result.

It also now handles Statement values, which are what most SQL
generation functions generate in Django 2.0 and higher. It will convert
them to SQL and ensure they have a trailing ;.

Both of these will be more necessary with upcoming support for
constraints in Django 2.2+.

Unit tests pass on all versions of Django, for all databases.

Tested both None and Statement handling in some in-progress changes.

Summary
Allow SQLResult to take in None or Statement values.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (0b4107a)
Loading...