A,B和C点的读取成本是多少?是否始终是1读,或者在任何情况下都不会发生读?
dsnap, err := docRef.Get(ctx)
if status.Code(err) == codes.NotFound {
return nil, ErrNotFound // Point A
}
if err != nil {
return nil, err // Point B
}
// Point C
最佳答案
根据documentation on pricing:
查询的最低费用
您每次查询至少要读取一份文档
执行,即使查询没有返回结果。
这表明,每次调用Get
时,如果请求到达服务器,则将花费1读取。这实质上是使用可大规模扩展的Firestore索引的成本。
关于go - 在Firestore中找不到docRef.Get(ctx)的读取成本是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61641099/