diff roundup/backends/back_sqlite.py @ 5067:e424987d294a

Add support for an integer type to join the existing number type. Commit patch supplied for issue2550886. This can be used for properties used for ordering, counts etc. where a decimal point isn't needed. Developed by Anthony (antmail). Doc updates written by John Rouillard.
author John Rouillard <rouilj@ieee.org>
date Sun, 05 Jun 2016 00:17:26 -0400
parents 3adff0fb0207
children e74c3611b138
line wrap: on
line diff
--- a/roundup/backends/back_sqlite.py	Tue May 31 09:16:09 2016 +0200
+++ b/roundup/backends/back_sqlite.py	Sun Jun 05 00:17:26 2016 -0400
@@ -51,6 +51,7 @@
         hyperdb.Password  : 'VARCHAR(255)',
         hyperdb.Boolean   : 'BOOLEAN',
         hyperdb.Number    : 'REAL',
+        hyperdb.Integer   : 'INTEGER',
     }
     hyperdb_to_sql_value = {
         hyperdb.String : str,
@@ -59,6 +60,7 @@
         hyperdb.Interval  : str,
         hyperdb.Password  : str,
         hyperdb.Boolean   : int,
+        hyperdb.Integer   : int,
         hyperdb.Number    : lambda x: x,
         hyperdb.Multilink : lambda x: x,    # used in journal marshalling
     }
@@ -69,6 +71,7 @@
         hyperdb.Interval  : date.Interval,
         hyperdb.Password  : lambda x: password.Password(encrypted=x),
         hyperdb.Boolean   : int,
+        hyperdb.Integer   : int,
         hyperdb.Number    : rdbms_common._num_cvt,
         hyperdb.Multilink : lambda x: x,    # used in journal marshalling
     }

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