iOS swift中字段值递增Firestore的语法是什么? [英] what is the syntax for field value increment Firestore in iOS swift?

查看:58
本文介绍了iOS swift中字段值递增Firestore的语法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Firestore中的字段值增量来更新字段

I need to update a field using Field Value increment in firestore

在Android中,我可以使用以下语法:

in Android I can use this syntax:

FieldValue.increment(1)

在后端,我可以使用它:

in the backend, I can use this:

admin.firestore.FieldValue.increment(1)

我试图用Google搜索它,但是找不到有关此增量功能的文档.所以我需要知道iOS(swift)的增量语法

I have tried to google it, but I can't find the documentation about this increment feature. so I need to know the increment syntax for iOS (swift)

推荐答案

FieldValue.increment(Int64(1))

有关FieldValue.increment() Firebase文档.

这篇关于iOS swift中字段值递增Firestore的语法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆