Skip to content

Commit 02b1e71

Browse files
author
Richard Jones
committed
better sqlite columns
1 parent 8526e9e commit 02b1e71

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

roundup/backends/back_sqlite.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: back_sqlite.py,v 1.22 2004-03-26 06:38:10 richard Exp $
1+
# $Id: back_sqlite.py,v 1.23 2004-03-31 23:08:08 richard Exp $
22
'''Implements a backend for SQLite.
33
44
See https://pysqlite.sourceforge.net/ for pysqlite info
@@ -18,7 +18,15 @@
1818
class Database(rdbms_common.Database):
1919
# char to use for positional arguments
2020
arg = '%s'
21-
21+
hyperdb_to_sql_datatypes = {
22+
hyperdb.String : 'VARCHAR(255)',
23+
hyperdb.Date : 'VARCHAR(30)',
24+
hyperdb.Link : 'INTEGER',
25+
hyperdb.Interval : 'VARCHAR(255)',
26+
hyperdb.Password : 'VARCHAR(255)',
27+
hyperdb.Boolean : 'BOOLEAN',
28+
hyperdb.Number : 'REAL',
29+
}
2230
hyperdb_to_sql_value = {
2331
hyperdb.String : str,
2432
hyperdb.Date : lambda x: x.serialise(),

0 commit comments

Comments
 (0)