예제 #1
0
파일: filter.py 프로젝트: planetlab/sfa
    def quote(self, value):
        """
        Returns quoted version of the specified value.
        """

        # The pgdb._quote function is good enough for general SQL
        # quoting, except for array types.
        if isinstance(value, (list, tuple, set)):
            return "ARRAY[%s]" % ", ".join(map(self.quote, value))
        else:
            return pgdb._quote(value)    
예제 #2
0
 def __pg_repr__(self):
     d = pgdb.Timestamp(self.year, self.month, self.day, self.hour,
                        self.minute, self.second)
     return "timestamp %s" % pgdb._quote(d)
예제 #3
0
 def pg_escape_string(string):
     return pgdb._quote(str(string))[1:-1]
예제 #4
0
	def pg_escape_string(string):
		return pgdb._quote(str(string))[1:-1]
예제 #5
0
	def __pg_repr__(self):
		d = pgdb.Timestamp(self.year, self.month, self.day, self.hour, self.minute, self.second)
		return "timestamp %s" % pgdb._quote(d)