Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4595b2c commit eb2012cCopy full SHA for eb2012c
1 file changed
plugins/dbms/hsql/syntax.py
@@ -16,6 +16,11 @@ def __init__(self):
16
17
@staticmethod
18
def escape(expression, quote=True):
19
+ """
20
+ >>> Syntax.escape("SELECT 'abcdefgh' FROM foobar")
21
+ 'SELECT CHAR(97)||CHAR(98)||CHAR(99)||CHAR(100)||CHAR(101)||CHAR(102)||CHAR(103)||CHAR(104) FROM foobar'
22
23
def escaper(value):
- retVal = "||".join("CHAR(%d)" % ord(value[i]) for i in xrange(len(value)))
- return retVal
24
+ return "||".join("CHAR(%d)" % ord(value[i]) for i in xrange(len(value)))
25
+
26
+ return Syntax._escape(expression, quote, escaper)
0 commit comments