IMConversationQuery
public class IMConversationQuery : LCQuery
IM Conversation Query
-
limit of conversation ID’s count in one query.
Declaration
Swift
public static let limitRangeOfQueryResult: ClosedRange<Int> -
conversation query option.
See moreDeclaration
Swift
public struct Options : OptionSet -
the client which this query belong to.
Declaration
Swift
public private(set) weak var client: IMClient? { get }
-
Performs a logical AND operation on an array of one or more expressions of query.
Throws
LCErrorDeclaration
Swift
public static func and(_ queries: [IMConversationQuery]) throws -> IMConversationQuery?Parameters
queriesAn array of one or more expressions of query.
Return Value
An optional
IMConversationQuery -
Performs a logical AND operation on self and the query.
Throws
LCErrorDeclaration
Swift
public func and(_ query: IMConversationQuery) throws -> IMConversationQuery?Parameters
queryThe query.
Return Value
An optional
IMConversationQuery -
Performs a logical OR operation on an array of one or more expressions of query.
Throws
LCErrorDeclaration
Swift
public static func or(_ queries: [IMConversationQuery]) throws -> IMConversationQuery?Parameters
queriesAn array of one or more expressions of query.
Return Value
An optional
IMConversationQuery -
Performs a logical OR operation on self and the query.
Throws
LCErrorDeclaration
Swift
public func or(_ query: IMConversationQuery) throws -> IMConversationQuery?Parameters
queryThe query.
Return Value
An optional
IMConversationQuery
-
Declaration
Swift
public override func `where`(_ key: String, _ constraint: Constraint) throws
-
Get Conversation by ID.
Declaration
Swift
public func getConversation( by ID: String, completion: @escaping (LCGenericResult<IMConversation>) -> Void) throwsParameters
IDThe ID of the conversation.
completioncallback.
-
Get Conversations by ID set.
Declaration
Swift
public func getConversations( by IDs: Set<String>, completion: @escaping (LCGenericResult<[IMConversation]>) -> Void) throwsParameters
IDsThe set of ID string.
completioncallback.
-
Get Temporary Conversation by ID.
Declaration
Swift
public func getTemporaryConversation( by ID: String, completion: @escaping (LCGenericResult<IMTemporaryConversation>) -> Void) throwsParameters
IDThe ID of the temporary conversation.
completionResult callback.
-
Get Temporary Conversations by ID set.
Declaration
Swift
public func getTemporaryConversations( by IDs: Set<String>, completion: @escaping (LCGenericResult<[IMTemporaryConversation]>) -> Void) throwsParameters
IDsThe set of ID string.
completioncallback.
-
General conversation query (not support temporary conversation query).
The default where constraint is {“m”: client.ID}, The default sort is -lm, The default limit is 10, The default skip is 0.
Declaration
Swift
public func findConversations(completion: @escaping (LCGenericResult<[IMConversation]>) -> Void) throwsParameters
completioncallback
-
Declaration
Swift
public override func get<T>(_ objectId: LCStringConvertible, cachePolicy: LCQuery.CachePolicy = .onlyNetwork, completionQueue: DispatchQueue = .main, completion: @escaping (LCValueResult<T>) -> Void) -> LCRequest where T : LCObject -
Declaration
Swift
public override func getFirst<T>(cachePolicy: LCQuery.CachePolicy = .onlyNetwork, completionQueue: DispatchQueue = .main, completion: @escaping (LCValueResult<T>) -> Void) -> LCRequest where T : LCObject -
Declaration
Swift
public override func count(cachePolicy: LCQuery.CachePolicy = .onlyNetwork, completionQueue: DispatchQueue = .main, completion: @escaping (LCCountResult) -> Void) -> LCRequest
View on GitHub
Install in Dash
IMConversationQuery Class Reference