         try db.delete(key: key.hashValue)
     }
     
-    /// Updates the key value pair in the database in synchronus way in background thread
+    /// Updates the key value pair in the database in a syrialized way
     ///
     /// - parameter key: Its a unique key which is of type `Hashable` and its also a primary key in a database
     ///

        print("Successfully opened connection to database.")
    }
    
    /// Inserts or Updates the key value pair in the database in an synchronus thread safe way in background thread
    ///
    /// - parameter value: Its of type Data. This is stored as BLOB in sqlite for the unique key.
    /// - parameter key: Its a unique key which is of type `Hashable` and its also a primary key in a database

        try db.update(model:  RowModel(id: (key.hashValue) , data: value))
    }
    
    /// Fetches the value for a key in a syrialized way
    ///
    /// - parameter key: Its a unique key which is of type `Hashable` and its also a primary key in a database
    ///
    /// - returns: Data
    public func getValue<T: Hashable>(for key: T) -> Data? {
        do {
            let data = try db.getValue(for: key.hashValue, tableName: RowModel.tableName)
            return data
        }
        catch {
            return nil;
        }
    }
    
    /// returns Data? for get query. You cannot set values through subscript
    public subscript(index: F) -> Data? {
        get {
            return getValue(for: index)
        }
    }
}
