commit 7080e5449a5e70a062d7a568bf3db8e6f6fe3e24
Author: David Sorber <david.sorber@gmail.com>
Date:   Fri Jan 27 06:59:07 2017 -0500

    Updating the templatized query PoC to support the case where integer or float type columns return NULL and should be treated as 0 and 0.0 respectively.

diff --git a/software/sqlite_poc/DBManager.cc b/software/sqlite_poc/DBManager.cc
index a24c8e8..1a48339 100644
--- a/software/sqlite_poc/DBManager.cc
+++ b/software/sqlite_poc/DBManager.cc
@@ -5,23 +5,35 @@
 // Helper function for int64_t type
 void get_value(int64_t& val, int idx, sqlite3_stmt* stmt)
 {
-    if (sqlite3_column_type(stmt, idx) != SQLITE_INTEGER)
+    if (sqlite3_column_type(stmt, idx) == SQLITE_INTEGER)
+    {
+        val = sqlite3_column_int64(stmt, idx);
+    }
+    else if (sqlite3_column_type(stmt, idx) == SQLITE_NULL)
+    {
+        val = 0;
+    }
+    else
     {
         assert(false);
     }
-    
-    val = sqlite3_column_int64(stmt, idx);
 }
 
 // Helper function for double type
 void get_value(double& val, int idx, sqlite3_stmt* stmt)
 {
-    if (sqlite3_column_type(stmt, idx) != SQLITE_FLOAT)
+    if (sqlite3_column_type(stmt, idx) == SQLITE_FLOAT)
     {
-        assert(false);        
+        val = sqlite3_column_double(stmt, idx);
+    }
+    else if (sqlite3_column_type(stmt, idx) == SQLITE_NULL)
+    {
+        val = 0.0;
+    }
+    else
+    {
+        assert(false);
     }
-    
-    val = sqlite3_column_double(stmt, idx); 
 }
 
 // Helper function for string type
