Skip to content

Commit 636aedb

Browse files
author
Clément Le Provost
committed
Add method to clear a query
… i.e. remove all parameters.
1 parent 37d7769 commit 636aedb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Source/AbstractQuery.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,12 @@ open class AbstractQuery : NSObject, NSCopying {
231231
@objc public init(parameters: [String: String]) {
232232
self.parameters = parameters
233233
}
234-
234+
235+
/// Clear all parameters.
236+
@objc open func clear() {
237+
parameters.removeAll()
238+
}
239+
235240
// MARK: NSCopying
236241

237242
/// Support for `NSCopying`.

0 commit comments

Comments
 (0)