Example #1
0
 def adapt_string(adapted):
     """Python implementation of psycopg/psycopg2#459 from v2.7"""
     if '\x00' in adapted:
         raise ValueError(
             "A string literal cannot contain NUL (0x00) characters.")
     return QuotedString(adapted)
Example #2
0
 def getquoted(self):
     s = self.dumps(self.adapted)
     qs = QuotedString(s)
     if self._conn is not None:
         qs.prepare(self._conn)
     return qs.getquoted()
Example #3
0
 def getquoted(self):
     s = self.dumps(self.adapted)
     return QuotedString(s).getquoted()
Example #4
0
 def getquoted(self):
     pudb.set_trace()
     s = self.dumps(self.adapted)
     return QuotedString(s).getquoted()