comparison roundup/backends/back_sqlite.py @ 3752:c92687dce135

unicode / sqlite 3 problem [SF#1589292]
author Richard Jones <richard@users.sourceforge.net>
date Sat, 11 Nov 2006 03:21:12 +0000
parents b476fef16ccc
children f5ddd1639a15
comparison
equal deleted inserted replaced
3751:44603dd791b7 3752:c92687dce135
1 # $Id: back_sqlite.py,v 1.48 2006-10-10 03:55:31 richard Exp $ 1 # $Id: back_sqlite.py,v 1.49 2006-11-11 03:21:12 richard Exp $
2 '''Implements a backend for SQLite. 2 '''Implements a backend for SQLite.
3 3
4 See https://pysqlite.sourceforge.net/ for pysqlite info 4 See https://pysqlite.sourceforge.net/ for pysqlite info
5 5
6 6
59 hyperdb.Boolean : int, 59 hyperdb.Boolean : int,
60 hyperdb.Number : lambda x: x, 60 hyperdb.Number : lambda x: x,
61 hyperdb.Multilink : lambda x: x, # used in journal marshalling 61 hyperdb.Multilink : lambda x: x, # used in journal marshalling
62 } 62 }
63 sql_to_hyperdb_value = { 63 sql_to_hyperdb_value = {
64 hyperdb.String : str, 64 hyperdb.String : lambda x: isinstance(x, unicode) and x.encode('utf8') or str(x),
65 hyperdb.Date : lambda x: date.Date(str(x)), 65 hyperdb.Date : lambda x: date.Date(str(x)),
66 hyperdb.Link : str, # XXX numeric ids 66 hyperdb.Link : str, # XXX numeric ids
67 hyperdb.Interval : date.Interval, 67 hyperdb.Interval : date.Interval,
68 hyperdb.Password : lambda x: password.Password(encrypted=x), 68 hyperdb.Password : lambda x: password.Password(encrypted=x),
69 hyperdb.Boolean : int, 69 hyperdb.Boolean : int,

Roundup Issue Tracker: http://roundup-tracker.org/