         return nil
     }
     
-    public func asNumber() -> NSNumber? {
-        
-        if type == .Numeric {
-            return numericValue
+    public func asInt() -> Int? {
+        
+        if type == .Int {
+            return numericValue.intValue
         }
         
         return nil
     }
     
-    public func asInt() -> Int? {
-        
-        if type == .Numeric {
-            return numericValue.intValue
+    public func asDouble() -> Double? {
+        
+        if type == .Double {
+            return numericValue.doubleValue
         }
         
         return nil
+    }
+    
+    public func getType() -> DataType {
+        return type
     }
     
 }

        db = nil;
    }
    
    public func execute(sql: String, params:[Any], silenceErrors: Bool) {
        
        var values: [Value] = []
        for o in params {

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

import Dispatch
import Foundation

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