MessageSearchQuery
@objc(SBDMessageSearchQuery)
public class MessageSearchQuery : NSObject, Codable, Queryable
extension MessageSearchQuery: Serializable
A class representing query to retrieve list of BaseMessages that matches a given
query with given filters. MessageSearchQuery can be generated by using
MessageSearchQueryBuilder
Since
3.0.162-
Boolean indicates there are more data to fetch
Declaration
Swift
@objc public internal(set) var hasNext: Bool { get } -
Indicates the query is currently loading or not
Declaration
Swift
@objc public internal(set) var isLoading: Bool { get } -
Indicates the total count of results that match the given search.
Since
4.0.10Declaration
Swift
public internal(set) var totalCount: Int32 { get } -
Declaration
Swift
public required init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Fetches next page
Declaration
Swift
@objc public func loadNextPage(completionHandler: @escaping MessageListHandler)Parameters
completionHandlercompletion handler
-
Copies this object
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> AnyParameters
zoneoptional
NSZoneReturn Value
MessageListQueryinstance
-
Serializes this object into data
Declaration
Swift
public func serialize() -> Data?Return Value
optioanal
Datainstance -
Deserializes and reconstructs the object
Declaration
Swift
public class func build(fromSerializedData data: Data?) -> `Self`?Parameters
dataDatainstanceReturn Value
MessageSearchQueryif parameter is valid, otherwisenil
-
The maximum number of
SBDBaseMessages per queried page. Default is 20, maximum is 999 (<1000)Declaration
Swift
@objc public var limit: UInt { get } -
Keyword to search for.
Declaration
Swift
@objc public var keyword: String? { get } -
Channel url of the channel you want to set as a scope for the search.
Declaration
Swift
@objc public var channelURL: String? { get } -
Channel custom type you want to set as a scope for the search.
Declaration
Swift
@objc public var channelCustomType: String? { get } -
Should reverse the queried result list. Default is
falseDeclaration
Swift
@objc public var reverse: Bool { get } -
Should search as a complete, exact phrase. Default is
falseDeclaration
Swift
@objc public var exactMatch: Bool { get } -
Starting timestamp to search from. Default is 0
Declaration
Swift
@objc public var messageTimestampFrom: Int64 { get } -
Ending timestamp to search to. Default is 0
Declaration
Swift
@objc public var messageTimestampTo: Int64 { get } -
The order method for the search. Default is
.scoreDeclaration
Swift
@objc public var order: MessageSearchQueryOrder { get } -
Whether treat keyword field as advanced query or not
Since
3.0.222Declaration
Swift
@objc public var advancedQuery: Bool { get } -
Array of target fields in message’s data that will be searched with keyword
Since
3.0.222Declaration
Swift
@objc public var targetFields: [String]? { get }
View on GitHub
Install in Dash
MessageSearchQuery Class Reference