Utils API

django_spanner.utils.add_dummy_where(sql)[source]

Cloud Spanner requires a WHERE clause on UPDATE and DELETE statements. Add a dummy WHERE clause if necessary.

Parameters

sql (str) – A SQL statement.

Return type

str

Returns

A SQL statement with dummy WHERE clause.

django_spanner.utils.check_django_compatability(supported_django_versions)[source]

Verify that this version of django-spanner is compatible with the installed version of Django. For example, django-spanner is compatible with Django 2.2.y and 3.2.z