TransactionOptions

用于创建新交易的选项。

JSON 表示
{

  // Union field mode can be only one of the following:
  "readOnly": {
    object (ReadOnly)
  },
  "readWrite": {
    object (ReadWrite)
  }
  // End of list of possible types for union field mode.
}
领域
联盟场mode 。交易方式。 mode只能是以下之一:
readOnly

object ( ReadOnly )

该事务只能用于读操作。

readWrite

object ( ReadWrite )

该事务可用于读取和写入操作。

只读

只能用于读取文档的事务选项。

JSON 表示
{

  // Union field consistency_selector can be only one of the following:
  "readTime": string
  // End of list of possible types for union field consistency_selector.
}
领域
联合字段consistency_selector 。此事务的一致性模式。如果不设置,默认为强一致性。 consistency_selector只能是以下之一:
readTime

string ( Timestamp format)

在给定时间阅读文档。

这必须是过去一小时内的微秒精度时间戳,或者如果启用了时间点恢复,则还可以是过去 7 天内的整分钟时间戳。

RFC3339 UTC“Zulu”格式的时间戳,具有纳秒分辨率和最多九个小数位。示例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

读写

可用于读取和写入文档的事务选项。

Firestore 不允许第 3 方身份验证请求创建读写。交易。

JSON 表示
{
  "retryTransaction": string
}
领域
retryTransaction

string ( bytes format)

要重试的可选事务。

Base64 编码的字符串。