MessageSearchQuery
public final class MessageSearchQuery: NSObject, Codable, Queryable
extension MessageSearchQuery: Serializable
A class representing query to retrieve list of BaseMessage
s 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
public internal(set) var hasNext: Bool = true
-
Indicates the query is currently loading or not
Declaration
Swift
public internal(set) var isLoading: Bool = false
-
Indicates the total count of results that match the given search.
Since
4.0.10Declaration
Swift
public internal(set) var totalCount: Int32 = -1
-
Declaration
Swift
public required init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Fetches next page
Declaration
Swift
public func loadNextPage(completionHandler: @escaping MessageListHandler)
Parameters
completionHandler
completion handler
-
Copies this object
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
Parameters
zone
optional
NSZone
Return Value
MessageListQuery
instance
-
Serializes this object into data
Declaration
Swift
public func serialize() -> Data?
Return Value
optioanal
Data
instance -
Deserializes and reconstructs the object
Declaration
Swift
public static func build(fromSerializedData data: Data?) -> Self?
Parameters
data
Data
instanceReturn Value
MessageSearchQuery
if parameter is valid, otherwisenil
-
The maximum number of
SBDBaseMessage
s per queried page. Default is 20, maximum is 999 (<1000)Declaration
Swift
public var limit: UInt
-
Keyword to search for.
Declaration
Swift
public var keyword: String?
-
Channel url of the channel you want to set as a scope for the search.
Declaration
Swift
public var channelURL: String?
-
Channel custom type you want to set as a scope for the search.
Declaration
Swift
public var channelCustomType: String?
-
Should reverse the queried result list. Default is
false
Declaration
Swift
public var reverse: Bool
-
Should search as a complete, exact phrase. Default is
false
Declaration
Swift
public var exactMatch: Bool
-
Starting timestamp to search from. Default is 0
Declaration
Swift
public var messageTimestampFrom: Int64
-
Ending timestamp to search to. Default is 0
Declaration
Swift
public var messageTimestampTo: Int64
-
The order method for the search. Default is
.score
Declaration
Swift
public var order: MessageSearchQueryOrder
-
Whether treat keyword field as advanced query or not
Since
3.0.222Declaration
Swift
public var advancedQuery: Bool
-
Array of target fields in message’s data that will be searched with keyword
Since
3.0.222Declaration
Swift
public var targetFields: [String]?