[hyena] Missing double? support bits
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] Missing double? support bits
- Date: Wed, 26 May 2010 02:37:12 +0000 (UTC)
commit 3c753c127013af6c21a8e698901d4a23c9ab3304
Author: Mike Gemünde <mike gemuende de>
Date: Sat Apr 24 17:11:31 2010 +0200
Missing double? support bits
.../Hyena.Data.Sqlite/SqliteUtils.cs | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs b/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs
index a2e1e83..979ccb3 100644
--- a/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs
+++ b/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs
@@ -105,6 +105,12 @@ namespace Hyena.Data.Sqlite
return Enum.ToObject (type, value);
} else if (type == typeof (bool)) {
return ((long)value == 1);
+ } else if (type == typeof (double?)) {
+ if (value == null)
+ return null;
+
+ double double_value = ((Single?) value).Value;
+ return (double?) double_value;
} else {
return Convert.ChangeType (value, type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]