MCPcopy
hub / github.com/django/django / quote_value

Method quote_value

django/db/backends/base/schema.py:501–509  ·  view source on GitHub ↗

Return a quoted version of the value so it's safe to use in an SQL string. This is not safe against injection from user code; it is intended only for use in making SQL scripts or preparing default values for particularly tricky backends (defaults are not user-defined

(self, value)

Source from the content-addressed store, hash-verified

499 return field.get_db_prep_save(self._effective_default(field), self.connection)
500
501 def quote_value(self, value):
502 """
503 Return a quoted version of the value so it's safe to use in an SQL
504 string. This is not safe against injection from user code; it is
505 intended only for use in making SQL scripts or preparing default values
506 for particularly tricky backends (defaults are not user-defined,
507 though, so this is safe).
508 """
509 raise NotImplementedError()
510
511 # Actions
512

Callers 3

_column_generated_sqlMethod · 0.95
_comment_sqlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected