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

    import CSQLiteDarwin
#endif

import Dispatch
import Foundation

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

            type = .String
            stringValue = value as! String
        } else if (mirror.subjectType == Float.self) {
            type = .Numeric
            numericValue = NSNumber(value: value as! Float)
        } else if (mirror.subjectType == Double.self) {
            type = .Numeric
            numericValue = NSNumber(value: value as! Double)
        } else if (mirror.subjectType == Data.self) {
            type = .Blob
            blobValue = value as! Data
        } else if (mirror.subjectType == Int.self) {
            type = .Numeric
            numericValue = NSNumber(value: value as! Int)
        } else if (value is NSNumber) {
            type = .Numeric
            numericValue = value as! NSNumber
        } else {
            type = .Null
        }
    }
    
    public func asBool() -> Bool {
        if type == .Numeric {
            return numericValue.boolValue
        }
        return false
