Update README.md

肖熠 2021-08-31 14:50:05 +08:00
parent ac598cbd0c
commit 9233edb971
1 changed files with 3 additions and 6 deletions

View File

@ -243,15 +243,12 @@ foreach(var gameSave in collection){
} }
``` ```
### 查询当前用户存档 ### 查询云存档
云存档只能查询当前用户的所有存档,需要查询该用户的特定存档时,可以增加相应过滤,可参考 [查询条件](https://developer.taptap.com/docs/sdk/storage/guide/objc/#%E6%9F%A5%E8%AF%A2%E6%9D%A1%E4%BB%B6)
我们使用 `LCQuery` 来查询当前用户的云存档。
SDK 查询封装了一个限定方法用于查询当前`TDSUser`的云存档。
```c# ```c#
TDSUser user = await TDSUser.GetCurrent(); TDSUser user = await TDSUser.GetCurrent();
LCQuery<TapGameSave> gameSaveQuery = TapGameSave.GetQueryWithUser(user); LCQuery<TapGameSave> gameSaveQuery = TapGameSave.GetQueryWithUser(user);
// 查询 Name 为 TDSUser_GameSave_Name 的云存档 // 查询 Name 为 TDSUser_GameSave_Name 的云存档
gameSaveQuery.WhereEqualTo("name","TDSUser_GameSave_Name"); gameSaveQuery.WhereEqualTo("name","TDSUser_GameSave_Name");
var collection = await gameSaveQuery.Find(); var collection = await gameSaveQuery.Find();
``` ```