git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b86b521
)
use sfa.util.PostgreSLQ.quote() instead of reimplementing it here
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 3 Mar 2010 22:06:13 +0000
(22:06 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 3 Mar 2010 22:06:13 +0000
(22:06 +0000)
sfa/util/table.py
patch
|
blob
|
history
diff --git
a/sfa/util/table.py
b/sfa/util/table.py
index
5e9277b
..
7eea14a
100644
(file)
--- a/
sfa/util/table.py
+++ b/
sfa/util/table.py
@@
-127,19
+127,10
@@
class SfaTable(list):
self.db.commit()
def quote_string(self, value):
self.db.commit()
def quote_string(self, value):
- return str(self.quote(value))
+ return str(self.
db.
quote(value))
def quote(self, value):
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_string, value)
- else:
- return pgdb._quote(value)
+ return self.db.quote(value)
def find(self, record_filter = None, columns=None):
if not columns:
def find(self, record_filter = None, columns=None):
if not columns: