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
LCError
Declaration
Swift
public static func and(_ queries: [IMConversationQuery]) throws -> IMConversationQuery?
Parameters
queries
An array of one or more expressions of query.
Return Value
An optional
IMConversationQuery
-
Performs a logical AND operation on self and the query.
Throws
LCError
Declaration
Swift
public func and(_ query: IMConversationQuery) throws -> IMConversationQuery?
Parameters
query
The query.
Return Value
An optional
IMConversationQuery
-
Performs a logical OR operation on an array of one or more expressions of query.
Throws
LCError
Declaration
Swift
public static func or(_ queries: [IMConversationQuery]) throws -> IMConversationQuery?
Parameters
queries
An array of one or more expressions of query.
Return Value
An optional
IMConversationQuery
-
Performs a logical OR operation on self and the query.
Throws
LCError
Declaration
Swift
public func or(_ query: IMConversationQuery) throws -> IMConversationQuery?
Parameters
query
The 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) throws
Parameters
ID
The ID of the conversation.
completion
callback.
-
Get Conversations by ID set.
Declaration
Swift
public func getConversations( by IDs: Set<String>, completion: @escaping (LCGenericResult<[IMConversation]>) -> Void) throws
Parameters
IDs
The set of ID string.
completion
callback.
-
Get Temporary Conversation by ID.
Declaration
Swift
public func getTemporaryConversation( by ID: String, completion: @escaping (LCGenericResult<IMTemporaryConversation>) -> Void) throws
Parameters
ID
The ID of the temporary conversation.
completion
Result callback.
-
Get Temporary Conversations by ID set.
Declaration
Swift
public func getTemporaryConversations( by IDs: Set<String>, completion: @escaping (LCGenericResult<[IMTemporaryConversation]>) -> Void) throws
Parameters
IDs
The set of ID string.
completion
callback.
-
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) throws
Parameters
completion
callback
-
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