diff options
Diffstat (limited to 'django/db/backends/sqlite3/base.py')
| -rw-r--r-- | django/db/backends/sqlite3/base.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index f7b65651b3..e378975207 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -60,9 +60,9 @@ Database.register_adapter(datetime.datetime, adapt_datetime) class DatabaseWrapper(BaseDatabaseWrapper): vendor = "sqlite" display_name = "SQLite" - # SQLite doesn't actually support most of these types, but it "does the right - # thing" given more verbose field definitions, so leave them as is so that - # schema inspection is more useful. + # SQLite doesn't actually support most of these types, but it "does the + # right thing" given more verbose field definitions, so leave them as is so + # that schema inspection is more useful. data_types = { "AutoField": "integer", "BigAutoField": "integer", @@ -124,13 +124,13 @@ class DatabaseWrapper(BaseDatabaseWrapper): } # The patterns below are used to generate SQL pattern lookup clauses when - # the right-hand side of the lookup isn't a raw string (it might be an expression - # or the result of a bilateral transformation). - # In those cases, special characters for LIKE operators (e.g. \, *, _) should be - # escaped on database side. + # the right-hand side of the lookup isn't a raw string (it might be an + # expression or the result of a bilateral transformation). In those cases, + # special characters for LIKE operators (e.g. \, *, _) should be escaped on + # database side. # - # Note: we use str.format() here for readability as '%' is used as a wildcard for - # the LIKE operator. + # Note: we use str.format() here for readability as '%' is used as a + # wildcard for the LIKE operator. pattern_esc = r"REPLACE(REPLACE(REPLACE({}, '\', '\\'), '%%', '\%%'), '_', '\_')" pattern_ops = { "contains": r"LIKE '%%' || {} || '%%' ESCAPE '\'", |
