我想知道functions.database.refbuilder的onOperation方法是为了什么,因为在 documentation.
从看 code of onOperations 在 firebase-functions repo 看来 onOperation 是所有其他方法调用的通用方法。
onOperations
firebase-functions
onOperation
例如,下面是 onDelete :
onDelete
onDelete( handler: (user: UserRecord, context: EventContext) => PromiseLike<any> | any ): CloudFunction<UserRecord> { return this.onOperation(handler, 'user.delete'); }
所以这个(以及所有其他 on... 方法调用 操作中 对于它的实际工作,由于这些方法的实现有很多重叠。
on...
操作中
我真的不知道为什么 操作中 显示在“自动完成”中,因为它明显标记为 private 方法:
private
private onOperation(...