LCLiveQueryDelegate
Objective-C
@protocol LCLiveQueryDelegate <NSObject>
Swift
protocol LCLiveQueryDelegate : NSObjectProtocol
Protocol of delegate that receives live query notifications.
-
Called when an object created and it matches the query.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery objectDidCreate:(nonnull id)object;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, objectDidCreate object: Any)
Parameters
liveQuery
The live query object.
object
The object that matches live query.
-
Called when an object updated and it matches the query.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery objectDidUpdate:(nonnull id)object updatedKeys:(nonnull NSArray<NSString *> *)updatedKeys;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, objectDidUpdate object: Any, updatedKeys: [String])
Parameters
liveQuery
The live query object.
object
The object that matches live query.
updatedKeys
The updated keys.
-
Called when an object deleted and it matches the query.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery objectDidDelete:(nonnull id)object;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, objectDidDelete object: Any)
Parameters
liveQuery
The live query object.
object
The object that matches live query.
-
Called when an object matches query after updated.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery objectDidEnter:(nonnull id)object updatedKeys:(nonnull NSArray<NSString *> *)updatedKeys;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, objectDidEnter object: Any, updatedKeys: [String])
Parameters
liveQuery
The live query object.
object
The object that matches live query.
-
Called when an object mismatches query after updated.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery objectDidLeave:(nonnull id)object updatedKeys:(nonnull NSArray<NSString *> *)updatedKeys;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, objectDidLeave object: Any, updatedKeys: [String])
Parameters
liveQuery
The live query object.
object
The object that matches live query.
-
Called when an user did login and who matches the query.
Declaration
Objective-C
- (void)liveQuery:(nonnull LCLiveQuery *)liveQuery userDidLogin:(nonnull LCUser *)user;
Swift
optional func liveQuery(_ liveQuery: LCLiveQuery, userDidLogin user: LCUser)
Parameters
liveQuery
The live query object.
user
The user who did login.