                 sqlite3_bind_null(stmt, paramCount)
             case .Blob:
                 sqlite3_bind_blob(stmt, paramCount, [UInt8](v.blobValue!), Int32(v.blobValue!.count), SQLITE_TRANSIENT)
-            case .Double:
+            case .Numeric:
                 sqlite3_bind_double(stmt, paramCount, v.numericValue.doubleValue)
-            case .Int:
-                sqlite3_bind_int64(stmt, paramCount, v.numericValue.int64Value)
             }
             
             paramCount += 1

    
}

public class Result {
    
    public var results: [Record] = []
    public var error: String? = nil
    
    public init() {
        
    }
    
}

public class SWSQLite {
    
    var db: OpaquePointer?

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