      - parameter update:     indicates whether the record should be updated if already present
      */
     
-    public func addObjects <S: Storable> (objects: [S], update: Bool = true, withCompletionHandler completionHandler: ((ResultType)->Void)) {
+    public func addObjects <S: Storable> (objects: [S], update: Bool = true, withCompletionHandler completionHandler: ((Result<Bool>)->Void)) {
         dispatch_async(queue) { () -> Void in
             do {
                 try self.addObjects(objects)
-                completionHandler(ResultType.Success(data: nil))
+                completionHandler(Result.Success(true))
             } catch let error {
-                completionHandler(ResultType.Error(error: error))
+                completionHandler(Result.Error(error))
             }
         }
     }


import TinySQLite

public enum ResultType {
    case Success(data: Any?)
    case Error(error: ErrorType)
}

extension SwiftyDB {

     - parameter type:      type of the objects to be retrieved
    */
    
    public func objectsForType <D where D: Storable, D: NSObject> (type: D.Type, matchingFilters filters: [String: SQLiteValue?] = [:], withCompletionHandler completionHandler: ((Result<[D]>)->Void)) {
        
        dispatch_async(queue) { () -> Void in
            do {
                let objects = try self.objectsForType(type, matchingFilters: filters)
                completionHandler(Result.Success(objects))
            } catch let error {
                completionHandler(Result.Error(error))
            }
        }
    }
