Skip to content

Commit 91d2c9d

Browse files
authored
Merge branch 'ploomber:master' into master
2 parents d3c7924 + ed18355 commit 91d2c9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sql/parse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ def magic_args(magic_execute, line, cmd_from, allowed_duplicates=None):
336336

337337
def escape_string_literals_with_colon_prefix(query):
338338
"""
339-
Given a query, replaces all occurrences of ':variable' with '\:variable' and
340-
":variable" with "\:variable" so that the query can be passed to sqlalchemy.text
339+
Given a query, replaces all occurrences of ':variable' with '\\:variable' and
340+
":variable" with "\\:variable" so that the query can be passed to sqlalchemy.text
341341
without the literals being interpreted as bind parameters. Also calls
342342
escape_string_slicing_with_colon_prefix(). It doesn't replace
343343
the occurrences of :variable (without quotes)
@@ -366,8 +366,8 @@ def escape_string_literals_with_colon_prefix(query):
366366

367367
def escape_string_slicing_notation(query):
368368
"""
369-
Given a query, replaces all occurrences of 'example'[x:y] with 'example'[x\:y].
370-
Escaping the colon using \ ensures correct string slicing behavior rather
369+
Given a query, replaces all occurrences of 'example'[x:y] with 'example'[x\\:y].
370+
Escaping the colon using \\ ensures correct string slicing behavior rather
371371
than being interpreted as a bind parameter.
372372
373373
Parameters

0 commit comments

Comments
 (0)