MessageSearchQuery
public final 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
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
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 static 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
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
falseDeclaration
Swift
public var reverse: Bool -
Should search as a complete, exact phrase. Default is
falseDeclaration
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
.scoreDeclaration
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]?
View on GitHub
Install in Dash