             return stringValue
         }
         
-        if type == .Numeric {
-            return numericValue
+        if type == .Int {
+            return numericValue.intValue
+        }
+        
+        if type == .Double {
+            return numericValue.doubleValue
         }
         
         if type == .Blob {


#if os(Linux)
    import CSQLiteLinux
#else
    import CSQLiteDarwin
#endif

import Foundation

private var alphabet = Array("0123456789abcdef".characters)

        } else {
            // error in statement
            if !silenceErrors {
                result.error = "\(String(cString: sqlite3_errmsg(db)))"
            }
        }
        
        sqlite3_finalize(stmt)
        
        return result
        
    }
    
    public func execute(compiledAction: SWSQLAction) -> Result {
        return execute(sql: compiledAction.statement, params: compiledAction.parameters)
    }
    
    public func execute(sql: String, params:[Any]) -> Result {
        
        return execute(sql: sql, params: params, silenceErrors: false)
        
    }
    
    public func execute(actions: [Action]) -> Result {
        
        var result = Result()
        
        for action in actions {
            result = execute(sql: action.builtStatement, params: [], silenceErrors: true)
        }
        
        return result
        
    }
    
    public func query(sql: String, params:[Any]) -> Result {
        
        let result = Result()
        var results: [[String:Value]] = []
        
        var values: [Value] = []
