2.x -> 3.x 迁移指南
Last updated
Was this helpful?
Last updated
Was this helpful?
由 v1.x 直接迁移至 v3.x,请先查看
查询和批量操作方法默认不返回 total_count
(v3.x 之前的版本默认返回), 这样可以显著提高接口的响应速度,如果需要 total_count
,可以设置参数 withCount
为 true
。 另外,推荐使用 count
方法来获取数据的总数。
受影响的接口:
BaaS.TableRecord#update(options)
BaaS.TableRecord#delete(options)
BaaS.TableObject#find(options)
BaaS.User#find(options)
BaaS.ContentGroup#find(options)
BaaS.FileCategory#find(options)
BaaS.File#find(options)
新增 count 接口:
BaaS.TableObject#count()
BaaS.User#count()
BaaS.ContentGroup#count()
支持自定义域名
v3.x 支持在 SDK init(clientID)的时候,指定接口的域名,例如:
需要先在控制台配置自定义域名
支持 TypeScript 与自动补全
SDK v3.x 提供了 baas.d.ts 类型定义文件, 可以在微信开发者工具与 vscode(或其他支持使用 *.d.ts
文件做类型提示的开发工具)中更好地使用知晓云 SDK 进行开发。
BaaS.FileCategory#count()
BaaS.File#count()
具体使用方式,请查看