本文整理汇总了TypeScript中@firebase/firestore-types.DocumentReference类的典型用法代码示例。如果您正苦于以下问题:TypeScript DocumentReference类的具体用法?TypeScript DocumentReference怎么用?TypeScript DocumentReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DocumentReference类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Program
program(id: string) {
return new Program(
this,
this.ref.collection("programs").doc(id),
this.ref.collection("subprograms")
);
}
示例2: Program
extension(id: string): Program {
return new Program(
this.institution,
this.ref.collection("extensions").doc(id),
this.subprogramsRef
);
}
示例3: delete
delete(): Promise<void> {
return this.ref.delete();
}
示例4: sequences
get sequences(): Observable<string[]> {
return publishIndex(this.ref.collection("sequences"));
}
示例5: Sequence
sequence(id: string) {
return new Sequence(this.ref.collection("sequences").doc(id));
}
示例6: Course
course(id: string) {
return new Course(this, this.ref.collection("courses").doc(id));
}
示例7: watches
get watches(): Observable<string[]> {
return publishIndex(this.ref.collection("watches"));
}
示例8: Watch
watch(id: string) {
return new Watch(this.ref.collection("watches").doc(id));
}
示例9: programs
get programs(): Observable<string[]> {
return publishIndex(this.ref.collection("programs"));
}
示例10: Term
term(id: string) {
return new Term(this.ref.collection("terms").doc(id));
}
示例11: extensions
get extensions(): Observable<string[]> {
return publishIndex(this.ref.collection("extensions"));
}
示例12: Section
section(id: string) {
return new Section(this.ref.collection("sections").doc(id));
}
示例13:
const observable = Observable.create(observer =>
ref.onSnapshot(observer)
示例14: associateQuery
/**
* Create a reference to a sub-collection given a path and an optional query
* function.
* @param path
* @param queryFn
*/
collection<T>(path: string, queryFn?: QueryFn): AngularFirestoreCollection<T> {
const collectionRef = this.ref.collection(path);
const { ref, query } = associateQuery(collectionRef, queryFn);
return new AngularFirestoreCollection<T>(ref, query, this.afs);
}
示例15: update
/**
* Update some fields of a document without overwriting the entire document.
* @param data
*/
update(data: Partial<T>): Promise<void> {
return this.ref.update(data);
}