diff --git a/MJSwiftCore/Classes/Repository/DataSource.swift b/MJSwiftCore/Classes/Repository/DataSource.swift index 666e9b8b..ae63276f 100644 --- a/MJSwiftCore/Classes/Repository/DataSource.swift +++ b/MJSwiftCore/Classes/Repository/DataSource.swift @@ -58,14 +58,14 @@ public protocol PutDataSource : DataSource { /// Put by query method /// /// - Parameter query: An instance conforming to Query that encapsules the get query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of T type. Some data sources might add some extra fields after the put operation, e.g. id or timestamp fields. @discardableResult func put(_ value: T?, in query: Query) -> Future /// Put by query method /// /// - Parameter query: An instance conforming to Query that encapsules the get query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of T type. Some data sources might add some extra fields after the put operation, e.g. id or timestamp fields. @discardableResult func putAll(_ array: [T], in query: Query) -> Future<[T]> } @@ -89,14 +89,14 @@ public protocol DeleteDataSource : DataSource { /// Delete by query method /// /// - Parameter query: An instance conforming to Query that encapusles the delete query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of Void type. @discardableResult func delete(_ query: Query) -> Future /// Delete by query method /// /// - Parameter query: An instance conforming to Query that encapusles the delete query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of Void type. @discardableResult func deleteAll(_ query: Query) -> Future } diff --git a/MJSwiftCore/Classes/Repository/Repository.swift b/MJSwiftCore/Classes/Repository/Repository.swift index 18aa46be..8b872daa 100644 --- a/MJSwiftCore/Classes/Repository/Repository.swift +++ b/MJSwiftCore/Classes/Repository/Repository.swift @@ -80,14 +80,14 @@ public protocol PutRepository : Repository { /// Put by query method /// /// - Parameter query: An instance conforming to Query that encapsules the get query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of T type. Some data sources might add some extra fields after the put operation, e.g. id or timestamp fields. @discardableResult func put(_ value: T?, in query: Query, operation: Operation) -> Future /// Put by query method /// /// - Parameter query: An instance conforming to Query that encapsules the get query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of T type. Some data sources might add some extra fields after the put operation, e.g. id or timestamp fields. @discardableResult func putAll(_ array: [T], in query: Query, operation: Operation) -> Future<[T]> } @@ -109,14 +109,14 @@ public protocol DeleteRepository : Repository { /// Delete by query method /// /// - Parameter query: An instance conforming to Query that encapusles the delete query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of Void type. @discardableResult func delete(_ query: Query, operation: Operation) -> Future /// Delete by query method /// /// - Parameter query: An instance conforming to Query that encapusles the delete query information - /// - Returns: A future of Boolean type. If the operation succeeds, the future will be resolved as true. + /// - Returns: A future of Void type. @discardableResult func deleteAll(_ query: Query, operation: Operation) -> Future }