• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

TypeScript firestore-types.DocumentReference类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@firebase/firestore-types.DocumentReference的典型用法代码示例。如果您正苦于以下问题:TypeScript DocumentReference类的具体用法?TypeScript DocumentReference怎么用?TypeScript DocumentReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DocumentReference类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: Program

 program(id: string) {
   return new Program(
     this,
     this.ref.collection("programs").doc(id),
     this.ref.collection("subprograms")
   );
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:7,代码来源:institution.ts


示例2: Program

 extension(id: string): Program {
   return new Program(
     this.institution,
     this.ref.collection("extensions").doc(id),
     this.subprogramsRef
   );
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:7,代码来源:program.ts


示例3: delete

 delete(): Promise<void> {
   return this.ref.delete();
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:watch.ts


示例4: sequences

 get sequences(): Observable<string[]> {
   return publishIndex(this.ref.collection("sequences"));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例5: Sequence

 sequence(id: string) {
   return new Sequence(this.ref.collection("sequences").doc(id));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例6: Course

 course(id: string) {
   return new Course(this, this.ref.collection("courses").doc(id));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例7: watches

 get watches(): Observable<string[]> {
   return publishIndex(this.ref.collection("watches"));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例8: Watch

 watch(id: string) {
   return new Watch(this.ref.collection("watches").doc(id));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例9: programs

 get programs(): Observable<string[]> {
   return publishIndex(this.ref.collection("programs"));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:institution.ts


示例10: Term

 term(id: string) {
   return new Term(this.ref.collection("terms").doc(id));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:course.ts


示例11: extensions

 get extensions(): Observable<string[]> {
   return publishIndex(this.ref.collection("extensions"));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:program.ts


示例12: Section

 section(id: string) {
   return new Section(this.ref.collection("sections").doc(id));
 }
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:3,代码来源:term.ts


示例13:

 const observable = Observable.create(observer =>
   ref.onSnapshot(observer)
开发者ID:kevmo314,项目名称:canigraduate.uchicago.edu,代码行数:2,代码来源:publishDocument.ts


示例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);
 }
开发者ID:acipher,项目名称:angularfire2,代码行数:11,代码来源:document.ts


示例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);
 }
开发者ID:acipher,项目名称:angularfire2,代码行数:7,代码来源:document.ts


示例16: set

 /**
  * Create or overwrite a single document.
  * @param data
  * @param options
  */
 set(data: T, options?: SetOptions): Promise<void> {
   return this.ref.set(data, options);
 }
开发者ID:acipher,项目名称:angularfire2,代码行数:8,代码来源:document.ts



注:本文中的@firebase/firestore-types.DocumentReference类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript firestore-types.Query类代码示例发布时间:2022-05-28
下一篇:
TypeScript firestore-types.CollectionReference类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap