Allow SQLResult to take in None or Statement values.

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

Information

Django Evolution
master

Reviewers

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 ID
Allow SQLResult to take in None or Statement values.
`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+.
b70726b477586a14a57267ed0e3cf0ed3f5bee4e
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (0b4107a)