-
Notifications
You must be signed in to change notification settings - Fork 30
django: implement SchemaEditor.quote_value() #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The docstring of this method says, "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, though, so this is safe)." Some implementations on other databases: SQLite: @odeke-em, do you know if Spanner's Python libraries provides anything similar? If not, we could consider an implementation in Python similar to what the Oracle backend does. |
Unfortunately, I don't think that the Python client libraries support quoting values, we might have to add that function ourselves. Looking at the Cloud Spanner advisory on string and byte literals, they have a section on quoting https://cloud.google.com/spanner/docs/lexical#string-and-bytes-literals |
It looks like the usage of
|
fixes #227 Co-authored-by: Emmanuel T Odeke <[email protected]>
For example:
The text was updated successfully, but these errors were encountered: