Changeset 3238
- Timestamp:
- 07/11/07 20:00:59 (1 year ago)
- Files:
-
- trunk/dabo/db/dbSQLite.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/db/dbSQLite.py
r3237 r3238 64 64 sl = "\\" 65 65 qt = "\'" 66 return qt + str(val).replace(sl, sl+sl).replace(qt, qt+qt) + qt 66 if not isinstance(val, basestring): 67 # Make sure we aren't trying to coerce unicode chars to str 68 val = str(val) 69 return qt + val.replace(sl, sl+sl).replace(qt, qt+qt) + qt 67 70 68 71 … … 92 95 """ We need to wrap the value in quotes. """ 93 96 sqt = "'" # single quote 94 return "%s%s%s" % (sqt, str(val), sqt) 97 if not isinstance(val, basestring): 98 val = str(val) 99 return "%s%s%s" % (sqt, val, sqt) 95 100 96 101
