147 Commits

Author SHA1 Message Date
  daiyujia ef99450b6f
!121511 merge master into master 1 day ago
  hu-zhishan 7e59963d00
!121640 merge refs/merge-requests/121640/head into master 1 day ago
  chinese-deer 3f14cd7a85
!121567 merge master into master 1 day ago
  ajajaaj10241 060899591e
!120732 merge deprecated into master 1 day ago
  zyn_1 4b8465c07c
!121617 merge master into master 1 day ago
  yangsanjin1 61aa10659b
!121549 merge master into master 1 day ago
  hu-zhishan 0ad6f0454a
修改部分字词 1 day ago
  chendongqi 40883697f4
!121023 merge deleteBackward1211 into master 1 day ago
  nicholaszc 0a7b113568
!121176 merge master_bak2 into master 1 day ago
  whGitContainer2 e092bb152e
!121535 merge master into master 1 day ago
  qq_34582685 af18dad233
!120677 merge master into master 1 day ago
  hu-zhishan 2a9c17b326
!121601 merge refs/merge-requests/121601/head into master 1 day ago
  liuyongkai2 4c74ad370b
!120977 merge 2dxiugai into master 1 day ago
  Malzahar a93d2fa865
!121527 merge addtreesetDoc into master 1 day ago
  zyn_1 5fa5cb977c
修改制表符 1 day ago
  zhou_ting_yue a2afe232f5
!121528 merge master into master 1 day ago
  lvzhenjie 907d04169a
!120905 merge master into master 1 day ago
  yangsanjin1 556a2d12c0 修改系统能力判断描述 1 day ago
  hu-zhishan 3d4ce4db65
修改部分字词 1 day ago
  zyn_1 a61c6b29ce
!121334 merge master into master 1 day ago
  xuerunlong b737d48fe5
!121551 merge 1215m into master 1 day ago
  sincexex 395c2f75e7
!121525 merge master into master 1 day ago
  charminglzt 8c331b5f16
!120811 merge master into master 1 day ago
  ningningW de34b38ec2
!121288 merge master into master 1 day ago
  CuiShhhhhhhh d779702b6e
!121224 merge master into master 1 day ago
  hu-zhishan ca2f8a7dc3
!121582 merge PR121500 into master 1 day ago
  baozewei 17c7b6a1b2
!120926 merge master into master 1 day ago
  gan-chuantao c3bdf0c2b0
!121226 merge master into master 1 day ago
  xieziang 10fb55413a
!119782 merge fix_chipgroup_unit_1205 into master 1 day ago
  xupeipei123 28dab8c5dd
!121514 merge master into master 1 day ago
  openharmony-docs-bot 7b19d0a78c
!121433 merge feature/auto-commit-1765610060 into master 1 day ago
  xieziang cd774343cb
!119890 merge add_chip_fontsize_1205 into master 1 day ago
  hu-zhishan 3a9e444220 update docs 1 day ago
  hu-zhishan 3e74d0d8e2 update docs 1 day ago
  zph000 6046ef197c
!121396 merge master into master 1 day ago
  chinese-deer e8099f7feb Merge branch 'master' of gitcode.com:chinese-deer/docs_20251118 1 day ago
  chinese-deer 5ab4c0305d add errCode 1 day ago
  xupeipei123 96845cd4ba
修改标记语言 1 day ago
  javafreemanbao 9e2a5b8af4
!118968 merge compress_punctuation into master 1 day ago
  xuerunlong 643e95756d
update: 更新文件 errorcode-DistributedSchedule.md 1 day ago
  zph000 584747e35c update 4 days ago
  daiyujia 06c3ed00a0 IssueNo:#95983 2 days ago
  openharmony-docs-bot 44177433c4
!121144 merge feature/auto-commit-1765458021 into master 1 day ago
  duanshaofei 93cb562f6e
!121183 merge autofill1212 into master 1 day ago
  lvzhenjie addc77ff4d
update: 更新文件 js-apis-file-backup-sys.md 1 day ago
  fang-jinxu f6cfd61974
!121556 merge refs/merge-requests/121556/head into master 1 day ago
  lianyuanqi d6e3830f95
!119651 merge useragent into master 1 day ago
  fang-jinxu 9f609b5fe1
修改断链 1 day ago
  xuerunlong 84e91ce34c 删除废弃错误码 1 day ago
  yangsanjin1 982096d07f 修改系统能力判断描述 1 day ago
  wusongqing a2ae42dd8a
!121512 merge TR-media-mater into master 2 days ago
  wusongqing e43850a757
!121519 merge TR-Ability-master into master 2 days ago
  fang-jinxu b3aa9c28f0
!121536 merge refs/merge-requests/121536/head into master 2 days ago
  z30034863 af56621ceb Merge remote-tracking branch 'upstream/master' 4 days ago
  wangchun410 eb6e3d736a
!121180 merge master into master 2 days ago
  lvzhenjie ce96f5e9d5
update: 更新文件 file-persistPermission.md 2 days ago
  王子睿 7e7d51f80a fix container-object.md 2 days ago
  fang-jinxu a90ef866a8
修改断链 2 days ago
  whGitContainer2 ee9b5bcbb6
补充依赖、模块定义 2 days ago
  zyn_1 4355f0768b
修改 2 days ago
  Eternal_Pursuit c727391933
!121162 merge master into master 2 days ago
  KejiePeng 4f7d33408e
!120100 merge master_change_log into master 2 days ago
  xupeipei123 554e11882b
修改错误 2 days ago
  wanghanghui 65de4d9c18
!120594 merge master into master 2 days ago
  zhaoyixin1998 2a7a486fbc
!120893 merge master into master 2 days ago
  Li-y ef5fef619d
!121232 merge master into master 2 days ago
  sephyrothcloud cdc9ee8313
!120753 merge master into master 2 days ago
  zhou_ting_yue da077f8f83 文档错误描述修改。 2 days ago
  sincexex 6a1fb3665f Update docs 2 days ago
  guojin26 728c35796d
!121500 merge master into master 2 days ago
  wangchun410 ede447d663
add ohos.permission.GET_DONOTDISTURB_STATE 2 days ago
  chinese-deer 0cc0159b2f
!121486 merge master into master 2 days ago
  RingoSong a4397c0239
!120259 merge master into master 2 days ago
  RingoSong c1869db0c7
数字信封&&资料修改 2 days ago
  openharmony-docs-bot b30ea32ca8 update: zh-cn/application-dev/security/UserAuthenticationKit/obtain-auth-lock-state-capabilities.md 4 days ago
  foryourself 6851d3abe4
!121491 merge master into master 2 days ago
  fang-jinxu 3ac3d0832a
!121499 merge refs/merge-requests/121499/head into master 2 days ago
  Gloria 7dd6f12adf Update docs 2 days ago
  Gloria 1b09aa2987 Update docs 2 days ago
  xupeipei123 1ca7c1fb1b
添加标记语言 2 days ago
  Cuecuexiaoyu 70236b4c23 write counter and segmentButton docs 3 weeks ago
  z1007019306 74173e03ee
!121179 merge master into master 2 days ago
  piggyguy 9f6f28de4a
!120847 merge master into master 2 days ago
  guojin26 a8f33fad7a
update: 更新文件 js-apis-inputmethodengine.md 2 days ago
  fang-jinxu f415096748
修改断链 2 days ago
  guojin26 5b6e6f3775 角标问题修复 2 days ago
  Cuecuexiaoyu 8ee86a35d6
!120714 merge env-1208-1 into master 2 days ago
  foryourself 18b92b8e88 添加nocheck标签 2 days ago
  openharmony-docs-bot cb67af05ee
!120367 merge feature/auto-commit-1765250160 into master 2 days ago
  openharmony-docs-bot 8126fdfc31
!120686 merge feature/auto-commit-1765339380 into master 2 days ago
  foryourself 9ecfe72741 门禁检查项及处理方式 2 days ago
  ran-zhao-yu 91120d9624
!120675 merge master into master 2 days ago
  chinese-deer 7d3e1b55af fix import failed 2 days ago
  liuyongkai2 888796f66c 2d文档修改11 5 days ago
  openharmony-docs-bot 56ce63f7e1
Auto commit by bot 3 days ago
  KejiePeng 8336fb4bd2 remove 不再支持 4 days ago
  wanghanghui 18d2ae2e8a 新增告警抑制注解 1 week ago
  FreemanBao db214439de 【RichEditor】新增compressLeadingPunctuation接口 6 days ago
  z30034863 a038d8dd2d add error message 1210 1 week ago
  KejiePeng 6df853b66c hyphen changelog 1 week ago
  hu-zhishan 70f4f990eb !121077 merge PR121100 into master 4 days ago
  lvzhenjie ea3efb37b9
update: 更新文件 js-apis-file-backup-sys.md 4 days ago
  zyn_1 d3ff9becef
update: 更新文件 ohos-atomicservice-HalfScreenLaunchComponent.md 4 days ago
  lvzhenjie 31132c0459
update: 更新文件 js-apis-file-backup-sys.md 4 days ago
  xieziang 43fad1c73d add unit for ChipGroupPadding 1 week ago
  zhaoyixin1998 61cab23675 无障碍资料修改 6 days ago
  zyn_1 c8a4daa8ba
修改目检错误 4 days ago
  赵聪 8cfd80b03c 去掉- 4 days ago
  木子李 59aa1efc9b fix docs 5 days ago
  gan-chuantao 52776eb6fd
修复错误链接 4 days ago
  ningningW 2b6687d996
update: 更新文件 resource-categories-and-access.md 4 days ago
  Eternal_Pursuit 7005be8803 增加getAuthLockState接口的开发指南 5 days ago
  CuiShhhhhhhh 3029b9a4f4
错别字修改B 4 days ago
  z1007019306 1f2ea94b4e
update: 更新文件 js-apis-socket.md 5 days ago
  gan-chuantao 6e0bd502a1
修改跳转链接错误 5 days ago
  lvzhenjie ab78d6479f
update: 更新文件 js-apis-file-backup-sys.md 5 days ago
  CuiShhhhhhhh c1f1cf2373
错别字修改B 5 days ago
  z1007019306 8eb8255a2a
update: 更新文件 js-apis-socket.md 5 days ago
  z1007019306 417944a31f
update: 更新文件 js-apis-socket.md 5 days ago
  赵聪 173b5458b5 删除废弃指南 5 days ago
  lvzhenjie b61dc36dbc
update: 更新文件 js-apis-file-backup-sys.md 5 days ago
  lvzhenjie 45610b0b79
sdk一致化修改 5 days ago
  duanshaofei 8e4a306585 autofill text 5 days ago
  wangchun410 f987b3c868
add ohos.permission.GET_DONOTDISTURB_STATE 5 days ago
  赵聪 b5ab23f70a 废弃时指明指南 5 days ago
  z1007019306 536859fac7
证书链 5 days ago
  赵聪 6a337f6511 废弃时指明指南 5 days ago
  赵聪 19b7ae66f7 windowExtensionAbility废弃修改 5 days ago
  openharmony-docs-bot cee67e5895
Auto commit by bot 5 days ago
  piggyguy 694372e44c optimize component visibility management 6 days ago
  ranzhaoyutu fe35d24fcf add ACCESS_ANCO_APP_DATA permission 1 week ago
  chendongqi 8d979886b8 修复接口描述 5 days ago
  openharmony-docs-bot 230fd91046
update: zh-cn/application-dev/ui/state-management/arkts-new-binding.md 5 days ago
  openharmony-docs-bot 9dbea18957
update: zh-cn/application-dev/ui/state-management/arkts-new-binding.md 5 days ago
  baozewei e1a5b3211e 修改错误码大小写 Signed-off-by:baozewei@huawei.com 6 days ago
  lvzhenjie e0d2ea0bd8
授权持久化描述优化 6 days ago
  lvzhenjie f7b1eaba25
单词拼写错误修改 6 days ago
  李虎R 2c308413ec delete acl property 6 days ago
  李虎R 635798de48 修改LOAD_INDEPENDENT_LIBRARY可见范围 6 days ago
  haoxiaohui df7a029894 修改单词错误拼写 6 days ago
  openharmony-docs-bot be7522bf33
update: zh-cn/application-dev/ui/state-management/arkts-new-binding.md 6 days ago
  openharmony-docs-bot cd357e36b5
Auto commit by bot 1 week ago
  openharmony-docs-bot f5c41efefa
Auto commit by bot 1 week ago
  Cuecuexiaoyu d7a38108ed add code cases 1 week ago
  KejiePeng 411110ecc1 Merge branch 'master' of gitcode.com:openharmony/docs into master_change_log 1 week ago
  KejiePeng 342de0ec49 hyphen changelog 1 week ago
  lianyuanqi e965f3aa6b 文档优化 1 week ago
100 changed files with 1135 additions and 1013 deletions
Split View
  1. +27
    -27
      en/application-dev/application-models/hop-multi-device-collaboration.md
  2. +2
    -0
      en/application-dev/database/Readme-EN.md
  3. +18
    -21
      en/application-dev/database/access-control-by-device-and-data-level.md
  4. +6
    -6
      en/application-dev/database/data-backup-and-restore.md
  5. +3
    -3
      en/application-dev/database/data-encryption.md
  6. +1
    -1
      en/application-dev/database/data-mgmt-overview.md
  7. +38
    -22
      en/application-dev/database/data-persistence-by-preferences.md
  8. +11
    -9
      en/application-dev/database/data-persistence-by-rdb-store.md
  9. +77
    -79
      en/application-dev/database/data-persistence-by-vector-store.md
  10. +11
    -15
      en/application-dev/database/data-sync-of-distributed-data-object.md
  11. +6
    -6
      en/application-dev/database/data-sync-of-rdb-store.md
  12. +104
    -63
      en/application-dev/database/encrypted_estore_guidelines.md
  13. +8
    -10
      en/application-dev/database/native-access-control-by-device-and-data-level.md
  14. +3
    -3
      en/application-dev/database/native-backup-and-restore.md
  15. +71
    -67
      en/application-dev/database/native-data-encryption.md
  16. +5
    -5
      en/application-dev/database/native-relational-store-guidelines.md
  17. +137
    -79
      en/application-dev/database/native-vector-store-guidelines.md
  18. +1
    -1
      en/application-dev/database/share-data-by-silent-access-sys.md
  19. +1
    -1
      en/application-dev/database/uniform-data-type-list.md
  20. +4
    -4
      en/application-dev/media/media/using-ndk-avrecorder-for-audio-recording.md
  21. +4
    -4
      en/application-dev/media/media/using-ndk-avrecorder-for-video-recording.md
  22. +1
    -1
      en/application-dev/media/media/using-ndk-lpp-for-playback.md
  23. +4
    -4
      en/application-dev/media/medialibrary/movingphotoview-guidelines.md
  24. +4
    -2
      en/application-dev/media/medialibrary/photoAccessHelper-photoviewpicker.md
  25. +1
    -1
      en/application-dev/media/medialibrary/photoAccessHelper-preparation.md
  26. +3
    -3
      en/application-dev/reference/apis-ability-kit/js-apis-app-ability-appRecovery.md
  27. +2
    -2
      en/application-dev/reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md
  28. +12
    -1
      en/application-dev/reference/apis-ability-kit/js-apis-inner-wantAgent-wantAgentInfo-sys.md
  29. +8
    -11
      en/application-dev/reference/apis-ability-kit/js-apis-inner-wantAgent-wantAgentInfo.md
  30. +1
    -1
      en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-RdbPredicates.md
  31. +7
    -7
      en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md
  32. +4
    -4
      en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-Transaction.md
  33. +1
    -1
      en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-i.md
  34. +1
    -1
      en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-t.md
  35. +20
    -20
      en/application-dev/reference/apis-arkdata/capi-data-asset-h.md
  36. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-oh-cursor-h.md
  37. +25
    -25
      en/application-dev/reference/apis-arkdata/capi-oh-data-value-h.md
  38. +5
    -5
      en/application-dev/reference/apis-arkdata/capi-oh-data-values-buckets-h.md
  39. +27
    -27
      en/application-dev/reference/apis-arkdata/capi-oh-data-values-h.md
  40. +5
    -5
      en/application-dev/reference/apis-arkdata/capi-oh-predicates-h.md
  41. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-oh-preferences-err-code-h.md
  42. +27
    -27
      en/application-dev/reference/apis-arkdata/capi-oh-preferences-h.md
  43. +7
    -7
      en/application-dev/reference/apis-arkdata/capi-oh-preferences-option-h.md
  44. +7
    -7
      en/application-dev/reference/apis-arkdata/capi-oh-preferences-value-h.md
  45. +11
    -11
      en/application-dev/reference/apis-arkdata/capi-oh-rdb-crypto-param-h.md
  46. +16
    -16
      en/application-dev/reference/apis-arkdata/capi-oh-rdb-transaction-h.md
  47. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-oh-rdb-types-h.md
  48. +4
    -4
      en/application-dev/reference/apis-arkdata/capi-oh-values-bucket-h.md
  49. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferences.md
  50. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencesoption.md
  51. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencespair.md
  52. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencesvalue.md
  53. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-data-asset.md
  54. +16
    -16
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-cursor.md
  55. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-value.md
  56. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-values.md
  57. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-vbuckets.md
  58. +25
    -25
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-predicates.md
  59. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-config.md
  60. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-configv2.md
  61. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-cryptoparam.md
  62. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-store.md
  63. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-transaction.md
  64. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-transoptions.md
  65. +9
    -9
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-vbucket.md
  66. +6
    -6
      en/application-dev/reference/apis-arkdata/capi-rdb-oh-vobject.md
  67. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-changeinfo.md
  68. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-dataobserver.md
  69. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-distributedconfig.md
  70. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-keydata.md
  71. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-keyinfo.md
  72. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-progressdetails.md
  73. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-progressobserver.md
  74. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-statistic.md
  75. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-subscribecallback.md
  76. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-rdb-rdb-tabledetails.md
  77. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-relational-store-error-code-h.md
  78. +100
    -100
      en/application-dev/reference/apis-arkdata/capi-relational-store-h.md
  79. +2
    -2
      en/application-dev/reference/apis-arkdata/capi-udmf-err-code-h.md
  80. +93
    -93
      en/application-dev/reference/apis-arkdata/capi-udmf-h.md
  81. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmf-progressinfo.md
  82. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdata.md
  83. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdataloadinfo.md
  84. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdataloadparams.md
  85. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfgetdataparams.md
  86. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfoptions.md
  87. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfproperty.md
  88. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfrecord.md
  89. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfrecordprovider.md
  90. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsappitem.md
  91. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsarraybuffer.md
  92. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udscontentform.md
  93. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsdetails.md
  94. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsfileuri.md
  95. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udshtml.md
  96. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udshyperlink.md
  97. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udspixelmap.md
  98. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsplaintext.md
  99. +1
    -1
      en/application-dev/reference/apis-arkdata/capi-udmf-oh-utd.md
  100. +87
    -87
      en/application-dev/reference/apis-arkdata/capi-uds-h.md

+ 27
- 27
en/application-dev/application-models/hop-multi-device-collaboration.md View File

@@ -136,36 +136,36 @@ On device A, touch the **Start** button provided by the initiator application to
struct Page_CollaborateAbility {
private context = this.getUIContext().getHostContext() as common.UIAbilityContext;
build() {
Column() {
//...
List({ initialIndex: 0 }) {
Row() {
Column() {
//...
ListItem() {
Row() {
//...
}
.onClick(() => {
let want: Want = {
deviceId: getRemoteDeviceId(),
bundleName: 'com.samples.stagemodelabilityinteraction',
abilityName: 'CollaborateAbility',
moduleName: 'entry', // moduleName is optional.
};
// context is the AbilityContext of the initiator UIAbility.
this.context.startAbility(want).then(() => {
promptAction.openToast({
message: 'SuccessfulCollaboration'
List({ initialIndex: 0 }) {
//...
ListItem() {

Button('test').onClick(() => {
let want: Want = {
deviceId: getRemoteDeviceId(),
bundleName: 'com.samples.stagemodelabilityinteraction', // Replace the bundle name and page name with those of the local application.
abilityName: 'CollaborateAbility',
moduleName: 'entry', // moduleName is optional.
};
// context is the AbilityContext of the initiator UIAbility.
this.context.startAbility(want).then(() => {
promptAction.openToast({
message: 'SuccessfulCollaboration'
});
}).catch((err: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, `startAbility err: ` + JSON.stringify(err));
});
}).catch((err: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, `startAbility err: ` + JSON.stringify(err));
});
})
})
}
//...
}
//...
}
//...
}
//...
}
}
```
@@ -297,7 +297,7 @@ On device A, touch the Start button provided by the initiator application to sta
.onClick(() => {
let want: Want = {
deviceId: getRemoteDeviceId(),
bundleName: 'com.samples.stagemodelabilityinteraction',
bundleName: 'com.samples.stagemodelabilityinteraction', // Replace the bundle name and page name with those of the local application.
abilityName: 'ServiceExtAbility',
moduleName: 'entry', // moduleName is optional.
};
@@ -422,7 +422,7 @@ On device A, touch the Start button provided by the initiator application to sta
.onClick(() => {
let want: Want = {
deviceId: getRemoteDeviceId(),
bundleName: 'com.samples.stagemodelabilityinteraction',
bundleName: 'com.samples.stagemodelabilityinteraction', // Replace the bundle name and page name with those of the local application.
abilityName: 'CollaborateAbility',
moduleName: 'entry', // moduleName is optional.
};
@@ -479,7 +479,7 @@ A system application can connect to a service on another device by calling [conn
3. (Optional) [Implement a background service](serviceextensionability-sys.md#implementing-a-background-service-for-system-applications-only). Perform this operation only if no background service is available. This operation is available only for system applications.

4. Connect to the background service.
- Implement the **IAbilityConnection** class. **IAbilityConnection** provides the following callbacks that you should implement: [onConnect()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#connectoptions-1), [onDisconnect()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#connectoptions-1), and [onFailed()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#connectoptions-1). The **onConnect()** callback is invoked when a service is connected, **onDisconnect()** is invoked when a service is unexpectedly disconnected, and **onFailed()** is invoked when the connection to a service fails.
- Implement the **AbilityConnection** API. **AbilityConnection** provides the following callbacks that you should implement: [onConnect()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#onconnect), [onDisconnect()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#ondisconnect), and [onFailed()](../reference/apis-ability-kit/js-apis-inner-ability-connectOptions.md#onfailed). The **onConnect()** callback is invoked when a service is connected, **onDisconnect()** is invoked when a service is unexpectedly disconnected, and **onFailed()** is invoked when the connection to a service fails.
- Set the target component parameters, including the target device ID, bundle name, and ability name.
- Call **connectServiceExtensionAbility()** to initiate a connection.
- Receive the service handle returned by the target device when the connection is successful.
@@ -570,7 +570,7 @@ A system application can connect to a service on another device by calling [conn
.onClick(() => {
let want: Want = {
'deviceId': getRemoteDeviceId(),
'bundleName': 'com.samples.stagemodelabilityinteraction',
'bundleName': 'com.samples.stagemodelabilityinteraction', // Replace the bundle name and page name with those of the local application.
'abilityName': 'ServiceExtAbility'
};
// The ID returned after the connection is set up must be saved. The ID will be passed for service disconnection.


+ 2
- 0
en/application-dev/database/Readme-EN.md View File

@@ -29,6 +29,8 @@
- [Cross-Device Sync of KV Stores (ArkTS)](data-sync-of-kv-store.md)
- [Cross-Device Sync of RDB Stores (ArkTS)](data-sync-of-rdb-store.md)
- [Cross-Device Sync of Distributed Data Objects (ArkTS)](data-sync-of-distributed-data-object.md)
<!--RP1-->
<!--RP1End-->
- Data Reliability and Security<!--data-reliability-security-->
- [Data Reliability and Security Overview](data-reliability-security-overview.md)
- [Database Backup and Restore (ArkTS)](data-backup-and-restore.md)


+ 18
- 21
en/application-dev/database/access-control-by-device-and-data-level.md View File

@@ -173,28 +173,25 @@ When an RDB store is created, the **securityLevel** parameter specifies the secu
For details about the APIs, see [RDB Store](../reference/apis-arkdata/arkts-apis-data-relationalStore.md).


```ts
import { UIAbility } from '@kit.AbilityKit';
<!-- @[rdb_accessControlByDeviceAndDataLevel](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/pages/accessControlByDeviceAndDataLevel.ets) -->
``` TypeScript
import { relationalStore } from '@kit.ArkData';
import { BusinessError } from '@kit.BasicServicesKit';

export default class EntryAbility extends UIAbility {
async onCreate(): Promise<void> {
let store: relationalStore.RdbStore | undefined = undefined;
let context = this.context;

try {
const STORE_CONFIG: relationalStore.StoreConfig = {
name: 'RdbTest.db',
securityLevel: relationalStore.SecurityLevel.S3
};
store = await relationalStore.getRdbStore(context, STORE_CONFIG);
console.info('Succeeded in getting RdbStore.')
} catch (e) {
const err = e as BusinessError;
console.error(`Failed to get RdbStore. Code:${err.code}, message:${err.message}`);
}

let store: relationalStore.RdbStore | undefined = undefined;
let context = getContext();

export async function accessControlByDeviceAndDataLevel() {
try {
const STORE_CONFIG: relationalStore.StoreConfig = {
name: 'RdbTest.db',
// Set the security level of the RDB store to S3.
securityLevel: relationalStore.SecurityLevel.S3
};
store = await relationalStore.getRdbStore(context, STORE_CONFIG);
console.info('Succeeded in getting RdbStore.')
} catch (err) {
console.error(`Failed to get RdbStore. Code:${err.code}, message:${err.message}`);
}
}
```

+ 6
- 6
en/application-dev/database/data-backup-and-restore.md View File

@@ -273,7 +273,7 @@ Two backup modes are available: manual backup and automatic backup. Automatic ba

Call the [backup](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#backup) API to manually back up an RDB store. <br>Example:

<!-- @[backuprestore_TS_IncludeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[backuprestore_TS_IncludeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->

``` TypeScript
import { relationalStore } from '@kit.ArkData';
@@ -284,7 +284,7 @@ import { hilog } from '@kit.PerformanceAnalysisKit'



<!-- @[backupManually](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[backupManually](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->

``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;
@@ -366,7 +366,7 @@ If **allowRebuild** in **StoreConfig** is set to **true** before the database is

If **allowRebuild** in **StoreConfig** is not set or is set to **false**, set **allowRebuild** to **true** and open the rebuilt RDB store. <br>Example:

<!-- @[rebuildingRelationalDatabaseAbnormally](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[rebuildingRelationalDatabaseAbnormally](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->

``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;
@@ -403,7 +403,7 @@ The following example contains only the code snippet for the restore process. Th

1. An error code is thrown to indicate a database exception.

<!-- @[databaseExceptionErrorCodeThrown](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[databaseExceptionErrorCodeThrown](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
``` TypeScript
let predicates = new relationalStore.RdbPredicates('EMPLOYEE');
@@ -439,7 +439,7 @@ The following example contains only the code snippet for the restore process. Th

2. Close all opened result sets.

<!-- @[closeAllOpenResultSets](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[closeAllOpenResultSets](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
``` TypeScript
let resultSets: relationalStore.ResultSet[] = []
@@ -460,7 +460,7 @@ The following example contains only the code snippet for the restore process. Th

3. Call **restore()** to restore data.

<!-- @[invokeTheRestoreInterfaceToRestoreData](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
<!-- @[invokeTheRestoreInterfaceToRestoreData](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/backuprestore/BackupAndRestore.ets) -->
``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;


+ 3
- 3
en/application-dev/database/data-encryption.md View File

@@ -131,7 +131,7 @@ The **cryptoParam** setting involves the following scenarios:
If **cryptoParam** is not set, the default configuration is used for database encryption and decryption.


<!-- @[encryption_TS_IncludeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->
<!-- @[encryption_TS_IncludeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->

``` TypeScript
import { relationalStore } from '@kit.ArkData';
@@ -141,7 +141,7 @@ import { hilog } from '@kit.PerformanceAnalysisKit'



<!-- @[defaultConfigRdbStoreTs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->
<!-- @[defaultConfigRdbStoreTs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->

``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;
@@ -165,7 +165,7 @@ try {

If **cryptoParam** is set, the specified key and algorithm are used for database encryption and decryption.

<!-- @[customizedConfigRdbStoreTs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->
<!-- @[customizedConfigRdbStoreTs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/ets/pages/encryption/Encryption.ets) -->

``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;


+ 1
- 1
en/application-dev/database/data-mgmt-overview.md View File

@@ -42,4 +42,4 @@ The data management module includes preferences, KV data management (KV-Store),

- UDMF: defines the data standards for cross-application and cross-device data interaction, improving data interaction efficiency. The UDMF provides secure and standard data transmission channels and supports different levels of data access permissions and lifecycle management policies. It helps implement efficient data sharing across applications and devices.

- **DatamgrService**: implements sync and cross-application sharing for other components, including cross-device sync of **RelationalStore** and **KV-Store**, silent access to provider data of **DataShare**, and temporary storage of **DataObject** data.
- **DatamgrService**: implements sync and cross-application sharing for other components, including cross-device sync of **RelationalStore** and **KV-Store**, <!--RP1--><!--RP1End-->silent access to provider data of **DataShare**, and temporary storage of **DataObject** data.

+ 38
- 22
en/application-dev/database/data-persistence-by-preferences.md View File

@@ -66,7 +66,7 @@ The following table lists the APIs related to user preference persistence. For m
| API | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| getPreferencesSync(context: Context, options: Options): Preferences | Obtains a **Preferences** instance. This API returns the result synchronously. An asynchronous API is also provided. |
| putSync(key: string, value: ValueType): void | Writes data to the **Preferences** instance. This API returns the result synchronously. An asynchronous API is also provided.|
| putSync(key: string, value: ValueType): void | Writes data to the **Preferences** instance. You can use **flush()** to persist the **Preferences** instance data. This API returns the result synchronously. An asynchronous API is also provided.|
| hasSync(key: string): boolean | Checks whether the **Preferences** instance contains the KV pair with the given key. The value **true** means the instance contains the KV pair; the value **false** means the opposite. The key cannot be empty. This API returns the result synchronously. An asynchronous API is also provided.|
| getSync(key: string, defValue: ValueType): ValueType | Obtains the value of the specified key. If the value is null or not of the default value type, **defValue** is returned. This API returns the result synchronously. An asynchronous API is also provided.|
| deleteSync(key: string): void | Deletes a KV pair from the **Preferences** instance. This API returns the result synchronously. An asynchronous API is also provided.|
@@ -93,7 +93,8 @@ The following table lists the APIs related to user preference persistence. For m

If **false** is returned, the platform does not support GSKV. In this case, use XML.

<!--@[isStorageTypeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[isStorageTypeSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
let isGskvSupported = preferences.isStorageTypeSupported(preferences.StorageType.GSKV);
Logger.info('Is gskv supported on this platform: ' + isGskvSupported);
@@ -103,8 +104,17 @@ The following table lists the APIs related to user preference persistence. For m

Call **getPreferencesSync()** to obtain a **Preferences** instance in the default XML format.

The context is defined as follows:
<!--@[DefineContext](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
const context = EntryAbility.getContext();
```

Call **getPreferencesSync()** to obtain a **Preferences** instance in the default XML format.

<!--Del-->Stage model:<!--DelEnd-->
<!--@[GetPreferencesSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[GetPreferencesSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
import { UIAbility } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
@@ -138,7 +148,7 @@ The following table lists the APIs related to user preference persistence. For m
If you want to use GSKV and the platform supports it, you can obtain the **Preferences** instance as follows. However, the storage type cannot be changed once selected.
<!--Del-->Stage model:<!--DelEnd-->

<!--@[GetPreferencesSyncGSKV](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[GetPreferencesSyncGSKV](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
import { UIAbility } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
@@ -182,11 +192,9 @@ The following table lists the APIs related to user preference persistence. For m

Example:

<!--@[PutSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->

<!--@[PutSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
import { util } from '@kit.ArkTS';
if (dataPreferences.hasSync('startup')) {
Logger.info('The key startup is contained.');
} else {
@@ -205,8 +213,9 @@ The following table lists the APIs related to user preference persistence. For m

Example:

<!--@[GetSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->

<!--@[GetSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[GetSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
let val = dataPreferences.getSync('startup', 'default');
Logger.info('The startup value is ' + val);
@@ -216,13 +225,12 @@ The following table lists the APIs related to user preference persistence. For m
val = textDecoder.decodeToString(uInt8Array2 as Uint8Array);
Logger.info('The uInt8 value is ' + val);
```

6. Delete data.

Call **deleteSync()** to delete a KV pair. Example:

<!--@[DeleteSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[DeleteSync](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
dataPreferences.deleteSync('startup');
```
@@ -231,8 +239,8 @@ The following table lists the APIs related to user preference persistence. For m

You can use **flush()** to persist the data held in a **Preferences** instance to a file. Example:

<!--@[Flush](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[Flush](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
dataPreferences.flush((err: BusinessError) => {
if (err) {
@@ -247,11 +255,11 @@ The following table lists the APIs related to user preference persistence. For m

Specify an observer as the callback to return the data changes for an application.

If the preferences data is stored in the default format (XML), the observer callback will be triggered only after the subscribed value changes and **flush()** is executed.
If the preferences data is stored in the default format (XML), the observer callback will be triggered only after the subscribed **key** value changes and **flush()** is executed.

Example:

<!--@[XMLOn](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[XMLOn](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->

``` TypeScript
let observer = (key: string) => {
@@ -277,11 +285,11 @@ The following table lists the APIs related to user preference persistence. For m
})
```

If the preferences data is stored in GSKV format, the observer callback will be triggered after the subscribed value changes (without the need for calling **flush()**).
If the preferences data is stored in GSKV format, the observer callback will be triggered after the subscribed **key** value changes (without the need for calling **flush()**).

Example:
<!--@[GSKVOn](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
<!--@[GSKVOn](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
let observer = (key: string) => {
Logger.info('The key ' + key + ' changed.');
@@ -308,10 +316,17 @@ The following table lists the APIs related to user preference persistence. For m
>
> - If GSKV is used, this API cannot be called concurrently with other APIs (including multiple processes). Otherwise, unexpected behavior may occur.

Example:
The context is defined as follows:
<!--@[DefineContext](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
const context = EntryAbility.getContext();
```

<!--@[DeleteXMLPreferences](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
Example:

<!--@[DeleteXMLPreferences](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/Preferences/PreferencesSamples/entry/src/main/ets/pages/PreferencesInterface.ets)-->
``` TypeScript
let options: preferences.Options = { name: 'myStore' };
preferences.deletePreferences(context, options, (err: BusinessError) => {
@@ -322,4 +337,5 @@ The following table lists the APIs related to user preference persistence. For m
Logger.info('Succeeded in deleting preferences.');
})
```

<!--RP1--><!--RP1End-->

+ 11
- 9
en/application-dev/database/data-persistence-by-rdb-store.md View File

@@ -70,10 +70,12 @@ Unless otherwise specified, the sample code without "stage model" or "FA model"
If error 14800011 is thrown, you need to rebuild the database and restore data to ensure normal application development. For details, see [Rebuilding an RDB Store](data-backup-and-restore.md#rebuilding-an-rdb-store).

1. Obtain an **RdbStore** instance, which includes operations of creating an RDB store and tables, and upgrading or downgrading the RDB store. You are advised to use transaction APIs to ensure the atomicity of the database upgrade process.

<br>Example:
Stage model:
<!--@[persistence_get_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_get_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
import { relationalStore} from '@kit.ArkData'; // Import the relationalStore module.
@@ -253,7 +255,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
> - For details about the error codes, see [Universal Error Codes](../reference/errorcode-universal.md) and [RDB Store Error Codes](../reference/apis-arkdata/errorcode-data-rdb.md).

2. Call **insert()** to insert data. <br>Example:
<!--@[persistence_insert_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_insert_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Insert data.
@@ -287,7 +289,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
3. Modify or delete data based on the specified **Predicates** instance.

Call **update()** to modify data and **delete()** to delete data. <br>Example:
<!--@[persistence_update_and_delete_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_update_and_delete_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Modify and delete data.
@@ -334,7 +336,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
4. Query data based on the conditions specified by **Predicates**.

Call **query()** to query data. The data obtained is returned in a **ResultSet** object. <br>Example:
<!--@[persistence_query_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_query_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Query data.
@@ -369,7 +371,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
The RDB store also supports full-text search (FTS) in Chinese or English. The ICU tokenizer is supported.

The following example demonstrates how to perform FTS with Chinese keywords:
<!--@[persistence_chinese_query_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_chinese_query_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Query data using Chinese keywords.
@@ -405,7 +407,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
The supported transaction types are **DEFERRED** (default), **IMMEDIATE**, and **EXCLUSIVE**.

For details, see [Interface (RdbStore)](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#createtransaction14).
<!--@[persistence_transaction_insert_update_and_delete_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_transaction_insert_update_and_delete_data](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Use the transaction object to insert, delete, and update data.
@@ -467,7 +469,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
6. Back up the database in the same directory. <br>Two backup modes are available: manual backup and automatic backup (available only for system applications). For details, see [Backing Up an RDB Store](data-backup-and-restore.md#backing-up-an-rdb-store).

Example: Perform manual backup of an RDB store.
<!--@[persistence_backup_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_backup_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Back up the database in the same path.
@@ -486,7 +488,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
7. Restore data from the database backup. <br>You can restore an RDB store from the manual backup data or automatic backup data (available only for system applications). For details, see [Restoring RDB Store Data](data-backup-and-restore.md#restoring-rdb-store-data).

Example: Call [restore](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#restore) to restore an RDB store from the data that is manually backed up.
<!--@[persistence_restore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_restore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Restore data from the backup database.
@@ -506,7 +508,7 @@ If error 14800011 is thrown, you need to rebuild the database and restore data t
Call **deleteRdbStore()** to delete the RDB store and related database files. <br>Example:

Stage model:
<!--@[persistence_delete_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
<!--@[persistence_delete_store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datapersistence/RdbDataPersistence.ets)-->
``` TypeScript
// Delete the database.


+ 77
- 79
en/application-dev/database/data-persistence-by-vector-store.md View File

@@ -142,18 +142,18 @@ The following lists only the APIs for persisting vector store data. For details

1. Check whether the current system supports vector stores. The sample code is as follows:

<!--@[vector_TS_isVectorSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_isVectorSupported](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
import { relationalStore } from '@kit.ArkData'; // Import the relationalStore module.
import { BusinessError } from '@kit.BasicServicesKit';
// Check whether the current system supports vector stores.
let ret = relationalStore.isVectorSupported();
if (!ret) {
console.error(`vectorDB is not supported.`);
return;
}
// ...
// Check whether the current system supports vector stores.
let ret = relationalStore.isVectorSupported();
if (!ret) {
console.error(`vectorDB is not supported.`);
return;
}
```

2. If the system supports vector stores, obtain an **RdbStore** instance. Call **getRdbStore()** to create a database and create a table.
@@ -168,26 +168,26 @@ The following lists only the APIs for persisting vector store data. For details

The sample code is as follows:

<!--@[vector_TS_getStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_getStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
let store: relationalStore.RdbStore | undefined = undefined;
let context = getContext(); // Obtain the context.
const STORE_CONFIG :relationalStore.StoreConfig= {
let context = getContext();
const STORE_CONFIG: relationalStore.StoreConfig = {
name: 'VectorTest.db', // Database file name.
securityLevel: relationalStore.SecurityLevel.S1, // Database security level.
vector: true // Optional. This parameter must be true for a vector store.
};
relationalStore.getRdbStore(context, STORE_CONFIG).then(async (rdbStore: relationalStore.RdbStore) => {
store = rdbStore;
// Create a table. floatvector (2) indicates that repr is 2-dimensional.
const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, repr floatvector(2));';
// The second parameter indicates that transaction is not enabled. The third parameter undefined indicates that parameter binding is not used.
await store!.execute(SQL_CREATE_TABLE, 0, undefined);
}).catch((err: BusinessError) => {
console.error(`Get RdbStore failed, code is ${err.code}, message is ${err.message}`);
});
};
// ...
try {
store = await relationalStore.getRdbStore(context, STORE_CONFIG);
// Create a table. floatvector (2) indicates that repr is 2-dimensional.
const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, repr floatvector(2));';
// The second parameter indicates that transaction is not enabled. The third parameter undefined indicates that parameter binding is not used.
await store!.execute(SQL_CREATE_TABLE, 0, undefined);
} catch(err) {
console.error(`Get RdbStore failed, code is ${err.code}, message is ${err.message}`);
};
```

3. Call **execute()** to insert data to the vector store.
@@ -198,8 +198,8 @@ The following lists only the APIs for persisting vector store data. For details
The sample code is as follows:

<!--@[vector_TS_execute_insert](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_insert](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// Use parameter binding.
@@ -214,8 +214,8 @@ The following lists only the APIs for persisting vector store data. For details

4. Call **execute()** to modify or delete data. The sample code is as follows:

<!--@[vector_TS_execute_update_and_delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_update_and_delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
// Modify data.
try {
@@ -227,7 +227,7 @@ The following lists only the APIs for persisting vector store data. For details
} catch (err) {
console.error(`execute update failed, code is ${err.code}, message is ${err.message}`);
}
// Delete data.
try {
// Use parameter binding.
@@ -247,8 +247,8 @@ The following lists only the APIs for persisting vector store data. For details

The sample code is as follows:

<!--@[vector_TS_query](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_query](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
// Perform single-table queries.
try {
@@ -257,11 +257,11 @@ The following lists only the APIs for persisting vector store data. For details
const vectorValue2: Float32Array = Float32Array.from([6.2, 7.3]);
let resultSet = await store!.querySql(QUERY_SQL, [vectorValue2, 0, vectorValue2]);
while (resultSet!.goToNextRow()) {
let id = resultSet.getValue(0);
let dis = resultSet.getValue(1);
let id = resultSet.getValue(0);
let dis = resultSet.getValue(1);
}
resultSet!.close();
// Do not use parameter binding.
const QUERY_SQL1 = "select id, repr <-> '[6.2, 7.3]' as distance from test where id > 0 order by repr <-> '[6.2, 7.3]' limit 5;";
resultSet = await store!.querySql(QUERY_SQL1);
@@ -269,7 +269,7 @@ The following lists only the APIs for persisting vector store data. For details
} catch (err) {
console.error(`query failed, code is ${err.code}, message is ${err.message}`);
}
// Perform subqueries.
try {
// Create the second table.
@@ -280,7 +280,7 @@ The following lists only the APIs for persisting vector store data. For details
} catch (err) {
console.error(`query failed, code is ${err.code}, message is ${err.message}`);
}
// Perform aggregate queries.
try {
let resultSet = await store!.querySql("select * from test where repr <-> '[1.0, 1.0]' > 0 group by id having max(repr <=> '[1.0, 1.0]');");
@@ -288,7 +288,7 @@ The following lists only the APIs for persisting vector store data. For details
} catch (err) {
console.error(`query failed, code is ${err.code}, message is ${err.message}`);
}
// Perform multi-table queries.
try {
// Different union all, union will delete duplicate data.
@@ -301,8 +301,8 @@ The following lists only the APIs for persisting vector store data. For details

6. Create a view and query data. The sample code is as follows:

<!--@[vector_TS_execute_create_view](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_create_view](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
// Perform view queries.
try {
@@ -365,8 +365,8 @@ The following lists only the APIs for persisting vector store data. For details

The sample code is as follows:

<!--@[vector_TS_execute_create_index](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_create_index](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
// Basic syntax
try {
@@ -377,7 +377,7 @@ The following lists only the APIs for persisting vector store data. For details
} catch (err) {
console.error(`create index failed, code is ${err.code}, message is ${err.message}`);
}
// Extended syntax
try {
// Set QUEUE_SIZE to 20 and OUT_DEGREE to 50.
@@ -408,8 +408,8 @@ The following lists only the APIs for persisting vector store data. For details

The sample code is as follows:

<!--@[vector_TS_execute_gsdiskann](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_gsdiskann](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// Manually trigger asynchronous deletion and sorting to execute disk defragmentation for all GSDiskANN indexes in the vector store.
@@ -442,25 +442,25 @@ The following lists only the APIs for persisting vector store data. For details

| Unit| Value in Seconds|
| ------ | -------- |
| year | 365 * 24 * 60 * 60 |
| month | 30 * 24 * 60 * 60 |
| day | 24 * 60 * 60 |
| hour | 60 * 60 |
| year | 365 × 24 × 60 × 60|
| month | 30 × 24 × 60 × 60|
| day | 24 × 60 × 60|
| hour | 60 × 60|
| minute | 60 |

For example, if **ttl** is set to **3 months**, the value will be converted into 7,776,000 seconds (3 x (30 * 24 * 60 * 60)).
For example, if **ttl** is set to **3 months**, the value will be converted into 7,776,000 seconds (3 × (30 × 24 × 60 × 60)).

The sample code is as follows:

<!--@[vector_TS_execute_auto_dataAging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
<!--@[vector_TS_execute_auto_dataAging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// The write operation performed every 5 minutes will trigger a data aging task.
await store!.execute("CREATE TABLE test2(rec_time integer not null) WITH (time_col = 'rec_time', interval = '5 minute');");
} catch (err) {
console.error(`configure data aging failed, code is ${err.code}, message is ${err.message}`);
}
// The write operation performed every 5 minutes will trigger a data aging task.
await store!.execute("CREATE TABLE test2(rec_time integer not null) WITH (time_col = 'rec_time', interval = '5 minute');");
} catch (err) {
console.error(`configure data aging failed, code is ${err.code}, message is ${err.message}`);
}
```

10. Configure data compression. This feature is configured when a table is created to compress column data of the text type.
@@ -477,31 +477,29 @@ The following lists only the APIs for persisting vector store data. For details

The sample code is as follows:

<!--@[vector_TS_execute_dataAging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// Data compression and data aging are configured for the content column.
await store!.execute("CREATE TABLE IF NOT EXISTS test3 (time integer not null, content text) with (time_col = 'time', interval = '5 minute', compress_col = 'content');");
} catch (err) {
console.error(`configure data compress failed, code is ${err.code}, message is ${err.message}`);
}
```
<!--@[vector_TS_execute_dataAging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// Data compression and data aging are configured for the content column.
await store!.execute("CREATE TABLE IF NOT EXISTS test3 (time integer not null, content text) with (time_col = 'time', interval = '5 minute', compress_col = 'content');");
} catch (err) {
console.error(`configure data compress failed, code is ${err.code}, message is ${err.message}`);
}
```

11. Delete the database.

Call **deleteRdbStore()** to delete the vector store and related database files. The sample code is as follows:

<!--@[vector_TS_deleteStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->

``` TypeScript
try {
// Close the store object before deleting the database. Otherwise, the next call to getRdbStore() will fail.
await store!.close();
await relationalStore.deleteRdbStore(context, STORE_CONFIG);
} catch (err) {
console.error(`delete rdbStore failed, code is ${err.code},message is ${err.message}`);
}
```

<!--@[vector_TS_deleteStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/ets/pages/crud/vectorStoreCTUD.ets)-->
``` TypeScript
try {
// Close the store object before deleting the database. Otherwise, the next call to getRdbStore() will fail.
await store!.close();
await relationalStore.deleteRdbStore(context, STORE_CONFIG);
} catch (err) {
console.error(`delete rdbStore failed, code is ${err.code},message is ${err.message}`);
}
```

+ 11
- 15
en/application-dev/database/data-sync-of-distributed-data-object.md View File

@@ -113,7 +113,7 @@ Since API version 20, synchronization of [assets](../reference/apis-arkdata/js-a

## Constraints
<!--RP5-->
- Currently, distributed data objects can be used only in [cross-device migration](../application-models/hop-cross-device-migration.md) and [multi-device collaboration using the cross-device call](../application-models/hop-multi-device-collaboration.md#using-cross-device-call).
- Currently, distributed data objects can be used only in [cross-device migration](../application-models/hop-cross-device-migration.md) and [multi-device collaboration using the cross-device call](../application-models/hop-multi-device-collaboration.md#using-cross-device-call). The size of each distributed data object cannot exceed 150 KB in the cross-device migration scenario, whereas it cannot exceed 500 KB in the multi-device collaboration scenario.

- Currently, the cross-device continuation capability supports the following scenarios:
- [Migrating between abilities in the same application across devices](../application-models/hop-cross-device-migration.md#migrating-between-abilities-in-the-same-application-across-devices)
@@ -121,10 +121,6 @@ Since API version 20, synchronization of [assets](../reference/apis-arkdata/js-a
<!--RP5End-->
- Data can be synced for the distributed data objects with the same session ID.

- Each distributed data object occupies 100 KB to 150 KB of memory. Therefore, you are advised not to create too many distributed data objects.

- The maximum size of a distributed data object is 500 KB.

- If data of 1 KB data is modified on device A, device B can complete data update within 50 ms after receiving a data change notification.

- A maximum of 16 distributed data object instances can be created for an application.
@@ -147,19 +143,19 @@ Most of the APIs for cross-device sync of distributed data objects are executed
| genSessionId(): string | Generates a session ID for distributed data objects.|
| setSessionId(sessionId: string, callback: AsyncCallback&lt;void&gt;): void | Sets a session ID for data sync. Automatic sync is performed for devices with the same session ID on a trusted network.|
| setSessionId(callback: AsyncCallback&lt;void&gt;): void | Exits all sessions.|
| on(type: 'change', callback: (sessionId: string, fields: Array&lt;string&gt;) => void): void | Subscribes to data changes of a distributed data object. |
| off(type: 'change', callback?: (sessionId: string, fields: Array&lt;string&gt;) => void): void | Unsubscribes from data changes of a distributed data object. |
| on(type: 'status', callback: (sessionId: string, networkId: string, status: 'online' \| 'offline' ) => void): void | Subscribes to status changes of a distributed data object. |
| off(type: 'status', callback?: (sessionId: string, networkId: string, status: 'online' \|'offline' ) => void): void | Unsubscribes from status changes of a distributed data object. |
| on(type: 'change', callback: (sessionId: string, fields: Array&lt;string&gt;) => void): void | Subscribes to data changes of a distributed data object.|
| off(type: 'change', callback?: (sessionId: string, fields: Array&lt;string&gt;) => void): void | Unsubscribes from data changes of a distributed data object.|
| on(type: 'status', callback: (sessionId: string, networkId: string, status: 'online' \| 'offline' ) => void): void | Subscribes to status changes of a distributed data object.|
| off(type: 'status', callback?: (sessionId: string, networkId: string, status: 'online' \|'offline' ) => void): void | Unsubscribes from status changes of a distributed data object.|
| save(deviceId: string, callback: AsyncCallback&lt;SaveSuccessResponse&gt;): void | Saves a distributed data object.|
| revokeSave(callback: AsyncCallback&lt;RevokeSaveSuccessResponse&gt;): void | Revokes the saving of a distributed data object. |
| revokeSave(callback: AsyncCallback&lt;RevokeSaveSuccessResponse&gt;): void | Revokes the saving of a distributed data object.|
| bindAssetStore(assetKey: string, bindInfo: BindInfo, callback: AsyncCallback&lt;void&gt;): void | Binds an asset and its RDB store.|
| setAsset(assetKey: string, uri: string): void | Sets an asset.|
| setAssets(assetKey: string, uris: Array&lt;string&gt;): void | Sets assets.|
| on(type: 'change', callback: DataObserver&lt;void&gt;): void | Subscribes to data changes of a distributed data object. |
| off(type: 'change', callback?: DataObserver&lt;void&gt;): void | Unsubscribes from data changes of a distributed data object. |
| on(type: 'status', callback: StatusObserver&lt;void&gt;): void | Subscribes to the status changes of a distributed data object. |
| off(type: 'status', callback?: StatusObserver&lt;void&gt;): void | Unsubscribes from status changes of a distributed data object. |
| on(type: 'change', callback: DataObserver&lt;void&gt;): void | Subscribes to data changes of a distributed data object.|
| off(type: 'change', callback?: DataObserver&lt;void&gt;): void | Unsubscribes from data changes of a distributed data object.|
| on(type: 'status', callback: StatusObserver&lt;void&gt;): void | Subscribes to the status changes of a distributed data object.|
| off(type: 'status', callback?: StatusObserver&lt;void&gt;): void | Unsubscribes from status changes of a distributed data object.|


## How to Develop
@@ -196,7 +192,7 @@ Most of the APIs for cross-device sync of distributed data objects are executed
>
> - The initial value of the service data must be set to **undefined** on the target device so that the data saved on the source device can be restored on the target device. Otherwise, the data on the source device will be overwritten by the data set on the target device. For asset data, you need to set each attribute of the asset data to an empty string instead of setting the entire asset data to **undefined**.
>
> - Currently, the asset array is not supported. If multiple files need to be migrated, define an asset data record for each file to migrate.
> - Before API version 20, the asset array is not supported. If multiple files need to be migrated, define an asset data record for each file to migrate. Since API version 20, the asset array can be synced.
>
> - Currently, only files in distributed file directory can be migrated. Files in other directories can be copied or moved to distributed file directory before migration. For details about how to move or copy files and obtain URIs, see [File Management](../reference/apis-core-file-kit/js-apis-file-fs.md) and [File URI](../reference/apis-core-file-kit/js-apis-file-fileuri.md).



+ 6
- 6
en/application-dev/database/data-sync-of-rdb-store.md View File

@@ -72,7 +72,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
> The security level of the destination device (to which data is synced) cannot be higher than that of the source device. For details, see [Access Control Mechanism in Cross-Device Sync](access-control-by-device-and-data-level.md#access-control-mechanism-in-cross-device-sync).

1. Import the related modules.
<!--@[sync_import](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[sync_import](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
import { relationalStore } from '@kit.ArkData'; // Import modules.
@@ -88,7 +88,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
2. Display a dialog box to ask for authorization from the user when the application is started for the first time. For details, see [Requesting User Authorization](../security/AccessToken/request-user-authorization.md).

3. Create an RDB store and a data table, and set the data table that requires cross-device data sync as a distributed table.
<!--@[setDistributedTables](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[setDistributedTables](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
let context = getContext();
@@ -112,7 +112,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
4. Subscribe to data changes of other devices in the network cluster.
1. Call [on('dataChange')](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#ondatachange) to listen for data changes of other devices. This API is called when data changes and is synced to the current device. The input parameter is the list of device IDs whose data changes.
2. Obtain the distributed table name corresponding to the device based on the device ID and query data in the distributed table.
<!--@[on_data_change](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[on_data_change](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
// Subscribe to data changes of other devices in the network cluster.
@@ -154,7 +154,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
1. After the data in the distributed table of the current device changes, the [sync](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#sync-1) API of **RdbStore** is called to pass the [SYNC_MODE_PUSH](../reference/apis-arkdata/arkts-apis-data-relationalStore-e.md#syncmode) parameter to push data changes to other devices.
2. Use the [inDevices](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbPredicates.md#indevices) method of the predicate to specify the target device for receiving data changes.
<!--@[data_sync_push](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[data_sync_push](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
// Sync data changes of the current device to other devices in the network cluster.
@@ -207,7 +207,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
1. The current device can call the [sync](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#sync-1) API of **RdbStore** and pass the [SYNC_MODE_PULL](../reference/apis-arkdata/arkts-apis-data-relationalStore-e.md#syncmode) parameter to pull data changes from other devices in the network cluster.
2. Use the [inDevices](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbPredicates.md#indevices) method of the predicate to specify the target device.
<!--@[data_sync_pull](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[data_sync_pull](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
// Obtain the data changes of other devices in the network cluster.
@@ -250,7 +250,7 @@ The following table lists the APIs for cross-device data sync of RDB stores. Mos
```

7. If data sync is not complete or not triggered, use the [remoteQuery](../reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md#remotequery-1) method of **RdbStore** to query the data in the distributed table on a specified device in the network cluster.
<!--@[data_remote_query](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/DataSync&Persistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
<!--@[data_remote_query](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/DataSyncAndPersistence/entry/src/main/ets/pages/datasync/RdbDataSync.ets)-->
``` TypeScript
// Query data of the distributed table on a specified device in the network cluster.


+ 104
- 63
en/application-dev/database/encrypted_estore_guidelines.md View File

@@ -559,8 +559,9 @@ The following describes how to use the [Mover](#mover-1), [Store](#store-1), [Se

Use **Mover** to move data from an EL2 database to an EL5 database after the screen is unlocked.

```ts
// Mover.ts
<!-- @[rdb_Mover](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/encryptedEStoreGuidelines/Mover.ts) -->

``` TypeScript
import { relationalStore } from '@kit.ArkData';

export class Mover {
@@ -581,8 +582,9 @@ export class Mover {

Use the APIs provided by the **Store** class to obtain a database instance, add, delete, and update data, and obtain the data count in the database. The **StoreInfo** class is used to store and obtain database information.

```ts
// Store.ts
<!-- @[rdb_Store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/encryptedEStoreGuidelines/Store.ts) -->

``` TypeScript
import { relationalStore } from '@kit.ArkData';
import { BusinessError } from '@kit.BasicServicesKit';
import { Context } from '@kit.AbilityKit';
@@ -624,7 +626,7 @@ export class Store {
CODES: new Uint8Array([1, 2, 3, 4, 5]),
};
try {
await rdbStore.insert("EMPLOYEE", valueBucket);
await rdbStore.insert('EMPLOYEE', valueBucket);
console.info(`ECDB_Encry insert success`);
} catch (e) {
let error = e as BusinessError;
@@ -682,12 +684,14 @@ export class Store {
}
```


### SecretKeyObserver

Use the APIs provided by the **SecretKeyObserver** class to obtain the key status. After the key is destroyed, the EL5 database will be closed.

```ts
// SecretKeyObserver.ts
<!-- @[rdb_SecretKeyObserver](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/encryptedEStoreGuidelines/SecretKeyObserver.ts) -->

``` TypeScript
import { ECStoreManager } from './ECStoreManager';

export enum SecretStatus {
@@ -728,12 +732,14 @@ export class SecretKeyObserver {
export let lockObserve = new SecretKeyObserver();
```


### ECStoreManager

Use the APIs provided by the **ECStoreManager** class to manage the EL2 and EL5 databases. You can configure database information and migration function information, provide database handles for applications based on the key status, close EL5 databases, and destroy EL2 databases after data migration.

```ts
// ECStoreManager.ts
<!-- @[rdb_ECStoreManager](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/encryptedEStoreGuidelines/ECStoreManager.ts) -->

``` TypeScript
import { relationalStore } from '@kit.ArkData';
import { Mover } from './Mover';
import { BusinessError } from '@kit.BasicServicesKit';
@@ -809,38 +815,35 @@ export class ECStoreManager {

Register a listener for the COMMON_EVENT_SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED event when the simulated application starts, and configure the database information and key status information.

```ts
// EntryAbility.ets
<!-- @[rdb_EntryAbility](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/entryability/EntryAbility.ets) -->

``` TypeScript
import { AbilityConstant, contextConstant, UIAbility, Want, application } from '@kit.AbilityKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { window } from '@kit.ArkUI';
import { relationalStore } from '@kit.ArkData';
import { ECStoreManager } from './ECStoreManager';
import { StoreInfo } from './Store';
import { Mover } from './Mover';
import { SecretKeyObserver } from './SecretKeyObserver';
import { ECStoreManager } from '../encryptedEStoreGuidelines/ECStoreManager';
import { StoreInfo } from '../encryptedEStoreGuidelines/Store';
import { Mover } from '../encryptedEStoreGuidelines/Mover';
import { SecretKeyObserver } from '../encryptedEStoreGuidelines/SecretKeyObserver';
import { commonEventManager } from '@kit.BasicServicesKit';
import { BusinessError } from '@kit.BasicServicesKit';


export let storeManager = new ECStoreManager();

export let e_secretKeyObserver = new SecretKeyObserver();

let mover = new Mover();

let subscriber: commonEventManager.CommonEventSubscriber;

export function createCB(err: BusinessError, commonEventSubscriber: commonEventManager.CommonEventSubscriber) {
if (!err) {
console.info('ECDB_Encry createSubscriber');
console.info('ECDB_Encrypt createSubscriber');
subscriber = commonEventSubscriber;
try {
commonEventManager.subscribe(subscriber, (err: BusinessError, data: commonEventManager.CommonEventData) => {
if (err) {
console.error(`subscribe failed, code is ${err.code}, message is ${err.message}`);
} else {
console.info(`ECDB_Encry SubscribeCB ${data.code}`);
console.info(`ECDB_Encrypt SubscribeCB ${data.code}`);
e_secretKeyObserver.updateLockStatus(data.code);
}
});
@@ -866,9 +869,9 @@ export default class EntryAbility extends UIAbility {
name: 'cstore.db',
securityLevel: relationalStore.SecurityLevel.S3,
},
storeId: "cstore.db"
storeId: 'cstore.db'
};
let eContext = await application.createModuleContext(this.context, "entry");
let eContext = await application.createModuleContext(this.context, 'entry');
eContext.area = contextConstant.AreaMode.EL5;
eInfo = {
context: eContext,
@@ -876,7 +879,7 @@ export default class EntryAbility extends UIAbility {
name: 'estore.db',
securityLevel: relationalStore.SecurityLevel.S3,
},
storeId: "estore.db",
storeId: 'estore.db',
};
// Listen for the COMMON_EVENT_SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED event. code == 1 indicates the screen is unlocked, and code==0 indicates the screen is locked.
console.info(`ECDB_Encry store area : estore:${eContext.area},cstore${cContext.area}`)
@@ -928,11 +931,12 @@ export default class EntryAbility extends UIAbility {

Use **Button** to simulate application operations on the database, such as inserting, deleting, updating, and obtaining the data count, by clicking the button.

```ts
// Index.ets
import { storeManager, e_secretKeyObserver } from "../entryability/EntryAbility";
<!-- @[rdb_encryptedEStoreGuidelines_index](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/ets/encryptedEStoreGuidelines/Index.ets) -->

``` TypeScript
import { storeManager, e_secretKeyObserver } from '../entryability/EntryAbility';
import { relationalStore } from '@kit.ArkData';
import { Store } from '../entryability/Store';
import { Store } from './Store';

let storeOption = new Store();

@@ -941,45 +945,82 @@ let lockStatus: number = 1;
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
@State message: string = '';

build() {
Row() {
Column() {
Button('Lock/Unlock').onClick((event: ClickEvent) => {
if (lockStatus) {
e_secretKeyObserver.onLock();
lockStatus = 0;
} else {
e_secretKeyObserver.onUnLock();
lockStatus = 1;
}
lockStatus ? this.message = "Unlock" : this.message = "Lock";
}).margin("5");
Button('store type').onClick(async (event: ClickEvent) => {
e_secretKeyObserver.getCurrentStatus() ? this.message = "estore" : this.message = "cstore";
console.info(`ECDB_Encry current store : ${this.message}`);
}).margin("5");

Button("put").onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.putOnedata(store);
}).margin(5)

Button("Get").onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.getDataNum(store);
}).margin(5)

Button("delete").onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.deleteAlldata(store);
}).margin(5)

Button("update").onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.updateOnedata(store);
}).margin(5)
Button('Lock/Unlock')
.onClick((event: ClickEvent) => {
if (lockStatus) {
e_secretKeyObserver.onLock();
lockStatus = 0;
} else {
e_secretKeyObserver.onUnLock();
lockStatus = 1;
}
lockStatus ? this.message = 'Unlock' : this.message = 'Lock';
})
.margin('5')
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Button('store type')
.onClick(async (event: ClickEvent) => {
e_secretKeyObserver.getCurrentStatus() ? this.message = 'estore' : this.message = 'cstore';
console.info(`ECDB_Encry current store : ${this.message}`);
})
.margin('5')
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Button('put')
.onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.putOnedata(store);
})
.margin(5)
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Button('Get')
.onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.getDataNum(store);
})
.margin(5)
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Button('delete')
.onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.deleteAlldata(store);
})
.margin(5)
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Button('update')
.onClick(async (event: ClickEvent) => {
let store: relationalStore.RdbStore = await storeManager.getCurrentStore(e_secretKeyObserver.getCurrentStatus());
storeOption.updateOnedata(store);
})
.margin(5)
.backgroundColor('#0D9FFB')
.width('50%')
.height('5%')
.type(ButtonType.Capsule)

Text(this.message)
.fontSize(50)


+ 8
- 10
en/application-dev/database/native-access-control-by-device-and-data-level.md View File

@@ -23,12 +23,12 @@ A higher data security label and device security level indicate stricter encrypt

The data can be rated into four security levels as below. For details, see [OH_Rdb_SecurityLevel](../reference/apis-arkdata/capi-relational-store-h.md#oh_rdb_securitylevel).

| Risk Level| Security Level| Definition| Example|
| Risk Level| Security Level| Definition| Example|
| -------- | -------- | -------- | -------- |
| Critical| S4 | Special data types defined by industry laws and regulations, involving the most private individual information or data that may cause severe adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Political opinions, religious and philosophical belief, trade union membership, genetic data, biological information, health and sexual life status, sexual orientation, device authentication, and personal credit card information|
| High| S3 | Data that may cause critical adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Individual real-time precise positioning information and movement trajectory|
| Moderate| S2 | Data that may cause major adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Detailed addresses and nicknames of individuals|
| Low| S1 | Data that may cause minor adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Gender, nationality, and user application records|
| Critical| S4 | Special data types defined by industry laws and regulations, involving the most private individual information or data that may cause severe adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Political opinions, religious and philosophical belief, trade union membership, genetic data, biological information, health and sexual life status, sexual orientation, device authentication, and personal credit card information|
| High| S3 | Data that may cause critical adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Individual real-time precise positioning information and movement trajectory|
| Moderate| S2 | Data that may cause major adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Detailed addresses and nicknames of individuals|
| Low| S1 | Data that may cause minor adverse impact on an individual or group once disclosed, tampered with, corrupted, or destroyed.| Gender, nationality, and user application records|


### Device Security Levels
@@ -51,7 +51,7 @@ In cross-device data sync, data access is controlled based on the device securit
|SL2|S1 to S2|
|SL3|S1 to S3|
|SL4|S1 to S4|
|SL5|S1 to S4|
|SL5|S1 to S4|
<!--RP2-->
The security level of development boards RK3568 and Hi3516 is SL1. The database with data security label S1 can be synced with RK3568 and Hi3516, but the databases with labels S2-S4 cannot.
<!--RP2End-->
@@ -68,17 +68,15 @@ When creating an RDB store, call the **OH_Rdb_SetSecurityLevel** API to specify

2. Include header files.

<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
#include "database/rdb/relational_store.h"
```



3. Call **OH_Rdb_SetSecurityLevel** to set the database security level.

<!-- @[SetSecurityLevelForRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[SetSecurityLevelForRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();


+ 3
- 3
en/application-dev/database/native-backup-and-restore.md View File

@@ -26,7 +26,7 @@ A database backup can be used to quickly restore an RDB store in abnormal state.

2. Include header files.

<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
#include "database/rdb/relational_store.h"
@@ -35,7 +35,7 @@ A database backup can be used to quickly restore an RDB store in abnormal state.

3. Call **OH_Rdb_Backup** to back up the database.

<!-- @[BackupRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[BackupRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
@@ -58,7 +58,7 @@ A database backup can be used to quickly restore an RDB store in abnormal state.

4. Call **OH_Rdb_Restore** to restore the database.

<!-- @[rdb_OH_Rdb_Restore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[rdb_OH_Rdb_Restore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();


+ 71
- 67
en/application-dev/database/native-data-encryption.md View File

@@ -21,6 +21,10 @@ Call **OH_Rdb_SetEncrypted** to set whether to encrypt an RDB store. If **isEncr

When **isEncrypted** is set to **true**, call **OH_Rdb_SetCryptoParam** to set custom keys and algorithms for encryption or decryption.





1. Add the following library to **CMakeLists.txt**.

```txt
@@ -29,7 +33,7 @@ When **isEncrypted** is set to **true**, call **OH_Rdb_SetCryptoParam** to set c

2. Include header files.

<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[encryption_include](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
#include "database/rdb/relational_store.h"
@@ -41,80 +45,80 @@ When **isEncrypted** is set to **true**, call **OH_Rdb_SetCryptoParam** to set c

* Scenario 1: If no custom encryption/decryption parameter is configured, the default configuration is used.

<!-- @[DefaultConfigRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[DefaultConfigRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
OH_Rdb_SetDatabaseDir(config, "/data/storage/el2/database");
OH_Rdb_SetArea(config, RDB_SECURITY_AREA_EL2);
OH_Rdb_SetBundleName(config, "com.example.nativedemo");
OH_Rdb_SetStoreName(config, "RdbTest.db");
OH_Rdb_SetSecurityLevel(config, OH_Rdb_SecurityLevel::S3);
// Set the database to be created or opened in encryption mode.
OH_Rdb_SetEncrypted(config, true);
int errCode = 0;
// Create an OH_Rdb_Store instance.
OH_Rdb_Store *store = OH_Rdb_CreateOrOpen(config, &errCode);
OH_Rdb_CloseStore(store);
store = nullptr;
OH_Rdb_DestroyConfig(config);
config = nullptr;
```
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
OH_Rdb_SetDatabaseDir(config, "/data/storage/el2/database");
OH_Rdb_SetArea(config, RDB_SECURITY_AREA_EL2);
OH_Rdb_SetBundleName(config, "com.example.nativedemo");
OH_Rdb_SetStoreName(config, "RdbTest.db");
OH_Rdb_SetSecurityLevel(config, OH_Rdb_SecurityLevel::S3);
// Set the database to be created or opened in encryption mode.
OH_Rdb_SetEncrypted(config, true);
int errCode = 0;
// Create an OH_Rdb_Store instance.
OH_Rdb_Store *store = OH_Rdb_CreateOrOpen(config, &errCode);
OH_Rdb_CloseStore(store);
store = nullptr;
OH_Rdb_DestroyConfig(config);
config = nullptr;
```



* Scenario 2: Call **OH_Rdb_SetCryptoParam** to configure encryption parameters. The database is encrypted and decrypted using the custom key and algorithm parameters.
If custom configuration is not required, you can use the default encryption configuration.

<!-- @[CustomizedConfigRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
<!-- @[CustomizedConfigRdbStore](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelatetionalStore/NativeDataEncryption/entry/src/main/cpp/napi_init.cpp) -->
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
OH_Rdb_SetDatabaseDir(config, "/data/storage/el2/database");
OH_Rdb_SetArea(config, RDB_SECURITY_AREA_EL2);
OH_Rdb_SetStoreName(config, "RdbTestConfigEncryptParam.db");
OH_Rdb_SetSecurityLevel(config, OH_Rdb_SecurityLevel::S3);
OH_Rdb_SetBundleName(config, "com.example.nativedemo");
// Set the database to be created or opened in encryption mode.
OH_Rdb_SetEncrypted(config, true);
// Create a custom encryption parameter object.
OH_Rdb_CryptoParam *cryptoParam = OH_Rdb_CreateCryptoParam();
// Hard-coded keys are used as an example. You should use a secure key management service in actual development.
uint8_t key[6] = {0x31, 0x32, 0x33, 0x34, 0x35, 0x36};
// Use the specified key to open the encrypted database. If no key is specified, the database generates and saves the key and uses the generated key.
const int32_t length = 6;
OH_Crypto_SetEncryptionKey(cryptoParam, key, length);
// Clear the key information after it is used.
for (size_t i = 0; i < sizeof(key); i++) {
key[i] = 0;
}
// Set the number of iterations of the KDF algorithm, which must be greater than 0. If the value is not specified or the number of iterations is 0, the default value 10000 and the default encryption algorithm are used.
const int64_t iteration = 64000;
OH_Crypto_SetIteration(cryptoParam, iteration);
// Set the encryption algorithm. If it is not specified, AES_256_GCM is used by default.
OH_Crypto_SetEncryptionAlgo(cryptoParam, Rdb_EncryptionAlgo::RDB_AES_256_CBC);
// Set the HMAC algorithm. If it is not specified, SHA-256 is used by default.
OH_Crypto_SetHmacAlgo(cryptoParam, RDB_HMAC_SHA512);
// Set the KDF algorithm. If it is not specified, SHA-256 is used by default.
OH_Crypto_SetKdfAlgo(cryptoParam, RDB_KDF_SHA512);
// Set the page size used when the database is encrypted. The value must be an integer ranging from 1024 to 65536 and be a power of 2. If it is not specified, the default value 1024 is used.
const int64_t pageSize = 4096;
OH_Crypto_SetCryptoPageSize(cryptoParam, pageSize);
// Set the custom encryption parameters.
OH_Rdb_SetCryptoParam(config, cryptoParam);
int errCode = 0;
OH_Rdb_Store *store = OH_Rdb_CreateOrOpen(config, &errCode);
// Destroy the custom encryption parameter object.
OH_Rdb_DestroyCryptoParam(cryptoParam);
cryptoParam = nullptr;
OH_Rdb_CloseStore(store);
store = nullptr;
OH_Rdb_DestroyConfig(config);
config = nullptr;
```
``` C++
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
OH_Rdb_SetDatabaseDir(config, "/data/storage/el2/database");
OH_Rdb_SetArea(config, RDB_SECURITY_AREA_EL2);
OH_Rdb_SetStoreName(config, "RdbTestConfigEncryptParam.db");
OH_Rdb_SetSecurityLevel(config, OH_Rdb_SecurityLevel::S3);
OH_Rdb_SetBundleName(config, "com.example.nativedemo");
// Set the database to be created or opened in encryption mode.
OH_Rdb_SetEncrypted(config, true);
// Create a custom encryption parameter object.
OH_Rdb_CryptoParam *cryptoParam = OH_Rdb_CreateCryptoParam();
// Hard-coded keys are used as an example. You should use a secure key management service in actual development.
uint8_t key[6] = {0x31, 0x32, 0x33, 0x34, 0x35, 0x36};
// Use the specified key to open the encrypted database. If no key is specified, the database generates and saves the key and uses the generated key.
const int32_t length = 6;
OH_Crypto_SetEncryptionKey(cryptoParam, key, length);
// Clear the key information after it is used.
for (size_t i = 0; i < sizeof(key); i++) {
key[i] = 0;
}
// Set the number of iterations of the KDF algorithm, which must be greater than 0. If the value is not specified or the number of iterations is 0, the default value 10000 and the default encryption algorithm are used.
const int64_t iteration = 64000;
OH_Crypto_SetIteration(cryptoParam, iteration);
// Set the encryption algorithm. If it is not specified, AES_256_GCM is used by default.
OH_Crypto_SetEncryptionAlgo(cryptoParam, Rdb_EncryptionAlgo::RDB_AES_256_CBC);
// Set the HMAC algorithm. If it is not specified, SHA-256 is used by default.
OH_Crypto_SetHmacAlgo(cryptoParam, RDB_HMAC_SHA512);
// Set the KDF algorithm. If it is not specified, SHA-256 is used by default.
OH_Crypto_SetKdfAlgo(cryptoParam, RDB_KDF_SHA512);
// Set the page size used when the database is encrypted. The value must be an integer ranging from 1024 to 65536 and be a power of 2. If it is not specified, the default value 1024 is used.
const int64_t pageSize = 4096;
OH_Crypto_SetCryptoPageSize(cryptoParam, pageSize);
// Set the custom encryption parameters.
OH_Rdb_SetCryptoParam(config, cryptoParam);
int errCode = 0;
OH_Rdb_Store *store = OH_Rdb_CreateOrOpen(config, &errCode);
// Destroy the custom encryption parameter object.
OH_Rdb_DestroyCryptoParam(cryptoParam);
cryptoParam = nullptr;
OH_Rdb_CloseStore(store);
store = nullptr;
OH_Rdb_DestroyConfig(config);
config = nullptr;
```

4. Since API version 22, you can use **OH_Rdb_RekeyEx** to change the key or encryption parameters of an encrypted database as required.
The database key and encryption parameters can be changed in the following scenarios:


+ 5
- 5
en/application-dev/database/native-relational-store-guidelines.md View File

@@ -267,8 +267,8 @@ libnative_rdb_ndk.z.so, libhilog_ndk.z.so
predicates->destroy(predicates);
predicates2->destroy(predicates2);
```
<!--@[rdb_OH_Rdb_Delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/cpp/napi_init.cpp)-->
<!--@[rdb_OH_Rdb_Delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Delete data.
OH_Predicates *predicates = OH_Rdb_CreatePredicates("EMPLOYEE");
@@ -447,7 +447,7 @@ libnative_rdb_ndk.z.so, libhilog_ndk.z.so
```

To configure the full-text search (FTS) dynamic library, use **OH_Rdb_SetPlugins**.
For details about the constraints, see the **pluginLibs** configuration item in [StoreConfig](../reference/apis-arkdata/arkts-apis-data-relationalStore-i.md#storeconfig).

<!--@[rdb_OH_Rdb_SetPlugins](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/cpp/napi_init.cpp)-->
@@ -467,8 +467,8 @@ libnative_rdb_ndk.z.so, libhilog_ndk.z.so

Call **OH_Rdb_CreateTransaction** to create a transaction object and use this object to execute the corresponding transaction operation.

<!--@[rdb_OH_Rdb_CreateTransaction](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/cpp/napi_init.cpp)-->
<!--@[rdb_OH_Rdb_CreateTransaction](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/RelationalStore/RdbStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
OH_RDB_TransOptions *options = OH_RdbTrans_CreateOptions();
// Configure the transaction type.


+ 137
- 79
en/application-dev/database/native-vector-store-guidelines.md View File

@@ -72,9 +72,9 @@ libnative_rdb_ndk.z.so

1. Check whether the system supports vector stores. The sample code is as follows:

<!--@[vector_OH_Rdb_GetSupportedDbType](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_GetSupportedDbType](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
int numType = 0;
// If numType is 2, the system supports vector stores. If numType 1, the system does not support vector stores.
OH_Rdb_GetSupportedDbType(&numType);
@@ -82,9 +82,9 @@ libnative_rdb_ndk.z.so

2. If the system supports vector stores, obtain an **OH_Rdb_Store** instance. The sample code is as follows:

<!--@[vector_OH_Rdb_Store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_Store](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Create an OH_Rdb_Config instance.
OH_Rdb_ConfigV2 *config = OH_Rdb_CreateConfig();
// The path must be an application sandbox path.
@@ -102,7 +102,7 @@ libnative_rdb_ndk.z.so
OH_Rdb_SetArea(config, RDB_SECURITY_AREA_EL1);
// Set the storage type.
OH_Rdb_SetDbType(config, RDB_CAYLEY);
// Create an OH_Rdb_Store instance.
int errCode = 0;
OH_Rdb_Store *store_ = OH_Rdb_CreateOrOpen(config, &errCode);
@@ -116,13 +116,14 @@ libnative_rdb_ndk.z.so

The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_insert](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->

``` C
char createTableSql[] = "CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT, data1 floatvector(2));";
<!--@[vector_OH_Rdb_ExecuteV2_insert](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
char createTableSql[] =
"CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY AUTOINCREMENT, data1 floatvector(2));";
// Create a table.
OH_Rdb_ExecuteByTrxId(store_, 0, createTableSql);
// Insert data without parameter binding.
OH_Rdb_ExecuteV2(store_, "INSERT INTO test (id, data1) VALUES (0, '[3.4, 4.5]');", nullptr, nullptr);
// Insert data with parameter binding.
@@ -131,30 +132,31 @@ libnative_rdb_ndk.z.so
float test[] = { 1.2, 2.3 };
size_t len = sizeof(test) / sizeof(test[0]);
OH_Values_PutFloatVector(values, test, len);
char insertSql[] = "INSERT INTO test (id, data1) VALUES (?, ?);";
char insertSql[] = "INSERT INTO test (id, data1) VALUES (?, ?);";
OH_Rdb_ExecuteV2(store_, insertSql, values, nullptr);
OH_Values_Destroy(values);
```

4. Modify or delete data. The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_update_and_delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_ExecuteV2_update_and_delete](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Modify data without parameter binding.
OH_Rdb_ExecuteV2(store_, "update test set data1 = '[5.1, 6.1]' where id = 0;", nullptr, nullptr);
// Modify data with parameter binding.
float test1[2] = { 5.5, 6.6 };
OH_Data_Values *values1 = OH_Values_Create();
OH_Values_PutFloatVector(values1, test1, 2);
size_t len1 = sizeof(test1) / sizeof(test1[0]);
OH_Values_PutFloatVector(values1, test1, len1);
OH_Values_PutInt(values1, 1);
OH_Rdb_ExecuteV2(store_, "update test set data1 = ? where id = ?", values1, nullptr);
OH_Values_Destroy(values1);
// Delete data without parameter binding.
OH_Rdb_ExecuteV2(store_, "delete from test where id = 0", nullptr, nullptr);
// Delete data with parameter binding.
OH_Data_Values *values2 = OH_Values_Create();
OH_Values_PutInt(values2, 1);
@@ -166,78 +168,131 @@ libnative_rdb_ndk.z.so

> **NOTE**
>
> Use **destroy()** to destroy the **ResultSet** that is no longer used in a timely manner so that the memory allocated can be released.
> Use **destroy()** to destroy the result set (**OH_Cursor**) that is no longer used in a timely manner so that the memory allocated can be released.

The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_query](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_ExecuteV2_queryWithoutBingArgs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Query data without parameter binding.
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_, "select * from test where id = 1;", nullptr);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
// getRowCount may cause performance redundancy. You are advised to use this function only during debugging or maintenance.
int rowCount = 0;
cursor->getRowCount(cursor, &rowCount);
cursor->goToNextRow(cursor);
size_t count = 0;
// The floatvector array is the second column of data.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test2[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test2, count, &outLen);
while (cursor->goToNextRow(cursor) == OH_Rdb_ErrCode::RDB_OK) {
size_t count = 0;
// The floatvector array is the second column of data. 1 indicates the column index.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test, count, &outLen);
}
cursor->destroy(cursor);
```

<!--@[vector_OH_Rdb_ExecuteV2_queryWithBingArgs](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Query data with parameter binding.
char querySql[] = "select * from test where id = ?;";
OH_Data_Values *values3 = OH_Values_Create();
OH_Values_PutInt(values3, 1);
cursor = OH_Rdb_ExecuteQueryV2(store_, querySql, values3);
OH_Data_Values *values = OH_Values_Create();
OH_Values_PutInt(values, 1);
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_, querySql, values);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
while (cursor->goToNextRow(cursor) == OH_Rdb_ErrCode::RDB_OK) {
size_t count = 0;
// The floatvector array is the second column of data. 1 indicates the column index.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test, count, &outLen);
}
OH_Values_Destroy(values3);
OH_Values_Destroy(values);
cursor->destroy(cursor);
```

<!--@[vector_OH_Rdb_ExecuteV2_subquery](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Query data in another table, and create the table if it does not exist.
OH_Rdb_ExecuteV2(store_, "CREATE TABLE IF NOT EXISTS test1(id text PRIMARY KEY);", nullptr, nullptr);
cursor = OH_Rdb_ExecuteQueryV2(store_, "select * from test where id in (select id from test1);", nullptr);
OH_Rdb_ExecuteV2(store_, "CREATE TABLE IF NOT EXISTS example(id text PRIMARY KEY);", nullptr, nullptr);
char querySql[] = "select * from test where id in (select id from example);";
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_, querySql, nullptr);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
while (cursor->goToNextRow(cursor) == OH_Rdb_ErrCode::RDB_OK) {
size_t count = 0;
// The floatvector array is the second column of data. 1 indicates the column index.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test, count, &outLen);
}
cursor->destroy(cursor);
```

<!--@[vector_OH_Rdb_ExecuteV2_aggregateQuery](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Perform aggregate query.
cursor = OH_Rdb_ExecuteQueryV2(store_, "select * from test where data1 <-> '[1.0, 1.0]' > 0 group by id having max(data1 <=> '[1.0, 1.0]');", nullptr);
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_,
"select * from test where data1 <-> '[1.0, 1.0]' > 0 group by id having max(data1 <=> '[1.0, 1.0]');", nullptr);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
while (cursor->goToNextRow(cursor) == OH_Rdb_ErrCode::RDB_OK) {
size_t count = 0;
// The floatvector array is the second column of data. 1 indicates the column index.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test, count, &outLen);
}
cursor->destroy(cursor);
```

<!--@[vector_OH_Rdb_ExecuteV2_multiTableQuery](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Perform multi-table query.
cursor = OH_Rdb_ExecuteQueryV2(store_, "select id, data1 <-> '[1.5, 5.6]' as distance from test union select id, data1 <-> '[1.5, 5.6]' as distance from test order by distance limit 5;", nullptr);
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_, "select id, data1 <-> '[1.5, 5.6]' as distance from test "
"union select id, data1 <-> '[1.5, 5.6]' as distance from test order by distance limit 5;", nullptr);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
while (cursor->goToNextRow(cursor) == OH_Rdb_ErrCode::RDB_OK) {
size_t count = 0;
// The floatvector array is the second column of data. 1 indicates the column index.
OH_Cursor_GetFloatVectorCount(cursor, 1, &count);
float test[count];
size_t outLen;
OH_Cursor_GetFloatVector(cursor, 1, test, count, &outLen);
}
cursor->destroy(cursor);
```

6. Create a view and query data. The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_create_view](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->

``` C
<!--@[vector_OH_Rdb_ExecuteV2_create_view](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
OH_Rdb_ExecuteV2(store_, "CREATE VIEW v1 as select * from test where id > 0;", nullptr, nullptr);
OH_Cursor *cursor = OH_Rdb_ExecuteQueryV2(store_, "select * from v1;", nullptr);
if (cursor == NULL) {
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
OH_LOG_ERROR(LOG_APP, "Query failed.");
return;
}
cursor->destroy(cursor);
```
@@ -292,17 +347,18 @@ libnative_rdb_ndk.z.so

The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_create_index](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_ExecuteV2_create_index](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Create an index using the basic syntax. The index name is diskann_l2_idx, index column is repr, type is gsdiskann, and the distance metric is L2.
OH_Rdb_ExecuteV2(store_, "CREATE INDEX diskann_l2_idx ON test USING GSDISKANN(data1 L2);", nullptr, nullptr);
// Delete the diskann_l2_idx index from the test table.
OH_Rdb_ExecuteV2(store_, "DROP INDEX test.diskann_l2_idx;", nullptr, nullptr);
// Set QUEUE_SIZE to 20 and OUT_DEGREE to 50 using the extended syntax.
OH_Rdb_ExecuteV2(store_, "CREATE INDEX diskann_l2_idx ON test USING GSDISKANN(repr L2) WITH (queue_size=20, out_degree=50);", nullptr, nullptr);
OH_Rdb_ExecuteV2(store_, "CREATE INDEX diskann_l2_idx ON test USING GSDISKANN(data1 L2) WITH "
"(queue_size=20, out_degree=50);", nullptr, nullptr);
```

8. Configure the data aging policy, which allows the application data to be automatically deleted by time or space.
@@ -328,21 +384,22 @@ libnative_rdb_ndk.z.so

| Unit| Value in Seconds|
| ------ | -------- |
| year | 365 * 24 * 60 * 60 |
| month | 30 * 24 * 60 * 60 |
| day | 24 * 60 * 60 |
| hour | 60 * 60 |
| year | 365 × 24 × 60 × 60|
| month | 30 × 24 × 60 × 60|
| day | 24 × 60 × 60|
| hour | 60 × 60|
| minute | 60 |

For example, if **ttl** is set to **3 months**, the value will be converted into 7,776,000 seconds (3 x (30 * 24 * 60 * 60)).
For example, if **ttl** is set to **3 months**, the value will be converted into 7,776,000 seconds (3 × (30 × 24 × 60 × 60)).

The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_data_aging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_ExecuteV2_data_aging](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// The write operation performed every 5 minutes will trigger a data aging task.
OH_Rdb_ExecuteV2(store_, "CREATE TABLE test2(rec_time integer not null) WITH (time_col = 'rec_time', interval = '5 minute');", nullptr, nullptr);
OH_Rdb_ExecuteV2(store_,"CREATE TABLE test2(rec_time integer not null) WITH "
"(time_col = 'rec_time', interval = '5 minute');", nullptr, nullptr);
```

9. Configure data compression. This feature is configured when a table is created to compress column data of the text type.
@@ -359,18 +416,19 @@ libnative_rdb_ndk.z.so

The sample code is as follows:

<!--@[vector_OH_Rdb_ExecuteV2_data_compression](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
<!--@[vector_OH_Rdb_ExecuteV2_data_compression](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
// Data compression and data aging are configured for the content column.
OH_Rdb_ExecuteV2(store_, "CREATE TABLE IF NOT EXISTS test3 (time integer not null, content text) with (time_col = 'time', interval = '5 minute', compress_col = 'content');", nullptr, nullptr);
OH_Rdb_ExecuteV2(store_,"CREATE TABLE IF NOT EXISTS test3 (time integer not null, content text) with "
"(time_col = 'time', interval = '5 minute', compress_col = 'content');", nullptr, nullptr);
```

10. Delete the vector store. The sample code is as follows:

<!--@[vector_OH_Rdb_DeleteStoreV2](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C
OH_Rdb_CloseStore(store_);
OH_Rdb_DeleteStoreV2(config);
```
<!--@[vector_OH_Rdb_DeleteStoreV2](https://gitcode.com/openharmony/applications_app_samples/blob/master/code/DocsSample/ArkData/VectorStore/entry/src/main/cpp/napi_init.cpp)-->
``` C++
OH_Rdb_CloseStore(store_);
OH_Rdb_DeleteStoreV2(config);
```

+ 1
- 1
en/application-dev/database/share-data-by-silent-access-sys.md View File

@@ -335,7 +335,7 @@ In the **module.json5** file, set the data to be hosted in **proxyData**. For de
let dseUri = ('datashareproxy://com.acts.ohos.data.datasharetest/weather');
```

3. Create a **DataAbilityHelper** instance.
3. Create a **DataShareHelper** instance.

```ts
let dsHelper: dataShare.DataShareHelper | undefined = undefined;


+ 1
- 1
en/application-dev/database/uniform-data-type-list.md View File

@@ -193,7 +193,7 @@ Generic UTDs define universal data types that can be identified by the vast majo
| general.contact | general.object | - | - | Generic contact type. |
| general.executable | general.object | - | - | Generic executable file type. |
| general.c-object | general.executable | .o | application/x-object | Compiled C file. |
| general.octet-stream | general.object | - | application/octet-stream - | Any binary data type. |
| general.octet-stream | general.object | - | application/octet-stream | Any binary data type. |
| general.mesh-model | general.object | .msh,.mesh,.silo | model/mesh | 3D mesh model format. |
| general.certificate | general.object | - | - | Generic certificate type. |
| general.cer-certificate | general.certificate | .cer | application/pkix-cert | Internet certificate format. |


+ 4
- 4
en/application-dev/media/media/using-ndk-avrecorder-for-audio-recording.md View File

@@ -206,8 +206,8 @@ target_link_libraries(entry PUBLIC libhilog_ndk.z.so)
SetConfig(*config);

// 1. Set the URL. (This operation is required when APP_CREATE is selected for fileGenerationMode.)
const std::string AVREORDER_ROOT = "/data/storage/el2/base/files/";
int32_t outputFd = open((AVREORDER_ROOT + "avrecorder01.mp3").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
const std::string AVRECORDER_ROOT = "/data/storage/el2/base/files/";
int32_t outputFd = open((AVRECORDER_ROOT + "avrecorder01.mp3").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
std::string fileUrl = "fd://" + std::to_string(outputFd);
config->url = const_cast<char *>(fileUrl.c_str());
OH_LOG_INFO(LOG_APP, "config.url is: %s", const_cast<char *>(fileUrl.c_str()));
@@ -403,8 +403,8 @@ Refer to the sample code below to complete the process of creating a recorder in
SetConfig(*config);

// 1.1 Set the URL. (This operation is required when APP_CREATE is selected for fileGenerationMode.)
const std::string AVREORDER_ROOT = "/data/storage/el2/base/files/";
g_outputFd = open((AVREORDER_ROOT + "avrecorder01.mp3").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
const std::string AVRECORDER_ROOT = "/data/storage/el2/base/files/";
g_outputFd = open((AVRECORDER_ROOT + "avrecorder01.mp3").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
std::string fileUrl = "fd://" + std::to_string(g_outputFd);
config->url = const_cast<char *>(fileUrl.c_str());
OH_LOG_INFO(LOG_APP, "config.url is: %s", const_cast<char *>(fileUrl.c_str()));


+ 4
- 4
en/application-dev/media/media/using-ndk-avrecorder-for-video-recording.md View File

@@ -223,8 +223,8 @@ target_link_libraries(entry PUBLIC libhilog_ndk.z.so)
SetConfig(*config);
// 1. Set the URL. (This operation is required when APP_CREATE is selected for fileGenerationMode.)
const std::string AVREORDER_ROOT = "/data/storage/el2/base/files/";
int32_t outputFd = open((AVREORDER_ROOT + "avrecorder01.mp4").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
const std::string AVRECORDER_ROOT = "/data/storage/el2/base/files/";
int32_t outputFd = open((AVRECORDER_ROOT + "avrecorder01.mp4").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
std::string fileUrl = "fd://" + std::to_string(outputFd);
config->url = const_cast<char *>(fileUrl.c_str());
OH_LOG_INFO(LOG_APP, "config.url is: %s", const_cast<char *>(fileUrl.c_str()));
@@ -451,8 +451,8 @@ Refer to the sample code below to complete the process of creating a recorder in
SetConfig(*config);

// 1.1 Set the URL. (This operation is required when APP_CREATE is selected for fileGenerationMode.)
const std::string AVREORDER_ROOT = "/data/storage/el2/base/files/";
g_outputFd = open((AVREORDER_ROOT + "avrecorder01.mp4").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
const std::string AVRECORDER_ROOT = "/data/storage/el2/base/files/";
g_outputFd = open((AVRECORDER_ROOT + "avrecorder01.mp4").c_str(), O_RDWR | O_CREAT, 0777); // Set the file name.
std::string fileUrl = "fd://" + std::to_string(g_outputFd);
config->url = const_cast<char *>(fileUrl.c_str());



+ 1
- 1
en/application-dev/media/media/using-ndk-lpp-for-playback.md View File

@@ -162,7 +162,7 @@ Include the [lowpower_audio_sink_base.h](../../reference/apis-media-kit/capi-low

## Running the Sample Project

1. Create a project. Download the [sample project](https://gitee.com/harmonyos_samples/guide-snippets/tree/master/MediaKit/LowPowerAVSInk/lowPowerAVSinkSample), and copy its resources to the corresponding directories.
1. Create a project. Download the [sample project](https://gitcode.com/HarmonyOS_Samples/guide-snippets/tree/master/MediaKit/LowPowerAVSInk/lowPowerAVSinkSample), and copy its resources to the corresponding directories.

```
lpp_demo-sample/entry/src/main/


+ 4
- 4
en/application-dev/media/medialibrary/movingphotoview-guidelines.md View File

@@ -21,10 +21,10 @@ The restrictions on using the **MovingPhotoView** component are as follows:

1. Import modules.

**NOTE**
- **MovingPhotoViewAttribute** is essential for configuring the **MovingPhotoView** component. In API version 21 and earlier, you must manually import **MovingPhotoViewAttribute** after importing the **MovingPhotoView** component. Otherwise, a compilation error is reported. However, starting from API version 22, the compilation toolchain automatically imports **MovingPhotoViewAttribute** when it detects the **MovingPhotoView** component, so manual import is no longer necessary.
- If you manually import **MovingPhotoViewAttribute**, DevEco Studio shows it as disabled (grayed out). In API version 21 and earlier, removing this import causes a compilation error. But from API version 22 onward, removing it does not affect the functionality.
> **NOTE**
>
> - **MovingPhotoViewAttribute** is essential for configuring the **MovingPhotoView** component. In API version 21 and earlier, you must manually import **MovingPhotoViewAttribute** after importing the **MovingPhotoView** component. Otherwise, a compilation error is reported. However, starting from API version 22, the compilation toolchain automatically imports **MovingPhotoViewAttribute** when it detects the **MovingPhotoView** component, so manual import is no longer necessary.
> - After **MovingPhotoViewAttribute** is imported, DevEco Studio displays it as grayed out, but this does not affect its usage.

API version 21 and earlier:



+ 4
- 2
en/application-dev/media/medialibrary/photoAccessHelper-photoviewpicker.md View File

@@ -120,7 +120,8 @@ The media library allows **Picker** to select a [media file URI](../../file-mana
};
try {
let fetchResult: photoAccessHelper.FetchResult<photoAccessHelper.PhotoAsset> = await phAccessHelper.getAssets(fetchOptions);
let fetchResult: photoAccessHelper.FetchResult<photoAccessHelper.PhotoAsset> =
await phAccessHelper.getAssets(fetchOptions);
let photoAsset: photoAccessHelper.PhotoAsset = await fetchResult.getFirstObject();
console.info('getAssets photoAsset.uri : ' + photoAsset.uri);
// Obtain the file attribute information, such as the title. If the attribute to obtain is not a default one, add the column name to fetchColumns.
@@ -129,7 +130,8 @@ The media library allows **Picker** to select a [media file URI](../../file-mana
let requestOptions: photoAccessHelper.RequestOptions = {
deliveryMode: photoAccessHelper.DeliveryMode.HIGH_QUALITY_MODE,
}
await photoAccessHelper.MediaAssetManager.requestImageData(context, photoAsset, requestOptions, new MediaDataHandler());
await photoAccessHelper.MediaAssetManager.requestImageData(
context, photoAsset, requestOptions, new MediaDataHandler());
console.info('requestImageData successfully');
fetchResult.close();
} catch (err) {


+ 1
- 1
en/application-dev/media/medialibrary/photoAccessHelper-preparation.md View File

@@ -56,9 +56,9 @@ The required permissions must be authorized by the user. After adding the permis
**How to Develop**
<!--RP1-->
1. Request the required permissions via the ACL. For details, see [Requesting Restricted Permissions](../../security/AccessToken/declare-permissions-in-acl.md).
<!--RP1End-->
2. [Declare the required permissions in the **module.json5** file](../../security/AccessToken/declare-permissions.md).
3. [Request user authorization](../../security/AccessToken/request-user-authorization.md).
<!--RP1End-->

> **NOTE**
>


+ 3
- 3
en/application-dev/reference/apis-ability-kit/js-apis-app-ability-appRecovery.md View File

@@ -123,7 +123,7 @@ import { BusinessError } from '@kit.BasicServicesKit';

let observer: errorManager.ErrorObserver = {
onUnhandledException(errorMsg) {
console.log('onUnhandledException, errorMsg: ', errorMsg);
console.error('onUnhandledException, errorMsg: ', errorMsg);
appRecovery.restartApp();
}
};
@@ -161,7 +161,7 @@ import { BusinessError } from '@kit.BasicServicesKit';

let observer: errorManager.ErrorObserver = {
onUnhandledException(errorMsg) {
console.log('onUnhandledException, errorMsg: ', errorMsg);
console.error('onUnhandledException, errorMsg: ', errorMsg);
appRecovery.saveAppState();
}
};
@@ -205,7 +205,7 @@ import { BusinessError } from '@kit.BasicServicesKit';

let observer: errorManager.ErrorObserver = {
onUnhandledException(errorMsg) {
console.log('onUnhandledException, errorMsg: ', errorMsg);
console.error('onUnhandledException, errorMsg: ', errorMsg);
appRecovery.saveAppState(this.context);
}
};


+ 2
- 2
en/application-dev/reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md View File

@@ -3555,7 +3555,7 @@ struct Index {
}
```

### setMissionWindowIcon<sup>22+<sup>
### setMissionWindowIcon<sup>22+</sup>

setMissionWindowIcon(windowIcon: image.PixelMap): Promise\<void>

@@ -3586,7 +3586,7 @@ For details about the error codes, see [Universal Error Codes](../errorcode-univ
| ID| Error Message|
| ------- | -------------------------------- |
| 801 | Capability not supported. |
| 16000050 | Internal error. Internal error. 1. Connect to system service failed; 2.System service failed to communicate with dependency module.|
| 16000050 | Internal error. 1. Connect to system service failed; 2.System service failed to communicate with dependency module.|
| 16000135 | The main window of this ability not exist. |

**Example**


+ 12
- 1
en/application-dev/reference/apis-ability-kit/js-apis-inner-wantAgent-wantAgentInfo-sys.md View File

@@ -1,4 +1,4 @@
# WantAgentInfo
# WantAgentInfo (System API)

<!--Kit: Ability Kit-->
<!--Subsystem: Ability-->
@@ -21,6 +21,17 @@ The module defines the information required for triggering a WantAgent.
import { wantAgent as abilityWantAgent } from '@kit.AbilityKit';
```

## WantAgentInfo

Defines the information required for triggering a WantAgent object. The information can be used as an input parameter in [getWantAgent](js-apis-app-ability-wantAgent.md#wantagentgetwantagent) to obtain a specified WantAgent object.

**System capability**: SystemCapability.Ability.AbilityRuntime.Core

| Name | Type | Read-Only| Optional| Description |
| -------------- | ------------------------------ | ---- | ---- |---------------------- |
| userId<sup>22+</sup> | number | No| Yes| User ID.<br>The value must be greater than or equal to 0.<br>The default value is the user ID of the caller. <br>**Model restriction**: This API can be used only in the stage model.|


## LocalWantAgentInfo<sup>20+</sup>

Defines the information required for triggering a local WantAgent object. The information can be used as an input parameter in [createLocalWantAgent](js-apis-app-ability-wantAgent-sys.md#wantagentcreatelocalwantagent20) to obtain a local WantAgent object.


+ 8
- 11
en/application-dev/reference/apis-ability-kit/js-apis-inner-wantAgent-wantAgentInfo.md View File

@@ -23,18 +23,15 @@ import { wantAgent as abilityWantAgent } from '@kit.AbilityKit';

Defines the information required for triggering a WantAgent object. The information can be used as an input parameter in [getWantAgent](js-apis-app-ability-wantAgent.md#wantagentgetwantagent) to obtain a specified WantAgent object.

**Atomic service API**: This API can be used in atomic services since API version 12.

**System capability**: SystemCapability.Ability.AbilityRuntime.Core

| Name | Type | Read-Only| Optional| Description |
| -------------- | ------------------------------ | ---- | ---- |---------------------- |
| wants | Array\<[Want](js-apis-app-ability-want.md)\> | No| No| Array of all Want objects. Currently, only one Want is supported. The array is reserved for future capability expansion. If multiple values are passed in, only the first member in the array is used. |
| operationType<sup>(deprecated)</sup> | [wantAgent.OperationType](js-apis-wantAgent.md#operationtype) | No| Yes| Operation type.<br>This attribute is supported since API version 7 and deprecated since API version 11. You are advised to use actionType<sup>11+</sup> instead. |
| actionType<sup>11+</sup> | [abilityWantAgent.OperationType](js-apis-app-ability-wantAgent.md#operationtype) | No| Yes| Operation type. |
| requestCode | number | No| No| Custom request code, which is used to identify the operation to execute.|
| wantAgentFlags<sup>(deprecated)</sup> | Array<[wantAgent.WantAgentFlags](js-apis-wantAgent.md#wantagentflags)> | No| Yes| Array of flags for using the WantAgent object.<br>This attribute is supported since API version 7 and deprecated since API version 11. You are advised to use actionFlags<sup>11+</sup> instead. |
| actionFlags<sup>11+</sup> | Array<[abilityWantAgent.WantAgentFlags](js-apis-app-ability-wantAgent.md#wantagentflags)> | No| Yes| Array of flags for using the WantAgent object. |
| extraInfo | { [key: string]: any } | No| Yes| Extra information. |
| extraInfos<sup>11+</sup> | Record\<string, Object> | No| Yes| Extra information. You are advised to use this property to replace **extraInfo**. When this property is set, **extraInfo** does not take effect. |
| userId<sup>22+</sup> | number | No| Yes| User ID.<br>The value must be greater than or equal to 0.<br>The default value is the user ID of the caller. |
| wants | Array\<[Want](js-apis-app-ability-want.md)\> | No| No| Array of all Want objects. Currently, only one Want is supported. The array is reserved for future capability expansion. If multiple values are passed in, only the first member in the array is used.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| operationType<sup>(deprecated)</sup> | [wantAgent.OperationType](js-apis-wantAgent.md#operationtype) | No| Yes| Operation type.<br>This attribute is supported since API version 7 and deprecated since API version 11. You are advised to use actionType<sup>11+</sup> instead.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| actionType<sup>11+</sup> | [abilityWantAgent.OperationType](js-apis-app-ability-wantAgent.md#operationtype) | No| Yes| Operation type.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| requestCode | number | No| No| Custom request code, which is used to identify the operation to execute.<br>**Atomic service API**: This API can be used in atomic services since API version 12.|
| wantAgentFlags<sup>(deprecated)</sup> | Array<[wantAgent.WantAgentFlags](js-apis-wantAgent.md#wantagentflags)> | No| Yes| Array of flags for using the WantAgent object.<br>This attribute is supported since API version 7 and deprecated since API version 11. You are advised to use actionFlags<sup>11+</sup> instead.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| actionFlags<sup>11+</sup> | Array<[abilityWantAgent.WantAgentFlags](js-apis-app-ability-wantAgent.md#wantagentflags)> | No| Yes| Array of flags for using the WantAgent object.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| extraInfo | { [key: string]: any } | No| Yes| Extra information.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |
| extraInfos<sup>11+</sup> | Record\<string, Object> | No| Yes| Extra information. You are advised to use this property to replace **extraInfo**. When this property is set, **extraInfo** does not take effect.<br>**Atomic service API**: This API can be used in atomic services since API version 12. |

+ 1
- 1
en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-RdbPredicates.md View File

@@ -22,7 +22,7 @@ import { relationalStore } from '@kit.ArkData';

constructor(name: string)

A constructor used to create an **RdbPredicates** object.
Defines a constructor used to create an **RdbPredicates** object.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core



+ 7
- 7
en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-RdbStore.md View File

@@ -597,7 +597,7 @@ batchInsert(table: string, values: Array&lt;ValuesBucket&gt;, callback: AsyncCal

Inserts data into a table in batches. This API uses an asynchronous callback to return the result.

This API returns either an error or **-1** if the data fails to be inserted.
The data insertion fails if the API returns an error, or if it returns ** -1** without throwing an error.

[Vector store](arkts-apis-data-relationalStore-i.md#storeconfig) is supported since API version 20.

@@ -691,7 +691,7 @@ batchInsert(table: string, values: Array&lt;ValuesBucket&gt;):Promise&lt;number&

Inserts data into a table in batches. This API uses a promise to return the result.

This API returns either an error or **-1** if the data fails to be inserted.
The data insertion fails if the API returns an error, or if it returns **-1** without throwing an error.

[Vector store](arkts-apis-data-relationalStore-i.md#storeconfig) is supported since API version 20.

@@ -813,7 +813,7 @@ batchInsertSync(table: string, values: Array&lt;ValuesBucket&gt;):number

Inserts data into a table with conflict resolutions in batches. This API returns the result synchronously.

This API returns either an error or **-1** if the data fails to be inserted.
The data insertion fails if the API returns an error, or if it returns **-1** without throwing an error.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core

@@ -913,11 +913,11 @@ batchInsertWithConflictResolution(table: string, values: Array&lt;ValuesBucket&g

Inserts data into a table in batches. You can use the **conflict** parameter to specify [ConflictResolution](arkts-apis-data-relationalStore-e.md#conflictresolution10). This API uses a promise to return the result.

A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The number of inserted data records multiplied by the size of the union across all fields in the inserted data equals the number of parameters.
A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The product of the number of inserted data records and the size of the union of all fields in the inserted data equals the number of parameters.

For example, if the size of the union is 10, a maximum of 3276 data records can be inserted (3276 × 10 = 32760).

Ensure that you comply with this constraint when calling this API to avoid errors caused by excessive parameters.
Ensure that your application complies with this constraint when calling this API to avoid errors caused by excessive parameters.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core

@@ -1015,11 +1015,11 @@ batchInsertWithConflictResolutionSync(table: string, values: Array&lt;ValuesBuck

Inserts data into a table in batches. You can use the **conflict** parameter to specify [ConflictResolution](arkts-apis-data-relationalStore-e.md#conflictresolution10).

A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The number of inserted data records multiplied by the size of the union across all fields in the inserted data equals the number of parameters.
A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The product of the number of inserted data records and the size of the union of all fields in the inserted data equals the number of parameters.

For example, if the size of the union is 10, a maximum of 3276 data records can be inserted (3276 × 10 = 32760).

Ensure that you comply with this constraint when calling this API to avoid errors caused by excessive parameters.
Ensure that your application complies with this constraint when calling this API to avoid errors caused by excessive parameters.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core



+ 4
- 4
en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-Transaction.md View File

@@ -499,11 +499,11 @@ batchInsertWithConflictResolution(table: string, values: Array&lt;ValuesBucket&g

Inserts data into a table with conflict resolutions in batches. You can use the **conflict** parameter to specify [ConflictResolution](arkts-apis-data-relationalStore-e.md#conflictresolution10). This API uses a promise to return the result.

A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The number of inserted data records multiplied by the size of the union across all fields in the inserted data equals the number of parameters.
A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The product of the number of inserted data records and the size of the union of all fields in the inserted data equals the number of parameters.

For example, if the size of the union is 10, a maximum of 3276 data records can be inserted (3276 × 10 = 32760).

Ensure that you comply with this constraint when calling this API to avoid errors caused by excessive parameters.
Ensure that your application complies with this constraint when calling this API to avoid errors caused by excessive parameters.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core

@@ -599,11 +599,11 @@ batchInsertWithConflictResolutionSync(table: string, values: Array&lt;ValuesBuck

Inserts data into a table with conflict resolutions in batches. You can use the **conflict** parameter to specify [ConflictResolution](arkts-apis-data-relationalStore-e.md#conflictresolution10).

A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The number of inserted data records multiplied by the size of the union across all fields in the inserted data equals the number of parameters.
A maximum of 32766 parameters can be inserted at a time. If the number of parameters exceeds the upper limit, the error code 14800000 is returned. The product of the number of inserted data records and the size of the union of all fields in the inserted data equals the number of parameters.

For example, if the size of the union is 10, a maximum of 3276 data records can be inserted (3276 × 10 = 32760).

Ensure that you comply with this constraint when calling this API to avoid errors caused by excessive parameters.
Ensure that your application complies with this constraint when calling this API to avoid errors caused by excessive parameters.

**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core



+ 1
- 1
en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-i.md View File

@@ -60,7 +60,7 @@ Represents the asset (such as a document, image, or video).
| path | string | No| No| Path of an asset in the application sandbox.|
| createTime | string | No| No| Time when an asset is created.|
| modifyTime | string | No| No| Time when an asset is last modified.|
| size | string | No| No| Asset size.|
| size | string | No| No| Asset size. In the device-cloud synchronization mechanism, this field is one of the key bases for determining whether an asset is changed. Ensure that the storage format and value logic are consistent across the end-to-end link. It is recommended that all system nodes use the standard processing format (unit: byte; value: a non-negative integer) to avoid synchronization exceptions or misjudgment caused by format differences.|
| status | [AssetStatus](arkts-apis-data-relationalStore-e.md#assetstatus10) | No | Yes | Asset status. <br>Default value: **ASSET_NORMAL**.|

## ChangeInfo<sup>10+</sup>


+ 1
- 1
en/application-dev/reference/apis-arkdata/arkts-apis-data-relationalStore-t.md View File

@@ -40,7 +40,7 @@ Defines the types of the value in a KV pair. The type varies with the parameter
| Asset<sup>10+</sup> | [Asset](arkts-apis-data-relationalStore-i.md#asset10).<br>If the value type is Asset, the type in the SQL statement for creating a table must be ASSET.|
| Assets<sup>10+</sup> | [Assets](#assets10).<br>If the value type is Assets, the type in the SQL statement for creating a table must be ASSETS.|
| Float32Array<sup>12+</sup> | Array of 32-bit floating-point numbers.<br>If the field type is Float32Array, the type in the SQL statement for creating a table must be floatvector(128).|
| bigint<sup>12+</sup> | Integer of any length.<br>If the value type is bigint, the type in the SQL statement for creating a table must be **UNLIMITED INT**. For details, see [Persisting RDB Store Data](../../database/data-persistence-by-rdb-store.md).<br>Note: The bigint type does not support value comparison and cannot be used with the following predicates: **between**, **notBetween**, **greaterThan**, **lessThan**, **greaterThanOrEqualTo**, **lessThanOrEqualTo**, **orderByAsc**, and **orderByDesc**<br>To write a value of bigint type, use **BigInt()** or add **n** to the end of the value, for example,'let data = BigInt(1234)' or 'let data = 1234n'.<br>If data of the number type is written to a bigint field, the type of the return value obtained (queried) is number but not bigint. |
| bigint<sup>12+</sup> | Integer of any length.<br>If the value type is bigint, the type in the SQL statement for creating a table must be **UNLIMITED INT**. For details, see [Persisting RDB Store Data](../../database/data-persistence-by-rdb-store.md).<br>**NOTE**<br>The bigint type does not support value comparison and cannot be used with the following predicates: **between**, **notBetween**, **greaterThan**, **lessThan**, **greaterThanOrEqualTo**, **lessThanOrEqualTo**, **orderByAsc**, and **orderByDesc**<br>To write a value of bigint type, use **BigInt()** or add **n** to the end of the value, for example,'let data = BigInt(1234)' or 'let data = 1234n'.<br>If data of the number type is written to a bigint field, the type of the return value obtained (queried) is number but not bigint.|

## ValuesBucket



+ 20
- 20
en/application-dev/reference/apis-arkdata/capi-data-asset-h.md View File

@@ -61,7 +61,7 @@ Defines data asset structs.<br>Asset is a data struct used in data management. Y

### Data_AssetStatus

```
```c
enum Data_AssetStatus
```

@@ -86,13 +86,13 @@ Enumerates the data asset statuses.

### OH_Data_Asset_SetName()

```
```c
int OH_Data_Asset_SetName(Data_Asset *asset, const char *name)
```

**Description**

Sets the name of a data asset.
Sets the name of an asset.

**Since**: 11

@@ -112,7 +112,7 @@ Sets the name of a data asset.

### OH_Data_Asset_SetUri()

```
```c
int OH_Data_Asset_SetUri(Data_Asset *asset, const char *uri)
```

@@ -138,7 +138,7 @@ Sets the absolute path (URI) of an asset in the system.

### OH_Data_Asset_SetPath()

```
```c
int OH_Data_Asset_SetPath(Data_Asset *asset, const char *path)
```

@@ -164,7 +164,7 @@ Sets the relative path of an asset in the application sandbox directory.

### OH_Data_Asset_SetCreateTime()

```
```c
int OH_Data_Asset_SetCreateTime(Data_Asset *asset, int64_t createTime)
```

@@ -190,7 +190,7 @@ Sets the creation time for an asset.

### OH_Data_Asset_SetModifyTime()

```
```c
int OH_Data_Asset_SetModifyTime(Data_Asset *asset, int64_t modifyTime)
```

@@ -216,7 +216,7 @@ Sets the last modification time for a data asset.

### OH_Data_Asset_SetSize()

```
```c
int OH_Data_Asset_SetSize(Data_Asset *asset, size_t size)
```

@@ -242,7 +242,7 @@ Sets the size of an asset.

### OH_Data_Asset_SetStatus()

```
```c
int OH_Data_Asset_SetStatus(Data_Asset *asset, Data_AssetStatus status)
```

@@ -268,7 +268,7 @@ Sets the status of an asset.

### OH_Data_Asset_GetName()

```
```c
int OH_Data_Asset_GetName(Data_Asset *asset, char *name, size_t *length)
```

@@ -295,7 +295,7 @@ Obtains the name of a data asset.

### OH_Data_Asset_GetUri()

```
```c
int OH_Data_Asset_GetUri(Data_Asset *asset, char *uri, size_t *length)
```

@@ -322,7 +322,7 @@ Obtains the absolute path (URI) of a data asset.

### OH_Data_Asset_GetPath()

```
```c
int OH_Data_Asset_GetPath(Data_Asset *asset, char *path, size_t *length)
```

@@ -349,7 +349,7 @@ Obtains the relative path of a data asset.

### OH_Data_Asset_GetCreateTime()

```
```c
int OH_Data_Asset_GetCreateTime(Data_Asset *asset, int64_t *createTime)
```

@@ -379,7 +379,7 @@ Data_Asset

### OH_Data_Asset_GetModifyTime()

```
```c
int OH_Data_Asset_GetModifyTime(Data_Asset *asset, int64_t *modifyTime)
```

@@ -405,7 +405,7 @@ Obtains the last modification time of an asset.

### OH_Data_Asset_GetSize()

```
```c
int OH_Data_Asset_GetSize(Data_Asset *asset, size_t *size)
```

@@ -431,7 +431,7 @@ Obtains the space occupied by an asset.

### OH_Data_Asset_GetStatus()

```
```c
int OH_Data_Asset_GetStatus(Data_Asset *asset, Data_AssetStatus *status)
```

@@ -457,7 +457,7 @@ Obtains the status of a data asset.

### OH_Data_Asset_CreateOne()

```
```c
Data_Asset *OH_Data_Asset_CreateOne(void)
```

@@ -475,7 +475,7 @@ Creates a [Data_Asset](capi-rdb-data-asset.md) instance.

### OH_Data_Asset_DestroyOne()

```
```c
int OH_Data_Asset_DestroyOne(Data_Asset *asset)
```

@@ -499,7 +499,7 @@ Destroys a [Data_Asset](capi-rdb-data-asset.md) object and reclaims the memory o

### OH_Data_Asset_CreateMultiple()

```
```c
Data_Asset **OH_Data_Asset_CreateMultiple(uint32_t count)
```

@@ -524,7 +524,7 @@ Creates a specified number of [Data_Asset](capi-rdb-data-asset.md) instances.

### OH_Data_Asset_DestroyMultiple()

```
```c
int OH_Data_Asset_DestroyMultiple(Data_Asset **assets, uint32_t count)
```



+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-oh-cursor-h.md View File

@@ -39,7 +39,7 @@ Provides APIs to access the result set obtained by querying the RDB store. A res

### OH_Cursor_GetFloatVectorCount()

```
```c
int OH_Cursor_GetFloatVectorCount(OH_Cursor *cursor, int32_t columnIndex, size_t *length)
```

@@ -66,7 +66,7 @@ Obtains the length of a floating-point array in the specified column of the curr

### OH_Cursor_GetFloatVector()

```
```c
int OH_Cursor_GetFloatVector(OH_Cursor *cursor, int32_t columnIndex, float *val, size_t inLen, size_t *outLen)
```



+ 25
- 25
en/application-dev/reference/apis-arkdata/capi-oh-data-value-h.md View File

@@ -67,7 +67,7 @@ Defines APIs and enums related to a single data value.<br>Since API version 18,

### OH_ColumnType

```
```c
enum OH_ColumnType
```

@@ -94,7 +94,7 @@ Enumerates the column types.

### OH_Value_Create()

```
```c
OH_Data_Value *OH_Value_Create(void)
```

@@ -112,7 +112,7 @@ Creates an [OH_Data_Values](capi-rdb-oh-data-values.md) instance to store a sing

### OH_Value_Destroy()

```
```c
int OH_Value_Destroy(OH_Data_Value *value)
```

@@ -137,7 +137,7 @@ Destroys an [OH_Data_Value](capi-rdb-oh-data-value.md) instance.

### OH_Value_PutNull()

```
```c
int OH_Value_PutNull(OH_Data_Value *value)
```

@@ -162,7 +162,7 @@ Adds empty data to an **OH_Data_Value** instance.

### OH_Value_PutInt()

```
```c
int OH_Value_PutInt(OH_Data_Value *value, int64_t val)
```

@@ -188,7 +188,7 @@ Adds an integer to an **OH_Data_Value** instance.

### OH_Value_PutReal()

```
```c
int OH_Value_PutReal(OH_Data_Value *value, double val)
```

@@ -214,7 +214,7 @@ Adds REAL data to an **OH_Data_Value** instance.

### OH_Value_PutText()

```
```c
int OH_Value_PutText(OH_Data_Value *value, const char *val)
```

@@ -240,7 +240,7 @@ Adds a string to an **OH_Data_Value** instance.

### OH_Value_PutBlob()

```
```c
int OH_Value_PutBlob(OH_Data_Value *value, const unsigned char *val, size_t length)
```

@@ -267,7 +267,7 @@ Adds BLOB data to an **OH_Data_Value** instance.

### OH_Value_PutAsset()

```
```c
int OH_Value_PutAsset(OH_Data_Value *value, const Data_Asset *val)
```

@@ -293,7 +293,7 @@ Adds an asset to an **OH_Data_Value** instance.

### OH_Value_PutAssets()

```
```c
int OH_Value_PutAssets(OH_Data_Value *value, const Data_Asset * const * val, size_t length)
```

@@ -320,7 +320,7 @@ Adds assets to an **OH_Data_Value** instance.

### OH_Value_PutFloatVector()

```
```c
int OH_Value_PutFloatVector(OH_Data_Value *value, const float *val, size_t length)
```

@@ -347,7 +347,7 @@ Adds a float array to an **OH_Data_Value** instance.

### OH_Value_PutUnlimitedInt()

```
```c
int OH_Value_PutUnlimitedInt(OH_Data_Value *value, int sign, const uint64_t *trueForm, size_t length)
```

@@ -375,7 +375,7 @@ Adds an integer array of any length to an **OH_Data_Value** instance.

### OH_Value_GetType()

```
```c
int OH_Value_GetType(OH_Data_Value *value, OH_ColumnType *type)
```

@@ -401,7 +401,7 @@ Obtains the data type.

### OH_Value_IsNull()

```
```c
int OH_Value_IsNull(OH_Data_Value *value, bool *val)
```

@@ -427,7 +427,7 @@ Checks whether a value is null.

### OH_Value_GetInt()

```
```c
int OH_Value_GetInt(OH_Data_Value *value, int64_t *val)
```

@@ -453,7 +453,7 @@ Obtains the integer from an **OH_Data_Value** instance.

### OH_Value_GetReal()

```
```c
int OH_Value_GetReal(OH_Data_Value *value, double *val)
```

@@ -479,7 +479,7 @@ Obtains the REAL data from an **OH_Data_Value** instance.

### OH_Value_GetText()

```
```c
int OH_Value_GetText(OH_Data_Value *value, const char **val)
```

@@ -505,7 +505,7 @@ Obtains the string from an **OH_Data_Value** instance.

### OH_Value_GetBlob()

```
```c
int OH_Value_GetBlob(OH_Data_Value *value, const uint8_t **val, size_t *length)
```

@@ -532,7 +532,7 @@ Obtains the BLOB data from an **OH_Data_Value** instance.

### OH_Value_GetAsset()

```
```c
int OH_Value_GetAsset(OH_Data_Value *value, Data_Asset *val)
```

@@ -558,7 +558,7 @@ Obtains the asset from an **OH_Data_Value** instance.

### OH_Value_GetAssetsCount()

```
```c
int OH_Value_GetAssetsCount(OH_Data_Value *value, size_t *length)
```

@@ -584,7 +584,7 @@ Obtains the length of the assets in an **OH_Data_Value** instance.

### OH_Value_GetAssets()

```
```c
int OH_Value_GetAssets(OH_Data_Value *value, Data_Asset **val, size_t inLen, size_t *outLen)
```

@@ -612,7 +612,7 @@ Obtains the assets from an **OH_Data_Value** instance.

### OH_Value_GetFloatVectorCount()

```
```c
int OH_Value_GetFloatVectorCount(OH_Data_Value *value, size_t *length)
```

@@ -638,7 +638,7 @@ Obtains the length of the float array in an **OH_Data_Value** instance.

### OH_Value_GetFloatVector()

```
```c
int OH_Value_GetFloatVector(OH_Data_Value *value, float *val, size_t inLen, size_t *outLen)
```

@@ -666,7 +666,7 @@ Obtains the float array from an **OH_Data_Value** instance.

### OH_Value_GetUnlimitedIntBand()

```
```c
int OH_Value_GetUnlimitedIntBand(OH_Data_Value *value, size_t *length)
```

@@ -692,7 +692,7 @@ Obtains the length of the unlimited integer from an **OH_Data_Value** instance.

### OH_Value_GetUnlimitedInt()

```
```c
int OH_Value_GetUnlimitedInt(OH_Data_Value *value, int *sign, uint64_t *trueForm, size_t inLen, size_t *outLen)
```



+ 5
- 5
en/application-dev/reference/apis-arkdata/capi-oh-data-values-buckets-h.md View File

@@ -42,7 +42,7 @@ Defines structs, APIs, and enums related to stored data values.

### OH_VBuckets_Create()

```
```c
OH_Data_VBuckets *OH_VBuckets_Create(void)
```

@@ -60,7 +60,7 @@ Creates an **OH_Data_VBuckets** instance.

### OH_VBuckets_Destroy()

```
```c
int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets)
```

@@ -85,7 +85,7 @@ Destroys an **OH_Data_VBuckets** instance.

### OH_VBuckets_PutRow()

```
```c
int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row)
```

@@ -111,7 +111,7 @@ Adds data of the **OH_VBucket** type to an **OH_Data_VBuckets** instance.

### OH_VBuckets_PutRows()

```
```c
int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows)
```

@@ -137,7 +137,7 @@ Adds data of the **OH_Data_VBuckets** type to an **OH_Data_VBuckets** instance.

### OH_VBuckets_RowCount()

```
```c
int OH_VBuckets_RowCount(OH_Data_VBuckets *buckets, size_t *count)
```



+ 27
- 27
en/application-dev/reference/apis-arkdata/capi-oh-data-values-h.md View File

@@ -64,7 +64,7 @@ Defines APIs and enums related to multiple data values.

### OH_Values_Create()

```
```c
OH_Data_Values *OH_Values_Create(void)
```

@@ -82,7 +82,7 @@ Creates an [OH_Data_Values](capi-rdb-oh-data-values.md) instance to store multip

### OH_Values_Destroy()

```
```c
int OH_Values_Destroy(OH_Data_Values *values)
```

@@ -107,7 +107,7 @@ Destroys an [OH_Data_Values](capi-rdb-oh-data-values.md) instance.

### OH_Values_Put()

```
```c
int OH_Values_Put(OH_Data_Values *values, const OH_Data_Value *val)
```

@@ -133,7 +133,7 @@ Adds data of the **OH_Data_Value** type to an **OH_Data_Values** instance.

### OH_Values_PutNull()

```
```c
int OH_Values_PutNull(OH_Data_Values *values)
```

@@ -158,7 +158,7 @@ Adds empty data to an **OH_Data_Values** instance.

### OH_Values_PutInt()

```
```c
int OH_Values_PutInt(OH_Data_Values *values, int64_t val)
```

@@ -184,7 +184,7 @@ Adds an integer to an **OH_Data_Values** instance.

### OH_Values_PutReal()

```
```c
int OH_Values_PutReal(OH_Data_Values *values, double val)
```

@@ -210,7 +210,7 @@ Adds REAL data to an **OH_Data_Values** instance.

### OH_Values_PutText()

```
```c
int OH_Values_PutText(OH_Data_Values *values, const char *val)
```

@@ -236,7 +236,7 @@ Adds a string to an **OH_Data_Values** instance.

### OH_Values_PutBlob()

```
```c
int OH_Values_PutBlob(OH_Data_Values *values, const unsigned char *val, size_t length)
```

@@ -263,7 +263,7 @@ Adds BLOB data to an **OH_Data_Values** instance.

### OH_Values_PutAsset()

```
```c
int OH_Values_PutAsset(OH_Data_Values *values, const Data_Asset *val)
```

@@ -289,7 +289,7 @@ Adds an asset to an **OH_Data_Values** instance.

### OH_Values_PutAssets()

```
```c
int OH_Values_PutAssets(OH_Data_Values *values, const Data_Asset * const * val, size_t length)
```

@@ -316,7 +316,7 @@ Adds assets to an **OH_Data_Values** instance.

### OH_Values_PutFloatVector()

```
```c
int OH_Values_PutFloatVector(OH_Data_Values *values, const float *val, size_t length)
```

@@ -343,7 +343,7 @@ Adds a float array to an **OH_Data_Values** instance.

### OH_Values_PutUnlimitedInt()

```
```c
int OH_Values_PutUnlimitedInt(OH_Data_Values *values, int sign, const uint64_t *trueForm, size_t length)
```

@@ -371,7 +371,7 @@ Adds an integer array of any length to an **OH_Data_Values** instance.

### OH_Values_Count()

```
```c
int OH_Values_Count(OH_Data_Values *values, size_t *count)
```

@@ -397,7 +397,7 @@ Obtains the number of records in an **OH_Data_Values** instance.

### OH_Values_GetType()

```
```c
int OH_Values_GetType(OH_Data_Values *values, int index, OH_ColumnType *type)
```

@@ -424,7 +424,7 @@ Obtains the data type.

### OH_Values_Get()

```
```c
int OH_Values_Get(OH_Data_Values *values, int index, OH_Data_Value **val)
```

@@ -451,7 +451,7 @@ Obtains data of the **OH_Data_Value** type.

### OH_Values_IsNull()

```
```c
int OH_Values_IsNull(OH_Data_Values *values, int index, bool *val)
```

@@ -478,7 +478,7 @@ Checks whether a value is null.

### OH_Values_GetInt()

```
```c
int OH_Values_GetInt(OH_Data_Values *values, int index, int64_t *val)
```

@@ -505,7 +505,7 @@ Obtains the integer from an **OH_Data_Values** instance.

### OH_Values_GetReal()

```
```c
int OH_Values_GetReal(OH_Data_Values *values, int index, double *val)
```

@@ -532,7 +532,7 @@ Obtains the REAL data from an **OH_Data_Values** instance.

### OH_Values_GetText()

```
```c
int OH_Values_GetText(OH_Data_Values *values, int index, const char **val)
```

@@ -559,7 +559,7 @@ Obtains the string from an **OH_Data_Values** instance.

### OH_Values_GetBlob()

```
```c
int OH_Values_GetBlob(OH_Data_Values *values, int index, const uint8_t **val, size_t *length)
```

@@ -587,7 +587,7 @@ Obtains the BLOB data from an **OH_Data_Values** instance.

### OH_Values_GetAsset()

```
```c
int OH_Values_GetAsset(OH_Data_Values *values, int index, Data_Asset *val)
```

@@ -614,7 +614,7 @@ Obtains the asset from an **OH_Data_Values** instance.

### OH_Values_GetAssetsCount()

```
```c
int OH_Values_GetAssetsCount(OH_Data_Values *values, int index, size_t *length)
```

@@ -641,7 +641,7 @@ Obtains the length of the asset in an **OH_Data_Values** instance.

### OH_Values_GetAssets()

```
```c
int OH_Values_GetAssets(OH_Data_Values *values, int index, Data_Asset **val, size_t inLen, size_t *outLen)
```

@@ -670,7 +670,7 @@ Obtains the assets from an **OH_Data_Values** instance.

### OH_Values_GetFloatVectorCount()

```
```c
int OH_Values_GetFloatVectorCount(OH_Data_Values *values, int index, size_t *length)
```

@@ -697,7 +697,7 @@ Obtains the length of the float array in an **OH_Data_Values** instance.

### OH_Values_GetFloatVector()

```
```c
int OH_Values_GetFloatVector(OH_Data_Values *values, int index, float *val, size_t inLen, size_t *outLen)
```

@@ -726,7 +726,7 @@ Obtains the float array from an **OH_Data_Values** instance.

### OH_Values_GetUnlimitedIntBand()

```
```c
int OH_Values_GetUnlimitedIntBand(OH_Data_Values *values, int index, size_t *length)
```

@@ -753,7 +753,7 @@ Obtains the length of the unlimited integer from an **OH_Data_Values** instance.

### OH_Values_GetUnlimitedInt()

```
```c
int OH_Values_GetUnlimitedInt(OH_Data_Values *values, int index, int *sign, uint64_t *trueForm, size_t inLen, size_t *outLen)
```



+ 5
- 5
en/application-dev/reference/apis-arkdata/capi-oh-predicates-h.md View File

@@ -47,7 +47,7 @@ Defines the predicates for an RDB store.

### OH_OrderType

```
```c
enum OH_OrderType
```

@@ -67,7 +67,7 @@ Enumerates the sorting types.

### OH_Predicates_NotLike()

```
```c
int OH_Predicates_NotLike(OH_Predicates *predicates, const char *field, const char *pattern)
```

@@ -94,7 +94,7 @@ Sets an **OH_Predicates** object to match a string that is not similar to the sp

### OH_Predicates_Glob()

```
```c
int OH_Predicates_Glob(OH_Predicates *predicates, const char *field, const char *pattern)
```

@@ -121,7 +121,7 @@ Sets an **OH_Predicates** object to match a string containing a wildcard.<br>Dif

### OH_Predicates_NotGlob()

```
```c
int OH_Predicates_NotGlob(OH_Predicates *predicates, const char *field, const char *pattern)
```

@@ -148,7 +148,7 @@ Sets an **OH_Predicates** object to not match a string containing a wildcard.<br

### OH_Predicates_Having()

```
```c
int OH_Predicates_Having(OH_Predicates *predicates, const char *conditions, const OH_Data_Values *values)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-oh-preferences-err-code-h.md View File

@@ -32,7 +32,7 @@ Defines the error codes used in the **Preferences** module.

### OH_Preferences_ErrCode

```
```c
enum OH_Preferences_ErrCode
```



+ 27
- 27
en/application-dev/reference/apis-arkdata/capi-oh-preferences-h.md View File

@@ -51,7 +51,7 @@ Provides APIs and structs for accessing the **Preferences** object.

### OH_PreferencesDataObserver()

```
```c
typedef void (*OH_PreferencesDataObserver)(void *context, const OH_PreferencesPair *pairs, uint32_t count)
```

@@ -72,7 +72,7 @@ Defines a struct for the callback for data changes.

### OH_Preferences_Open()

```
```c
OH_Preferences *OH_Preferences_Open(OH_PreferencesOption *option, int *errCode)
```

@@ -98,7 +98,7 @@ Opens a **Preferences** instance and creates a pointer to it.<br>If this pointer

### OH_Preferences_Close()

```
```c
int OH_Preferences_Close(OH_Preferences *preference)
```

@@ -119,11 +119,11 @@ Closes a **Preferences** instance.

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code. For details, see [OH_Preferences_ErrCode](capi-oh-preferences-err-code-h.md#oh_preferences_errcode).<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code. For details, see [OH_Preferences_ErrCode](capi-oh-preferences-err-code-h.md#oh_preferences_errcode).<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

### OH_Preferences_GetInt()

```
```c
int OH_Preferences_GetInt(OH_Preferences *preference, const char *key, int *value)
```

@@ -146,11 +146,11 @@ Obtains an integer corresponding to the specified key in a **Preferences** insta

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|

### OH_Preferences_GetBool()

```
```c
int OH_Preferences_GetBool(OH_Preferences *preference, const char *key, bool *value)
```

@@ -173,11 +173,11 @@ Obtains a Boolean value corresponding to the specified key in a **Preferences**

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|

### OH_Preferences_GetString()

```
```c
int OH_Preferences_GetString(OH_Preferences *preference, const char *key, char **value, uint32_t *valueLen)
```

@@ -201,11 +201,11 @@ Obtains a string corresponding to the specified key in a **Preferences** instanc

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_KEY_NOT_FOUND** indicates the specified key does not exist.|

### OH_Preferences_FreeString()

```
```c
void OH_Preferences_FreeString(char *string)
```

@@ -224,7 +224,7 @@ Releases a string obtained from a **Preferences** instance.

### OH_Preferences_SetInt()

```
```c
int OH_Preferences_SetInt(OH_Preferences *preference, const char *key, int value)
```

@@ -247,11 +247,11 @@ Sets an integer based on the specified key in a **Preferences** instance.

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

### OH_Preferences_SetBool()

```
```c
int OH_Preferences_SetBool(OH_Preferences *preference, const char *key, bool value)
```

@@ -274,11 +274,11 @@ Sets a Boolean value based on the specified key in a **Preferences** instance.

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

### OH_Preferences_SetString()

```
```c
int OH_Preferences_SetString(OH_Preferences *preference, const char *key, const char *value)
```

@@ -301,11 +301,11 @@ Sets a string based on the specified key in a **Preferences** instance.

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

### OH_Preferences_Delete()

```
```c
int OH_Preferences_Delete(OH_Preferences *preference, const char *key)
```

@@ -327,7 +327,7 @@ Deletes the KV data corresponding to the specified key from a **Preferences** in

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

**See**

@@ -335,7 +335,7 @@ OH_Preferences_ErrCode

### OH_Preferences_RegisterDataObserver()

```
```c
int OH_Preferences_RegisterDataObserver(OH_Preferences *preference, void *context,OH_PreferencesDataObserver observer, const char *keys[], uint32_t keyCount)
```

@@ -354,17 +354,17 @@ Subscribes to data changes of the specified keys. If the value of the specified
| void *context | Pointer to the application context. |
| [OH_PreferencesDataObserver](#oh_preferencesdataobserver) observer | [OH_PreferencesDataObserver](capi-oh-preferences-h.md#oh_preferencesdataobserver) callback to be invoked when data changes.|
| const char *keys[] | Pointer to the keys of the data to be observed. |
| uint32_t keyCount | Number of keys observed. |
| uint32_t keyCount | Number of keys. |

**Returns**

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_GET_DATAOBSMGRCLIENT** indicates a failure in obtaining the data change subscription service.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.<br>**PREFERENCES_ERROR_GET_DATAOBSMGRCLIENT** indicates a failure in obtaining the data change subscription service.|

### OH_Preferences_UnregisterDataObserver()

```
```c
int OH_Preferences_UnregisterDataObserver(OH_Preferences *preference, void *context,OH_PreferencesDataObserver observer, const char *keys[], uint32_t keyCount)
```

@@ -381,7 +381,7 @@ Unsubscribes from data changes of the specified keys.
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| [OH_Preferences](capi-preferences-oh-preferences.md) *preference | Pointer to the [OH_Preferences](capi-preferences-oh-preferences.md) instance.|
| void *context | Pointer to the application context. |
| [OH_PreferencesDataObserver](#oh_preferencesdataobserver) observer | [OH_PreferencesDataObserver](capi-oh-preferences-h.md#oh_preferencesdataobserver) callback to unregister.|
| [OH_PreferencesDataObserver](#oh_preferencesdataobserver) observer | [OH_PreferencesDataObserver](capi-oh-preferences-h.md#oh_preferencesdataobserver) callback to be invoked when data changes.|
| const char *keys[] | Pointer to the keys whose changes are not observed. |
| uint32_t keyCount | Number of keys. |

@@ -389,7 +389,7 @@ Unsubscribes from data changes of the specified keys.

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|
| int | Returns an error code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.<br>**PREFERENCES_ERROR_STORAGE** indicates the storage is abnormal.<br>**PREFERENCES_ERROR_MALLOC** indicates a failure in memory allocation.|

**See**

@@ -397,7 +397,7 @@ OH_Preferences_ErrCode

### OH_Preferences_IsStorageTypeSupported()

```
```c
int OH_Preferences_IsStorageTypeSupported(Preferences_StorageType type, bool *isSupported)
```

@@ -416,4 +416,4 @@ int OH_Preferences_IsStorageTypeSupported(Preferences_StorageType type, bool *is

| Type| Description |
| ---- | ------------------------------------------------------------ |
| int | Operation status code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.|
| int | Returns an operation status code.<br>**PREFERENCES_OK** indicates the operation is successful.<br>**PREFERENCES_ERROR_INVALID_PARAM** indicates invalid parameters are specified.|

+ 7
- 7
en/application-dev/reference/apis-arkdata/capi-oh-preferences-option-h.md View File

@@ -49,7 +49,7 @@ Provides APIs and structs for accessing the **PreferencesOption** object.

### Preferences_StorageType

```
```c
enum Preferences_StorageType
```

@@ -69,7 +69,7 @@ Enumerates the preferences storage types.

### OH_PreferencesOption_Create()

```
```c
OH_PreferencesOption *OH_PreferencesOption_Create(void)
```

@@ -87,7 +87,7 @@ Creates a [OH_PreferencesOption](capi-preferences-oh-preferencesoption.md) insta

### OH_PreferencesOption_SetFileName()

```
```c
int OH_PreferencesOption_SetFileName(OH_PreferencesOption *option, const char *fileName)
```

@@ -117,7 +117,7 @@ OH_Preferences_ErrCode

### OH_PreferencesOption_SetBundleName()

```
```c
int OH_PreferencesOption_SetBundleName(OH_PreferencesOption *option, const char *bundleName)
```

@@ -143,7 +143,7 @@ Sets the bundle name for an [OH_PreferencesOption](capi-preferences-oh-preferenc

### OH_PreferencesOption_SetDataGroupId()

```
```c
int OH_PreferencesOption_SetDataGroupId(OH_PreferencesOption *option, const char *dataGroupId)
```

@@ -168,7 +168,7 @@ Sets the application group ID for an [OH_PreferencesOption](capi-preferences-oh-

### OH_PreferencesOption_SetStorageType()

```
```c
int OH_PreferencesOption_SetStorageType(OH_PreferencesOption *option, Preferences_StorageType type)
```

@@ -194,7 +194,7 @@ Sets the storage type for a **Preferences** instance.

### OH_PreferencesOption_Destroy()

```
```c
int OH_PreferencesOption_Destroy(OH_PreferencesOption *option)
```



+ 7
- 7
en/application-dev/reference/apis-arkdata/capi-oh-preferences-value-h.md View File

@@ -50,7 +50,7 @@ Provides APIs, enums, and structs for accessing the **PreferencesValue** object.

### Preference_ValueType

```
```c
enum Preference_ValueType
```

@@ -73,7 +73,7 @@ Enumerates the data types of **PreferencesValue**.

### OH_PreferencesPair_GetKey()

```
```c
const char *OH_PreferencesPair_GetKey(const OH_PreferencesPair *pairs, uint32_t index)
```

@@ -99,7 +99,7 @@ Obtains the key based on the specified index from the KV data.

### OH_PreferencesPair_GetPreferencesValue()

```
```c
const OH_PreferencesValue *OH_PreferencesPair_GetPreferencesValue(const OH_PreferencesPair *pairs, uint32_t index)
```

@@ -126,7 +126,7 @@ Obtains the value based on the specified index from the KV pairs.

### OH_PreferencesValue_GetValueType()

```
```c
Preference_ValueType OH_PreferencesValue_GetValueType(const OH_PreferencesValue *object)
```

@@ -151,7 +151,7 @@ Obtains the data type of a **PreferencesValue** instance.

### OH_PreferencesValue_GetInt()

```
```c
int OH_PreferencesValue_GetInt(const OH_PreferencesValue *object, int *value)
```

@@ -177,7 +177,7 @@ Obtains an integer from an [OH_PreferencesValue](capi-preferences-oh-preferences

### OH_PreferencesValue_GetBool()

```
```c
int OH_PreferencesValue_GetBool(const OH_PreferencesValue *object, bool *value)
```

@@ -203,7 +203,7 @@ Obtains a Boolean value from an [OH_PreferencesValue](capi-preferences-oh-prefer

### OH_PreferencesValue_GetString()

```
```c
int OH_PreferencesValue_GetString(const OH_PreferencesValue *object, char **value, uint32_t *valueLen)
```



+ 11
- 11
en/application-dev/reference/apis-arkdata/capi-oh-rdb-crypto-param-h.md View File

@@ -53,7 +53,7 @@ Defines functions and enums related to encryption parameters of the RDB store.

### Rdb_EncryptionAlgo

```
```c
enum Rdb_EncryptionAlgo
```

@@ -71,7 +71,7 @@ Enumerates database encryption algorithms.

### Rdb_HmacAlgo

```
```c
enum Rdb_HmacAlgo
```

@@ -89,7 +89,7 @@ Enumerates HMAC algorithms.

### Rdb_KdfAlgo

```
```c
enum Rdb_KdfAlgo
```

@@ -110,7 +110,7 @@ Enumerates KDF algorithms.

### OH_Rdb_CreateCryptoParam()

```
```c
OH_Rdb_CryptoParam *OH_Rdb_CreateCryptoParam(void)
```

@@ -128,7 +128,7 @@ Creates an [OH_Rdb_CryptoParam](capi-rdb-oh-rdb-cryptoparam.md) instance.

### OH_Rdb_DestroyCryptoParam()

```
```c
int OH_Rdb_DestroyCryptoParam(OH_Rdb_CryptoParam *param)
```

@@ -153,7 +153,7 @@ Destroys an [OH_Rdb_CryptoParam](capi-rdb-oh-rdb-cryptoparam.md) instance.

### OH_Crypto_SetEncryptionKey()

```
```c
int OH_Crypto_SetEncryptionKey(OH_Rdb_CryptoParam *param, const uint8_t *key, int32_t length)
```

@@ -180,7 +180,7 @@ Sets the key data of an [OH_Rdb_CryptoParam](capi-rdb-oh-rdb-cryptoparam.md) ins

### OH_Crypto_SetIteration()

```
```c
int OH_Crypto_SetIteration(OH_Rdb_CryptoParam *param, int64_t iteration)
```

@@ -206,7 +206,7 @@ Sets the number of iterations of the KDF algorithm used when opening an encrypte

### OH_Crypto_SetEncryptionAlgo()

```
```c
int OH_Crypto_SetEncryptionAlgo(OH_Rdb_CryptoParam *param, int32_t algo)
```

@@ -232,7 +232,7 @@ Sets the encryption algorithm used when opening an encrypted database.

### OH_Crypto_SetHmacAlgo()

```
```c
int OH_Crypto_SetHmacAlgo(OH_Rdb_CryptoParam *param, int32_t algo)
```

@@ -258,7 +258,7 @@ Sets the HMAC algorithm used when opening an encrypted database.

### OH_Crypto_SetKdfAlgo()

```
```c
int OH_Crypto_SetKdfAlgo(OH_Rdb_CryptoParam *param, int32_t algo)
```

@@ -284,7 +284,7 @@ Sets the KDF algorithm used when opening an encrypted database.

### OH_Crypto_SetCryptoPageSize()

```
```c
int OH_Crypto_SetCryptoPageSize(OH_Rdb_CryptoParam *param, int64_t size)
```



+ 16
- 16
en/application-dev/reference/apis-arkdata/capi-oh-rdb-transaction-h.md View File

@@ -59,7 +59,7 @@ Defines APIs and enums related to transactions.

### OH_RDB_TransType

```
```c
enum OH_RDB_TransType
```

@@ -81,7 +81,7 @@ Enumerates the transaction types of an RDB store.

### OH_RdbTrans_CreateOptions()

```
```c
OH_RDB_TransOptions *OH_RdbTrans_CreateOptions(void)
```

@@ -99,7 +99,7 @@ Creates a transaction configuration object.

### OH_RdbTrans_DestroyOptions()

```
```c
int OH_RdbTrans_DestroyOptions(OH_RDB_TransOptions *options)
```

@@ -124,7 +124,7 @@ Destroys a **TransOptions** instance.

### OH_RdbTransOption_SetType()

```
```c
int OH_RdbTransOption_SetType(OH_RDB_TransOptions *options, OH_RDB_TransType type)
```

@@ -150,7 +150,7 @@ Sets the transaction type of an RDB store.

### OH_RdbTrans_Commit()

```
```c
int OH_RdbTrans_Commit(OH_Rdb_Transaction *trans)
```

@@ -175,7 +175,7 @@ Commits a transaction.

### OH_RdbTrans_Rollback()

```
```c
int OH_RdbTrans_Rollback(OH_Rdb_Transaction *trans)
```

@@ -200,7 +200,7 @@ Rolls back a transaction.

### OH_RdbTrans_Insert()

```
```c
int OH_RdbTrans_Insert(OH_Rdb_Transaction *trans, const char *table, const OH_VBucket *row, int64_t *rowId)
```

@@ -228,7 +228,7 @@ Inserts a row of data into a table.

### OH_RdbTrans_InsertWithConflictResolution()

```
```c
int OH_RdbTrans_InsertWithConflictResolution(OH_Rdb_Transaction *trans, const char *table, const OH_VBucket *row,Rdb_ConflictResolution resolution, int64_t *rowId)
```

@@ -257,7 +257,7 @@ Inserts a row of data into a table with conflict resolutions.

### OH_RdbTrans_BatchInsert()

```
```c
int OH_RdbTrans_BatchInsert(OH_Rdb_Transaction *trans, const char *table, const OH_Data_VBuckets *rows, Rdb_ConflictResolution resolution, int64_t *changes)
```

@@ -292,7 +292,7 @@ Ensure that you comply with this constraint when calling this API to avoid error

### OH_RdbTrans_Update()

```
```c
int OH_RdbTrans_Update(OH_Rdb_Transaction *trans, const OH_VBucket *row, const OH_Predicates *predicates, int64_t *changes)
```

@@ -320,7 +320,7 @@ Updates data in an RDB store based on specified conditions.

### OH_RdbTrans_UpdateWithConflictResolution()

```
```c
int OH_RdbTrans_UpdateWithConflictResolution(OH_Rdb_Transaction *trans, const OH_VBucket *row,const OH_Predicates *predicates, Rdb_ConflictResolution resolution, int64_t *changes)
```

@@ -349,7 +349,7 @@ Updates data in the database based on specified conditions and supports conflict

### OH_RdbTrans_Delete()

```
```c
int OH_RdbTrans_Delete(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, int64_t *changes)
```

@@ -376,7 +376,7 @@ Deletes data from the database based on the specified conditions.

### OH_RdbTrans_Query()

```
```c
OH_Cursor *OH_RdbTrans_Query(OH_Rdb_Transaction *trans, const OH_Predicates *predicates, const char *columns[], int len)
```

@@ -404,7 +404,7 @@ Queries data in the database based on specified conditions.

### OH_RdbTrans_QuerySql()

```
```c
OH_Cursor *OH_RdbTrans_QuerySql(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args)
```

@@ -431,7 +431,7 @@ Queries data in the database using the specified SQL statement.

### OH_RdbTrans_Execute()

```
```c
int OH_RdbTrans_Execute(OH_Rdb_Transaction *trans, const char *sql, const OH_Data_Values *args, OH_Data_Value **result)
```

@@ -459,7 +459,7 @@ Executes an SQL statement that contains specified parameters.

### OH_RdbTrans_Destroy()

```
```c
int OH_RdbTrans_Destroy(OH_Rdb_Transaction *trans)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-oh-rdb-types-h.md View File

@@ -32,7 +32,7 @@ Defines types related to data values.

### Rdb_ConflictResolution

```
```c
enum Rdb_ConflictResolution
```



+ 4
- 4
en/application-dev/reference/apis-arkdata/capi-oh-values-bucket-h.md View File

@@ -41,7 +41,7 @@ Defines the types of the key and value in a KV pair.

### OH_VBucket_PutAsset()

```
```c
int OH_VBucket_PutAsset(OH_VBucket *bucket, const char *field, Data_Asset *value)
```

@@ -68,7 +68,7 @@ Puts a [Data_Asset](capi-rdb-data-asset.md) object into the [OH_VBucket](capi-rd

### OH_VBucket_PutAssets()

```
```c
int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **value, uint32_t count)
```

@@ -100,7 +100,7 @@ OH_VBucket

### OH_VBucket_PutFloatVector()

```
```c
int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float *vec, size_t len)
```

@@ -132,7 +132,7 @@ OH_VBucket

### OH_VBucket_PutUnlimitedInt()

```
```c
int OH_VBucket_PutUnlimitedInt(OH_VBucket *bucket, const char *field, int sign, const uint64_t *trueForm, size_t len)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferences.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Preferences OH_Preferences
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencesoption.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_PreferencesOption OH_PreferencesOption
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencespair.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_PreferencesPair OH_PreferencesPair
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-preferences-oh-preferencesvalue.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_PreferencesValue OH_PreferencesValue
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-data-asset.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct Data_Asset Data_Asset
```



+ 16
- 16
en/application-dev/reference/apis-arkdata/capi-rdb-oh-cursor.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_Cursor
```

@@ -52,7 +52,7 @@ Defines a struct for a result set. Provides APIs to access the result set obtain

### getColumnCount()

```
```c
int (*getColumnCount)(OH_Cursor *cursor, int *count)
```

@@ -78,7 +78,7 @@ Pointer to the function used to obtain the number of columns in the result set.

### getColumnType()

```
```c
int (*getColumnType)(OH_Cursor *cursor, int32_t columnIndex, OH_ColumnType *columnType)
```

@@ -105,7 +105,7 @@ Pointer to the function used to obtain the column type based on the specified co

### getColumnIndex()

```
```c
int (*getColumnIndex)(OH_Cursor *cursor, const char *name, int *columnIndex)
```

@@ -132,7 +132,7 @@ Pointer to the function used to obtain the column index based on the specified c

### getColumnName()

```
```c
int (*getColumnName)(OH_Cursor *cursor, int32_t columnIndex, char *name, int length)
```

@@ -160,7 +160,7 @@ Pointer to the function used to obtain the column name based on the specified co

### getRowCount()

```
```c
int (*getRowCount)(OH_Cursor *cursor, int *count)
```

@@ -186,7 +186,7 @@ Pointer to the function used to obtain the number of rows in the result set.

### goToNextRow()

```
```c
int (*goToNextRow)(OH_Cursor *cursor)
```

@@ -211,7 +211,7 @@ Pointer to the function used to go to the next row of the result set.

### getSize()

```
```c
int (*getSize)(OH_Cursor *cursor, int32_t columnIndex, size_t *size)
```

@@ -238,7 +238,7 @@ Pointer to the function used to obtain information about the memory required whe

### getText()

```
```c
int (*getText)(OH_Cursor *cursor, int32_t columnIndex, char *value, int length)
```

@@ -266,7 +266,7 @@ Pointer to the function used to obtain the value of the string type based on the

### getInt64()

```
```c
int (*getInt64)(OH_Cursor *cursor, int32_t columnIndex, int64_t *value)
```

@@ -293,7 +293,7 @@ Pointer to the function used to obtain the value of the int64_t type based on th

### getReal()

```
```c
int (*getReal)(OH_Cursor *cursor, int32_t columnIndex, double *value)
```

@@ -320,7 +320,7 @@ Pointer to the function used to obtain the value of the double type based on the

### getBlob()

```
```c
int (*getBlob)(OH_Cursor *cursor, int32_t columnIndex, unsigned char *value, int length)
```

@@ -348,7 +348,7 @@ Pointer to the function used to obtain the values in the form of a byte array ba

### isNull()

```
```c
int (*isNull)(OH_Cursor *cursor, int32_t columnIndex, bool *isNull)
```

@@ -375,7 +375,7 @@ Pointer to the function used to check whether the value in the specified column

### destroy()

```
```c
int (*destroy)(OH_Cursor *cursor)
```

@@ -400,7 +400,7 @@ Pointer to the function used to destroy a result set.

### getAsset()

```
```c
int (*getAsset)(OH_Cursor *cursor, int32_t columnIndex, Data_Asset *value)
```

@@ -427,7 +427,7 @@ Pointer to the function used to obtain the value of the asset type based on the

### getAssets()

```
```c
int (*getAssets)(OH_Cursor *cursor, int32_t columnIndex, Data_Asset **value, uint32_t *length)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-value.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Data_Value OH_Data_Value
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-values.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Data_Values OH_Data_Values
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-data-vbuckets.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Data_VBuckets OH_Data_VBuckets
```



+ 25
- 25
en/application-dev/reference/apis-arkdata/capi-rdb-oh-predicates.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_Predicates
```

@@ -60,7 +60,7 @@ Defines a **predicates** object.

### equalTo()

```
```c
OH_Predicates *(*equalTo)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -86,7 +86,7 @@ Pointer to the function used to create a predicates object to search for the fie

### notEqualTo()

```
```c
OH_Predicates *(*notEqualTo)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -112,7 +112,7 @@ Pointer to the function used to create a predicates object to search for the fie

### beginWrap()

```
```c
OH_Predicates *(*beginWrap)(OH_Predicates *predicates)
```

@@ -136,7 +136,7 @@ Pointer to the function used to add a left parenthesis to the predicates.<br>Thi

### endWrap()

```
```c
OH_Predicates *(*endWrap)(OH_Predicates *predicates)
```

@@ -160,7 +160,7 @@ Pointer to the function used to add a right parenthesis to the predicates.<br>Th

### orOperate()

```
```c
OH_Predicates *(*orOperate)(OH_Predicates *predicates)
```

@@ -184,7 +184,7 @@ Pointer to the function used to add the OR operator to the predicates.<br>This m

### andOperate()

```
```c
OH_Predicates *(*andOperate)(OH_Predicates *predicates)
```

@@ -208,7 +208,7 @@ Pointer to the function used to add the AND operator to the predicates.<br>This

### isNull()

```
```c
OH_Predicates *(*isNull)(OH_Predicates *predicates, const char *field)
```

@@ -233,7 +233,7 @@ Pointer to the function used to create a predicates object to search for the fie

### isNotNull()

```
```c
OH_Predicates *(*isNotNull)(OH_Predicates *predicates, const char *field)
```

@@ -258,7 +258,7 @@ Pointer to the function used to create a predicates object to search for the fie

### like()

```
```c
OH_Predicates *(*like)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -285,7 +285,7 @@ Pointer to the function used to create a predicates object to search for the fie

### between()

```
```c
OH_Predicates *(*between)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -311,7 +311,7 @@ Pointer to the function used to create a predicates object to search for the fie

### notBetween()

```
```c
OH_Predicates *(*notBetween)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -337,7 +337,7 @@ Pointer to the function used to create a predicates object to search for the fie

### greaterThan()

```
```c
OH_Predicates *(*greaterThan)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -363,7 +363,7 @@ Pointer to the function used to create a predicates object to search for the fie

### lessThan()

```
```c
OH_Predicates *(*lessThan)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -389,7 +389,7 @@ Pointer to the function used to create a predicates object to search for the rec

### greaterThanOrEqualTo()

```
```c
OH_Predicates *(*greaterThanOrEqualTo)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -415,7 +415,7 @@ Pointer to the function used to create a predicates object to search for the fie

### lessThanOrEqualTo()

```
```c
OH_Predicates *(*lessThanOrEqualTo)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -441,7 +441,7 @@ Pointer to the function used to create a predicates object to search for the rec

### orderBy()

```
```c
OH_Predicates *(*orderBy)(OH_Predicates *predicates, const char *field, OH_OrderType type)
```

@@ -467,7 +467,7 @@ Pointer to the function used to create a predicates object to sort the values in

### distinct()

```
```c
OH_Predicates *(*distinct)(OH_Predicates *predicates)
```

@@ -491,7 +491,7 @@ Pointer to the function used to create a predicates object to filter out duplica

### limit()

```
```c
OH_Predicates *(*limit)(OH_Predicates *predicates, unsigned int value)
```

@@ -516,7 +516,7 @@ Pointer to the function used to create a predicates object to specify the maximu

### offset()

```
```c
OH_Predicates *(*offset)(OH_Predicates *predicates, unsigned int rowOffset)
```

@@ -541,7 +541,7 @@ Pointer to the function used to create a predicates object to specify the start

### groupBy()

```
```c
OH_Predicates *(*groupBy)(OH_Predicates *predicates, char const *const *fields, int length)
```

@@ -567,7 +567,7 @@ Pointer to the function used to create a predicates object to group the results

### in()

```
```c
OH_Predicates *(*in)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -593,7 +593,7 @@ Pointer to the function used to create a predicates object to search for the fie

### notIn()

```
```c
OH_Predicates *(*notIn)(OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```

@@ -619,7 +619,7 @@ Pointer to the function used to create a predicates object to search for the fie

### clear()

```
```c
OH_Predicates *(*clear)(OH_Predicates *predicates)
```

@@ -643,7 +643,7 @@ Pointer to the function used to clear a predicates instance.

### destroy()

```
```c
int (*destroy)(OH_Predicates *predicates)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-config.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_Rdb_Config
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-configv2.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Rdb_ConfigV2 OH_Rdb_ConfigV2
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-cryptoparam.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Rdb_CryptoParam OH_Rdb_CryptoParam
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-store.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_Rdb_Store
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-transaction.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Rdb_Transaction OH_Rdb_Transaction
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-oh-rdb-transoptions.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_RDB_TransOptions OH_RDB_TransOptions
```



+ 9
- 9
en/application-dev/reference/apis-arkdata/capi-rdb-oh-vbucket.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_VBucket
```

@@ -32,7 +32,7 @@ Defines a struct for the types of the key and value in a KV pair.

| Name | Description |
| ------------------------------------------------------------ | --------------------------------------------------- |
| [int (*putText)(OH_VBucket *bucket, const char *field, const char *value)](#puttext) | Puts a char * value into the **OH_VBucket** object in the given column. |
| [int (*putText)(OH_VBucket *bucket, const char *field, const char *value)](#puttext) | Puts a char* value into the **OH_VBucket** object in the given column. |
| [int (*putInt64)(OH_VBucket *bucket, const char *field, int64_t value)](#putint64) | Puts an int64_t value into the **OH_VBucket** object in the given column. |
| [int (*putReal)(OH_VBucket *bucket, const char *field, double value)](#putreal) | Puts a double value into the **OH_VBucket** object in the given column. |
| [int (*putBlob)(OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size)](#putblob) | Puts a const uint8_t * value into the **OH_VBucket** object in the given column.|
@@ -45,7 +45,7 @@ Defines a struct for the types of the key and value in a KV pair.

### putText()

```
```c
int (*putText)(OH_VBucket *bucket, const char *field, const char *value)
```

@@ -71,7 +71,7 @@ Puts a char* value into the **OH_VBucket** object in the given column.

### putInt64()

```
```c
int (*putInt64)(OH_VBucket *bucket, const char *field, int64_t value)
```

@@ -97,7 +97,7 @@ Puts an int64_t value into the **OH_VBucket** object in the given column.

### putReal()

```
```c
int (*putReal)(OH_VBucket *bucket, const char *field, double value)
```

@@ -123,7 +123,7 @@ Puts a double value into the **OH_VBucket** object in the given column.

### putBlob()

```
```c
int (*putBlob)(OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size)
```

@@ -150,7 +150,7 @@ Puts a const uint8_t * value into the **OH_VBucket** object in the given column.

### putNull()

```
```c
int (*putNull)(OH_VBucket *bucket, const char *field)
```

@@ -175,7 +175,7 @@ Puts a null value into the **OH_VBucket** object in the given column.

### clear()

```
```c
int (*clear)(OH_VBucket *bucket)
```

@@ -199,7 +199,7 @@ Clears an **OH_VBucket** object.

### destroy()

```
```c
int (*destroy)(OH_VBucket *bucket)
```



+ 6
- 6
en/application-dev/reference/apis-arkdata/capi-rdb-oh-vobject.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} OH_VObject
```

@@ -42,7 +42,7 @@ Defines a struct for allowed data types.

### putInt64()

```
```c
int (*putInt64)(OH_VObject *valueObject, int64_t *value, uint32_t count)
```

@@ -68,7 +68,7 @@ Converts a single parameter or an array of the int64 type into a value of the OH

### putDouble()

```
```c
int (*putDouble)(OH_VObject *valueObject, double *value, uint32_t count)
```

@@ -94,7 +94,7 @@ Converts a single parameter or an array of the double type into a value of the O

### putText()

```
```c
int (*putText)(OH_VObject *valueObject, const char *value)
```

@@ -119,7 +119,7 @@ Converts a character array of the char * type to a value of the OH_VObject type.

### putTexts()

```
```c
int (*putTexts)(OH_VObject *valueObject, const char **value, uint32_t count)
```

@@ -145,7 +145,7 @@ Converts a string array of the char * type to a value of the OH_VObject type.

### destroy()

```
```c
int (*destroy)(OH_VObject *valueObject)
```



+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-changeinfo.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_ChangeInfo
```c
typedef struct Rdb_ChangeInfo {...} Rdb_ChangeInfo
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-dataobserver.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_DataObserver
```c
typedef struct Rdb_DataObserver {...} Rdb_DataObserver
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-distributedconfig.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_DistributedConfig
```c
typedef struct Rdb_DistributedConfig {...} Rdb_DistributedConfig
```

## Overview


+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-keydata.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
union Rdb_KeyData { ... }
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-keyinfo.md View File

@@ -6,7 +6,7 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct {...} Rdb_KeyInfo
```



+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-progressdetails.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_ProgressDetails
```c
typedef struct Rdb_ProgressDetails {...} Rdb_ProgressDetails
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-progressobserver.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_ProgressObserver
```c
typedef struct Rdb_ProgressObserver {...} Rdb_ProgressObserver
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-statistic.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_Statistic
```c
typedef struct Rdb_Statistic {...} Rdb_Statistic
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-subscribecallback.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef union {...} Rdb_SubscribeCallback
```c
typedef union Rdb_SubscribeCallback {...} Rdb_SubscribeCallback
```

## Overview


+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-rdb-rdb-tabledetails.md View File

@@ -6,8 +6,8 @@
<!--Tester: @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
typedef struct {...} Rdb_TableDetails
```c
typedef struct Rdb_TableDetails {...} Rdb_TableDetails
```

## Overview


+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-relational-store-error-code-h.md View File

@@ -32,7 +32,7 @@ Declares the error codes used for relational database (RDB) stores.

### OH_Rdb_ErrCode

```
```c
enum OH_Rdb_ErrCode
```



+ 100
- 100
en/application-dev/reference/apis-arkdata/capi-relational-store-h.md View File

@@ -120,7 +120,7 @@ Provides APIs for managing data in an RDB store. The APIs not marked as supporti
| [int OH_Rdb_SubscribeAutoSyncProgress(OH_Rdb_Store *store, const Rdb_ProgressObserver *observer)](#oh_rdb_subscribeautosyncprogress) | - | Subscribes to the auto sync progress of an RDB store.<br>The registered callback will be invoked to return the auto sync progress.|
| [int OH_Rdb_UnsubscribeAutoSyncProgress(OH_Rdb_Store *store, const Rdb_ProgressObserver *observer)](#oh_rdb_unsubscribeautosyncprogress) | - | Unsubscribes from the auto sync process of an RDB store.|
| [int OH_Rdb_LockRow(OH_Rdb_Store *store, OH_Predicates *predicates)](#oh_rdb_lockrow) | - | Locks data in an RDB store based on specified conditions. The locked data will be blocked from the device-cloud sync.|
| [int OH_Rdb_UnlockRow(OH_Rdb_Store *store, OH_Predicates *predicates)](#oh_rdb_unlockrow) | - | Unlocks data in an RDB store based on the specified conditions.|
| [int OH_Rdb_UnlockRow(OH_Rdb_Store *store, OH_Predicates *predicates)](#oh_rdb_unlockrow) | - | Unlocks data in an RDB store based on specified conditions.|
| [OH_Cursor *OH_Rdb_QueryLockedRow(OH_Rdb_Store *store, OH_Predicates *predicates, const char *const *columnNames, int length)](#oh_rdb_querylockedrow) | - | Queries the locked data in an RDB store.|
| [int OH_Rdb_CreateTransaction(OH_Rdb_Store *store, const OH_RDB_TransOptions *options, OH_Rdb_Transaction **trans)](#oh_rdb_createtransaction) | - | Creates a transaction object.|
| [int OH_Rdb_Attach(OH_Rdb_Store *store, const OH_Rdb_ConfigV2 *config, const char *attachName, int64_t waitTime,size_t *attachedNumber)](#oh_rdb_attach) | - | Attaches a database file to the database that is currently connected.|
@@ -136,7 +136,7 @@ Provides APIs for managing data in an RDB store. The APIs not marked as supporti

### OH_Rdb_SecurityLevel

```
```c
enum OH_Rdb_SecurityLevel
```

@@ -155,7 +155,7 @@ Enumerates the RDB store security levels.

### Rdb_SecurityArea

```
```c
enum Rdb_SecurityArea
```

@@ -175,7 +175,7 @@ Enumerates the encryption levels of database files.

### Rdb_DBType

```
```c
enum Rdb_DBType
```

@@ -193,7 +193,7 @@ Enumerates the database kernel types.

### Rdb_Tokenizer

```
```c
enum Rdb_Tokenizer
```

@@ -207,11 +207,11 @@ Enumerates the database tokenizer types.
| -- | -- |
| RDB_NONE_TOKENIZER = 1 | No tokenizer is used.|
| RDB_ICU_TOKENIZER = 2 | ICU tokenizer.|
| RDB_CUSTOM_TOKENIZER = 3 | Custom tokenizer. <br>**Since**: 18|
| RDB_CUSTOM_TOKENIZER = 3 | Custom tokenizer.<br>**Since**: 18|

### Rdb_DistributedType

```
```c
enum Rdb_DistributedType
```

@@ -227,7 +227,7 @@ Enumerates the distributed types.

### Rdb_ChangeType

```
```c
enum Rdb_ChangeType
```

@@ -244,7 +244,7 @@ Enumerates the data change types.

### Rdb_SubscribeType

```
```c
enum Rdb_SubscribeType
```

@@ -262,7 +262,7 @@ Enumerates the subscription types.

### Rdb_SyncMode

```
```c
enum Rdb_SyncMode
```

@@ -280,7 +280,7 @@ Enumerates the RDB sync modes.

### Rdb_Progress

```
```c
enum Rdb_Progress
```

@@ -294,7 +294,7 @@ enum Rdb_Progress

### Rdb_ProgressCode

```
```c
enum Rdb_ProgressCode
```

@@ -315,7 +315,7 @@ enum Rdb_ProgressCode

### OH_Rdb_SetSemanticIndex()

```
```c
int OH_Rdb_SetSemanticIndex(OH_Rdb_ConfigV2 *config, bool enableSemanticIndex)
```

@@ -340,7 +340,7 @@ Sets whether to enable knowledge processing based on semantic indexes.

### OH_Rdb_CreateConfig()

```
```c
OH_Rdb_ConfigV2 *OH_Rdb_CreateConfig()
```

@@ -362,7 +362,7 @@ OH_Rdb_ConfigV2

### OH_Rdb_DestroyConfig()

```
```c
int OH_Rdb_DestroyConfig(OH_Rdb_ConfigV2 *config)
```

@@ -387,7 +387,7 @@ Destroys an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-configv2.md) instance created by [

### OH_Rdb_SetDatabaseDir()

```
```c
int OH_Rdb_SetDatabaseDir(OH_Rdb_ConfigV2 *config, const char *databaseDir)
```

@@ -413,7 +413,7 @@ Sets the database file path for an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-configv2.md

### OH_Rdb_SetStoreName()

```
```c
int OH_Rdb_SetStoreName(OH_Rdb_ConfigV2 *config, const char *storeName)
```

@@ -439,7 +439,7 @@ Sets the database name for an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-configv2.md) ins

### OH_Rdb_SetBundleName()

```
```c
int OH_Rdb_SetBundleName(OH_Rdb_ConfigV2 *config, const char *bundleName)
```

@@ -465,7 +465,7 @@ Sets the bundle name for an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-configv2.md) insta

### OH_Rdb_SetModuleName()

```
```c
int OH_Rdb_SetModuleName(OH_Rdb_ConfigV2 *config, const char *moduleName)
```

@@ -491,7 +491,7 @@ Sets the module name for an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-configv2.md) insta

### OH_Rdb_SetEncrypted()

```
```c
int OH_Rdb_SetEncrypted(OH_Rdb_ConfigV2 *config, bool isEncrypted)
```

@@ -517,7 +517,7 @@ Sets whether to encrypt the database for an [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-co

### OH_Rdb_SetSecurityLevel()

```
```c
int OH_Rdb_SetSecurityLevel(OH_Rdb_ConfigV2 *config, int securityLevel)
```

@@ -543,7 +543,7 @@ Sets the database security level ([OH_Rdb_SecurityLevel](capi-relational-store-h

### OH_Rdb_SetArea()

```
```c
int OH_Rdb_SetArea(OH_Rdb_ConfigV2 *config, int area)
```

@@ -569,7 +569,7 @@ Sets the security area level ([Rdb_SecurityArea](capi-relational-store-h.md#rdb_

### OH_Rdb_SetDbType()

```
```c
int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType)
```

@@ -595,7 +595,7 @@ Sets the database type ([Rdb_DBType](capi-relational-store-h.md#rdb_dbtype)) for

### OH_Rdb_SetCustomDir()

```
```c
int OH_Rdb_SetCustomDir(OH_Rdb_ConfigV2 *config, const char *customDir)
```

@@ -617,11 +617,11 @@ Sets the custom directory of the database.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|

### OH_Rdb_SetReadOnly()

```
```c
int OH_Rdb_SetReadOnly(OH_Rdb_ConfigV2 *config, bool readOnly)
```

@@ -643,11 +643,11 @@ Sets whether the RDB store is in read-only mode.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|

### OH_Rdb_SetPlugins()

```
```c
int OH_Rdb_SetPlugins(OH_Rdb_ConfigV2 *config, const char **plugins, int32_t length)
```

@@ -670,11 +670,11 @@ Sets the dynamic library with specific capabilities (such as full-text search).

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|

### OH_Rdb_SetCryptoParam()

```
```c
int OH_Rdb_SetCryptoParam(OH_Rdb_ConfigV2 *config, const OH_Rdb_CryptoParam *cryptoParam)
```

@@ -696,11 +696,11 @@ Sets custom encryption parameters.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|

### OH_Rdb_IsTokenizerSupported()

```
```c
int OH_Rdb_IsTokenizerSupported(Rdb_Tokenizer tokenizer, bool *isSupported)
```

@@ -726,7 +726,7 @@ Checks whether the specified tokenizer is supported.

### OH_Rdb_SetTokenizer()

```
```c
int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer)
```

@@ -752,7 +752,7 @@ Sets the tokenizer type.

### OH_Rdb_SetPersistent()

```
```c
int OH_Rdb_SetPersistent(OH_Rdb_ConfigV2 *config, bool isPersistent)
```

@@ -778,7 +778,7 @@ Sets whether to persist an RDB store.

### OH_Rdb_GetSupportedDbType()

```
```c
const int *OH_Rdb_GetSupportedDbType(int *typeCount)
```

@@ -803,7 +803,7 @@ Obtains the supported database type ([Rdb_DBType](capi-relational-store-h.md#rdb

### OH_Rdb_CreateValueObject()

```
```c
OH_VObject *OH_Rdb_CreateValueObject()
```

@@ -825,7 +825,7 @@ OH_VObject

### OH_Rdb_CreateValuesBucket()

```
```c
OH_VBucket *OH_Rdb_CreateValuesBucket()
```

@@ -847,7 +847,7 @@ OH_VBucket

### OH_Rdb_CreatePredicates()

```
```c
OH_Predicates *OH_Rdb_CreatePredicates(const char *table)
```

@@ -876,7 +876,7 @@ OH_Predicates

### OH_Rdb_GetOrOpen()

```
```c
OH_Rdb_Store *OH_Rdb_GetOrOpen(const OH_Rdb_Config *config, int *errCode)
```

@@ -902,7 +902,7 @@ Obtains a related [OH_Rdb_Store](capi-rdb-oh-rdb-store.md) instance to operate t

### OH_Rdb_CreateOrOpen()

```
```c
OH_Rdb_Store *OH_Rdb_CreateOrOpen(const OH_Rdb_ConfigV2 *config, int *errCode)
```

@@ -928,7 +928,7 @@ Creates or opens an [OH_Rdb_Store](capi-rdb-oh-rdb-store.md) instance based on t

### OH_Rdb_CloseStore()

```
```c
int OH_Rdb_CloseStore(OH_Rdb_Store *store)
```

@@ -953,7 +953,7 @@ Closes an [OH_Rdb_Store](capi-rdb-oh-rdb-store.md) object and reclaims the memor

### OH_Rdb_DeleteStore()

```
```c
int OH_Rdb_DeleteStore(const OH_Rdb_Config *config)
```

@@ -978,7 +978,7 @@ Deletes an RDB store with the specified configuration.

### OH_Rdb_DeleteStoreV2()

```
```c
int OH_Rdb_DeleteStoreV2(const OH_Rdb_ConfigV2 *config)
```

@@ -1003,7 +1003,7 @@ Deletes an RDB store based on the given [OH_Rdb_ConfigV2](capi-rdb-oh-rdb-config

### OH_Rdb_Insert()

```
```c
int OH_Rdb_Insert(OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBucket)
```

@@ -1030,7 +1030,7 @@ Inserts a row of data into a table.

### OH_Rdb_InsertWithConflictResolution()

```
```c
int OH_Rdb_InsertWithConflictResolution(OH_Rdb_Store *store, const char *table, OH_VBucket *row,Rdb_ConflictResolution resolution, int64_t *rowId)
```

@@ -1055,11 +1055,11 @@ Inserts a row of data into the target table and supports conflict resolution.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|

### OH_Rdb_BatchInsert()

```
```c
int OH_Rdb_BatchInsert(OH_Rdb_Store *store, const char *table,const OH_Data_VBuckets *rows, Rdb_ConflictResolution resolution, int64_t *changes)
```

@@ -1090,11 +1090,11 @@ Ensure that you comply with this constraint when calling this API to avoid error

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|

### OH_Rdb_Update()

```
```c
int OH_Rdb_Update(OH_Rdb_Store *store, OH_VBucket *valuesBucket, OH_Predicates *predicates)
```

@@ -1121,7 +1121,7 @@ Updates data in an RDB store based on specified conditions.

### OH_Rdb_UpdateWithConflictResolution()

```
```c
int OH_Rdb_UpdateWithConflictResolution(OH_Rdb_Store *store, OH_VBucket *row, OH_Predicates *predicates,Rdb_ConflictResolution resolution, int64_t *changes)
```

@@ -1146,11 +1146,11 @@ Updates data in the database based on specified conditions and supports conflict

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|

### OH_Rdb_Delete()

```
```c
int OH_Rdb_Delete(OH_Rdb_Store *store, OH_Predicates *predicates)
```

@@ -1176,7 +1176,7 @@ Deletes data from an RDB store based on specified conditions.

### OH_Rdb_Query()

```
```c
OH_Cursor *OH_Rdb_Query(OH_Rdb_Store *store, OH_Predicates *predicates, const char *const *columnNames, int length)
```

@@ -1204,7 +1204,7 @@ Queries data in an RDB store based on specified conditions.

### OH_Rdb_Execute()

```
```c
int OH_Rdb_Execute(OH_Rdb_Store *store, const char *sql)
```

@@ -1234,7 +1234,7 @@ OH_Rdb_Store

### OH_Rdb_ExecuteV2()

```
```c
int OH_Rdb_ExecuteV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args, OH_Data_Value **result)
```

@@ -1258,7 +1258,7 @@ Executes an SQL statement with a return value. This API supports vector stores.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_WAL_SIZE_OVER_LIMIT** indicates that the size of the WAL log file exceeds the default value.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.|

**See**

@@ -1266,7 +1266,7 @@ OH_Value_Destroy

### OH_Rdb_ExecuteByTrxId()

```
```c
int OH_Rdb_ExecuteByTrxId(OH_Rdb_Store *store, int64_t trxId, const char *sql)
```

@@ -1297,7 +1297,7 @@ OH_Rdb_Store

### OH_Rdb_ExecuteQuery()

```
```c
OH_Cursor *OH_Rdb_ExecuteQuery(OH_Rdb_Store *store, const char *sql)
```

@@ -1327,7 +1327,7 @@ OH_Rdb_Store

### OH_Rdb_ExecuteQueryV2()

```
```c
OH_Cursor *OH_Rdb_ExecuteQueryV2(OH_Rdb_Store *store, const char *sql, const OH_Data_Values *args)
```

@@ -1358,7 +1358,7 @@ OH_Rdb_Store

### OH_Rdb_BeginTransaction()

```
```c
int OH_Rdb_BeginTransaction(OH_Rdb_Store *store)
```

@@ -1383,7 +1383,7 @@ Begins the transaction before executing SQL statements.

### OH_Rdb_RollBack()

```
```c
int OH_Rdb_RollBack(OH_Rdb_Store *store)
```

@@ -1408,7 +1408,7 @@ Rolls back the SQL statements executed.

### OH_Rdb_Commit()

```
```c
int OH_Rdb_Commit(OH_Rdb_Store *store)
```

@@ -1433,7 +1433,7 @@ Commits the executed SQL statement.

### OH_Rdb_BeginTransWithTrxId()

```
```c
int OH_Rdb_BeginTransWithTrxId(OH_Rdb_Store *store, int64_t *trxId)
```

@@ -1459,7 +1459,7 @@ Begins a transaction. This API returns a transaction ID and supports only vector

### OH_Rdb_RollBackByTrxId()

```
```c
int OH_Rdb_RollBackByTrxId(OH_Rdb_Store *store, int64_t trxId)
```

@@ -1485,7 +1485,7 @@ Rolls back the executed SQL statements based on the specified transaction ID. Th

### OH_Rdb_CommitByTrxId()

```
```c
int OH_Rdb_CommitByTrxId(OH_Rdb_Store *store, int64_t trxId)
```

@@ -1515,7 +1515,7 @@ OH_Rdb_Store

### OH_Rdb_Backup()

```
```c
int OH_Rdb_Backup(OH_Rdb_Store *store, const char *databasePath)
```

@@ -1545,7 +1545,7 @@ OH_Rdb_Store

### OH_Rdb_Restore()

```
```c
int OH_Rdb_Restore(OH_Rdb_Store *store, const char *databasePath)
```

@@ -1571,7 +1571,7 @@ Restores a database from a specified database backup file. This API supports vec

### OH_Rdb_GetVersion()

```
```c
int OH_Rdb_GetVersion(OH_Rdb_Store *store, int *version)
```

@@ -1597,7 +1597,7 @@ Obtains the RDB store version.

### OH_Rdb_SetVersion()

```
```c
int OH_Rdb_SetVersion(OH_Rdb_Store *store, int version)
```

@@ -1627,7 +1627,7 @@ OH_Rdb_Store

### OH_Rdb_SetDistributedTables()

```
```c
int OH_Rdb_SetDistributedTables(OH_Rdb_Store *store, const char *tables[], uint32_t count, Rdb_DistributedType type,const Rdb_DistributedConfig *config)
```

@@ -1660,7 +1660,7 @@ OH_Rdb_Store

### OH_Rdb_FindModifyTime()

```
```c
OH_Cursor *OH_Rdb_FindModifyTime(OH_Rdb_Store *store, const char *tableName, const char *columnName,OH_VObject *values)
```

@@ -1688,7 +1688,7 @@ Obtains the last modification time of a table in an RDB store.

### Rdb_BriefObserver()

```
```c
typedef void (*Rdb_BriefObserver)(void *context, const char *values[], uint32_t count)
```

@@ -1709,7 +1709,7 @@ Callback used to return the device-cloud data change event.

### Rdb_DetailsObserver()

```
```c
typedef void (*Rdb_DetailsObserver)(void *context, const Rdb_ChangeInfo **changeInfo, uint32_t count)
```

@@ -1730,7 +1730,7 @@ Callback used to return the details about the device-cloud data change.

### OH_Rdb_Subscribe()

```
```c
int OH_Rdb_Subscribe(OH_Rdb_Store *store, Rdb_SubscribeType type, const Rdb_DataObserver *observer)
```

@@ -1757,7 +1757,7 @@ Registers an observer for an RDB store. The registered callback will be invoked

### OH_Rdb_Unsubscribe()

```
```c
int OH_Rdb_Unsubscribe(OH_Rdb_Store *store, Rdb_SubscribeType type, const Rdb_DataObserver *observer)
```

@@ -1784,7 +1784,7 @@ Unregisters the observer of the specified type.

### OH_Rdb_GetTableDetails()

```
```c
Rdb_TableDetails *OH_Rdb_GetTableDetails(Rdb_ProgressDetails *progress, int32_t version)
```

@@ -1814,7 +1814,7 @@ Rdb_TableDetails

### Rdb_ProgressCallback()

```
```c
typedef void (*Rdb_ProgressCallback)(void *context, Rdb_ProgressDetails *progressDetails)
```

@@ -1834,7 +1834,7 @@ Defines a callback used to return the device-cloud sync progress.

### Rdb_SyncCallback()

```
```c
typedef void (*Rdb_SyncCallback)(Rdb_ProgressDetails *progressDetails)
```

@@ -1853,7 +1853,7 @@ Defines a callback for device-cloud sync.

### OH_Rdb_CloudSync()

```
```c
int OH_Rdb_CloudSync(OH_Rdb_Store *store, Rdb_SyncMode mode, const char *tables[], uint32_t count,const Rdb_ProgressObserver *observer)
```

@@ -1882,7 +1882,7 @@ Performs device-cloud sync.

### OH_Rdb_SubscribeAutoSyncProgress()

```
```c
int OH_Rdb_SubscribeAutoSyncProgress(OH_Rdb_Store *store, const Rdb_ProgressObserver *observer)
```

@@ -1908,7 +1908,7 @@ Subscribes to the auto sync progress of an RDB store.<br>The registered callback

### OH_Rdb_UnsubscribeAutoSyncProgress()

```
```c
int OH_Rdb_UnsubscribeAutoSyncProgress(OH_Rdb_Store *store, const Rdb_ProgressObserver *observer)
```

@@ -1934,7 +1934,7 @@ Unsubscribes from the auto sync process of an RDB store.

### OH_Rdb_LockRow()

```
```c
int OH_Rdb_LockRow(OH_Rdb_Store *store, OH_Predicates *predicates)
```

@@ -1960,13 +1960,13 @@ Locks data in an RDB store based on specified conditions. The locked data will b

### OH_Rdb_UnlockRow()

```
```c
int OH_Rdb_UnlockRow(OH_Rdb_Store *store, OH_Predicates *predicates)
```

**Description**

Unlocks data in an RDB store based on the specified conditions.
Unlocks data in an RDB store based on specified conditions.

**Since**: 12

@@ -1986,7 +1986,7 @@ Unlocks data in an RDB store based on the specified conditions.

### OH_Rdb_QueryLockedRow()

```
```c
OH_Cursor *OH_Rdb_QueryLockedRow(OH_Rdb_Store *store, OH_Predicates *predicates, const char *const *columnNames, int length)
```

@@ -2014,7 +2014,7 @@ Queries the locked data in an RDB store.

### OH_Rdb_CreateTransaction()

```
```c
int OH_Rdb_CreateTransaction(OH_Rdb_Store *store, const OH_RDB_TransOptions *options, OH_Rdb_Transaction **trans)
```

@@ -2037,11 +2037,11 @@ Creates a transaction object.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_CANT_OPEN** indicates an SQLite error: unable to open the database file.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_CANT_OPEN** indicates an SQLite error: unable to open the database file.|

### OH_Rdb_Attach()

```
```c
int OH_Rdb_Attach(OH_Rdb_Store *store, const OH_Rdb_ConfigV2 *config, const char *attachName, int64_t waitTime,size_t *attachedNumber)
```

@@ -2066,11 +2066,11 @@ Attaches a database file to the database that is currently connected.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_NOT_SUPPORTED** indicates that the operation is not supported.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_NOT_SUPPORTED** indicates that the operation is not supported.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|

### OH_Rdb_Detach()

```
```c
int OH_Rdb_Detach(OH_Rdb_Store *store, const char *attachName, int64_t waitTime, size_t *attachedNumber)
```

@@ -2094,11 +2094,11 @@ Detaches a specified store from the current database.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_NOT_SUPPORTED** indicates that the operation is not supported.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_NOT_SUPPORTED** indicates that the operation is not supported.<br>**RDB_E_DATABASE_BUSY** indicates that the database does not respond.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_LOCKED** indicates an SQLite error: database table locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_TOO_BIG** indicates an SQLite error: TEXT or BLOB exceeds the limit.<br>**RDB_E_SQLITE_MISMATCH** indicates an SQLite error: data types mismatch.<br>**RDB_E_SQLITE_CONSTRAINT** indicates an SQLite error code: SQLite constraint.|

### OH_Rdb_SetLocale()

```
```c
int OH_Rdb_SetLocale(OH_Rdb_Store *store, const char *locale)
```

@@ -2120,11 +2120,11 @@ Sets locale.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_ERR** indicates that the operation fails.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_ERR** indicates that the operation fails.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.|

### OH_Rdb_RekeyEx()

```
```c
int OH_Rdb_RekeyEx(OH_Rdb_Store *store, OH_Rdb_CryptoParam *param)
```

@@ -2155,11 +2155,11 @@ Exercise caution when changing the encryption parameters. The correct encryption

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_ERROR** indicates a common database error.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_ALREADY_CLOSED** indicates that the database is already closed.<br>**RDB_E_SQLITE_CORRUPT** indicates that the database is corrupted.<br>**RDB_E_SQLITE_PERM** indicates an SQLite error: access denied.<br>**RDB_E_SQLITE_BUSY** indicates an SQLite error: database file locked.<br>**RDB_E_SQLITE_NOMEM** indicates an SQLite: insufficient database memory.<br>**RDB_E_SQLITE_READONLY** indicates an SQLite error: attempt to write a read-only database.<br>**RDB_E_SQLITE_IOERR** indicates an SQLite: disk I/O error.<br>**RDB_E_SQLITE_FULL** indicates an SQLite error: the database is full.|

### Rdb_CorruptedHandler()

```
```c
typedef void (*Rdb_CorruptedHandler)(void *context, OH_Rdb_ConfigV2 *config, OH_Rdb_Store *store)
```

@@ -2179,7 +2179,7 @@ Defines a handler for processing database exceptions.

### OH_Rdb_RegisterCorruptedHandler()

```
```c
int OH_Rdb_RegisterCorruptedHandler(const OH_Rdb_ConfigV2 *config, void *context, const Rdb_CorruptedHandler handler)
```

@@ -2205,11 +2205,11 @@ Only one handler can be registered for each path.

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_SUB_LIMIT_REACHED** indicates that the number of registration exceeds the upper limit.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.<br>**RDB_E_SUB_LIMIT_REACHED** indicates that the number of registration exceeds the upper limit.|

### OH_Rdb_UnregisterCorruptedHandler()

```
```c
int OH_Rdb_UnregisterCorruptedHandler(const OH_Rdb_ConfigV2 *config, void *context, const Rdb_CorruptedHandler handler)
```

@@ -2233,4 +2233,4 @@ The handler and context must be the same as those during subscription. Otherwise

| Type| Description|
| -- | -- |
| int | Returns the execution result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|
| int | Returns the operation result.<br>**RDB_OK** indicates that the operation is successful.<br>**RDB_E_INVALID_ARGS** indicates that invalid parameters are specified.|

+ 2
- 2
en/application-dev/reference/apis-arkdata/capi-udmf-err-code-h.md View File

@@ -33,7 +33,7 @@ Declares the error codes used in the UDMF.

### Udmf_ErrCode

```
```c
enum Udmf_ErrCode
```

@@ -51,7 +51,7 @@ Enumerates the error codes.

### Udmf_ListenerStatus

```
```c
enum Udmf_ListenerStatus
```



+ 93
- 93
en/application-dev/reference/apis-arkdata/capi-udmf-h.md View File

@@ -142,7 +142,7 @@ Defines the APIs, data structs, and enums for accessing the UDMF.

### Udmf_Intention

```
```c
enum Udmf_Intention
```

@@ -163,7 +163,7 @@ Enumerates the UDMF data channel types.

### Udmf_ShareOption

```
```c
enum Udmf_ShareOption
```

@@ -181,7 +181,7 @@ Enumerates the options for using the unified data in a device.

### Udmf_FileConflictOptions

```
```c
enum Udmf_FileConflictOptions
```

@@ -198,7 +198,7 @@ Enumerates the options used to resolve file copy conflicts.

### Udmf_ProgressIndicator

```
```c
enum Udmf_ProgressIndicator
```

@@ -215,7 +215,7 @@ Enumerates the progress indicator options. You can use the default progress indi

### Udmf_Visibility

```
```c
enum Udmf_Visibility
```

@@ -234,7 +234,7 @@ Enumerates data visibility level.

### OH_UdmfGetDataParams_SetAcceptableInfo()

```
```c
void OH_UdmfGetDataParams_SetAcceptableInfo(OH_UdmfGetDataParams* params, OH_UdmfDataLoadInfo* acceptableInfo)
```

@@ -254,7 +254,7 @@ Sets the acceptable data description in an [OH_UdmfGetDataParams](capi-udmf-oh-u

### OH_UdmfDataLoadParams_Create()

```
```c
OH_UdmfDataLoadParams* OH_UdmfDataLoadParams_Create()
```

@@ -272,7 +272,7 @@ Creates an [OH_UdmfDataLoadParams](capi-udmf-oh-udmfdataloadparams.md) instance

### OH_UdmfDataLoadParams_Destroy()

```
```c
void OH_UdmfDataLoadParams_Destroy(OH_UdmfDataLoadParams* pThis)
```

@@ -290,7 +290,7 @@ Destroys an [OH_UdmfDataLoadParams](capi-udmf-oh-udmfdataloadparams.md) instance

### OH_UdmfDataLoadParams_SetLoadHandler()

```
```c
void OH_UdmfDataLoadParams_SetLoadHandler(OH_UdmfDataLoadParams* params, const OH_Udmf_DataLoadHandler dataLoadHandler)
```

@@ -309,7 +309,7 @@ Sets the processing function for data loading in an [OH_UdmfDataLoadParams](capi

### OH_UdmfDataLoadParams_SetDataLoadInfo()

```
```c
void OH_UdmfDataLoadParams_SetDataLoadInfo(OH_UdmfDataLoadParams* params, OH_UdmfDataLoadInfo* dataLoadInfo)
```

@@ -328,7 +328,7 @@ Sets data loading information in an [OH_UdmfDataLoadParams](capi-udmf-oh-udmfdat

### OH_UdmfDataLoadInfo_Create()

```
```c
OH_UdmfDataLoadInfo* OH_UdmfDataLoadInfo_Create()
```

@@ -346,7 +346,7 @@ Creates an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdataloadinfo.md) instance.

### OH_UdmfDataLoadInfo_Destroy()

```
```c
void OH_UdmfDataLoadInfo_Destroy(OH_UdmfDataLoadInfo* dataLoadInfo)
```

@@ -364,7 +364,7 @@ Destroys an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdataloadinfo.md) instance.

### OH_UdmfDataLoadInfo_GetTypes()

```
```c
char** OH_UdmfDataLoadInfo_GetTypes(OH_UdmfDataLoadInfo* dataLoadInfo, unsigned int* count)
```

@@ -389,7 +389,7 @@ Obtains the data types from an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdataloadin

### OH_UdmfDataLoadInfo_SetType()

```
```c
void OH_UdmfDataLoadInfo_SetType(OH_UdmfDataLoadInfo* dataLoadInfo, const char* type)
```

@@ -408,7 +408,7 @@ Sets the data type in an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdataloadinfo.md)

### OH_UdmfDataLoadInfo_GetRecordCount()

```
```c
int OH_UdmfDataLoadInfo_GetRecordCount(OH_UdmfDataLoadInfo* dataLoadInfo)
```

@@ -432,7 +432,7 @@ Obtains the number of records in an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdatal

### OH_UdmfDataLoadInfo_SetRecordCount()

```
```c
void OH_UdmfDataLoadInfo_SetRecordCount(OH_UdmfDataLoadInfo* dataLoadInfo, unsigned int recordCount)
```

@@ -451,7 +451,7 @@ Sets the number of records in an [OH_UdmfDataLoadInfo](capi-udmf-oh-udmfdataload

### OH_Udmf_DataLoadHandler()

```
```c
typedef OH_UdmfData* (*OH_Udmf_DataLoadHandler)(OH_UdmfDataLoadInfo* acceptableInfo)
```

@@ -475,7 +475,7 @@ Defines the callback used to load data.

### OH_UdmfOptions_GetVisibility()

```
```c
Udmf_Visibility OH_UdmfOptions_GetVisibility(OH_UdmfOptions* pThis)
```

@@ -499,7 +499,7 @@ Obtains the data visibility level from an [OH_UdmfOptions](capi-udmf-oh-udmfopti

### OH_UdmfOptions_SetVisibility()

```
```c
int OH_UdmfOptions_SetVisibility(OH_UdmfOptions* pThis, Udmf_Visibility visibility)
```

@@ -524,7 +524,7 @@ Sets the data visibility level in an [OH_UdmfOptions](capi-udmf-oh-udmfoptions.m

### UDMF_KEY_BUFFER_LEN()

```
```c
UDMF_KEY_BUFFER_LEN (512)
```

@@ -536,7 +536,7 @@ Defines minimum length of the buffer that holds the key (unique identifier) of a

### OH_Udmf_DataProgressListener()

```
```c
typedef void (*OH_Udmf_DataProgressListener)(OH_Udmf_ProgressInfo* progressInfo, OH_UdmfData* data)
```

@@ -556,7 +556,7 @@ Defines the callback used to return the data retrieval progress information and

### OH_UdmfData_Create()

```
```c
OH_UdmfData* OH_UdmfData_Create()
```

@@ -578,7 +578,7 @@ OH_UdmfData

### OH_UdmfData_Destroy()

```
```c
void OH_UdmfData_Destroy(OH_UdmfData* pThis)
```

@@ -601,7 +601,7 @@ OH_UdmfData

### OH_UdmfData_AddRecord()

```
```c
int OH_UdmfData_AddRecord(OH_UdmfData* pThis, OH_UdmfRecord* record)
```

@@ -627,7 +627,7 @@ Adds an [OH_UdmfRecord](capi-udmf-oh-udmfrecord.md) to an [OH_UdmfData](capi-udm

### OH_UdmfData_HasType()

```
```c
bool OH_UdmfData_HasType(OH_UdmfData* pThis, const char* type)
```

@@ -653,7 +653,7 @@ Checks whether the specified type exists in an [OH_UdmfData](capi-udmf-oh-udmfda

### OH_UdmfData_GetTypes()

```
```c
char** OH_UdmfData_GetTypes(OH_UdmfData* pThis, unsigned int* count)
```

@@ -679,7 +679,7 @@ Obtains all data types in an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance.

### OH_UdmfData_GetRecords()

```
```c
OH_UdmfRecord** OH_UdmfData_GetRecords(OH_UdmfData* pThis, unsigned int* count)
```

@@ -705,7 +705,7 @@ Obtains all records contained in an [OH_UdmfData](capi-udmf-oh-udmfdata.md) inst

### UdmfData_Finalize()

```
```c
typedef void (*UdmfData_Finalize)(void* context)
```

@@ -723,7 +723,7 @@ Defines a callback function used to release the context. This callback is invoke

### OH_UdmfRecordProvider_Create()

```
```c
OH_UdmfRecordProvider* OH_UdmfRecordProvider_Create()
```

@@ -741,7 +741,7 @@ Creates an [OH_UdmfRecordProvider](capi-udmf-oh-udmfrecordprovider.md) instance

### OH_UdmfRecordProvider_Destroy()

```
```c
int OH_UdmfRecordProvider_Destroy(OH_UdmfRecordProvider* provider)
```

@@ -766,7 +766,7 @@ Destroys an [OH_UdmfRecordProvider](capi-udmf-oh-udmfrecordprovider.md) instance

### OH_UdmfRecordProvider_GetData()

```
```c
typedef void* (*OH_UdmfRecordProvider_GetData)(void* context, const char* type)
```

@@ -792,7 +792,7 @@ Defines a callback function used to obtain data by type. This callback will be i

### OH_UdmfRecordProvider_SetData()

```
```c
int OH_UdmfRecordProvider_SetData(OH_UdmfRecordProvider* provider, void* context, const OH_UdmfRecordProvider_GetData callback, const UdmfData_Finalize finalize)
```

@@ -820,7 +820,7 @@ Sets a callback for an **OH_UdmfRecordProvider** instance to provide data.

### OH_UdmfRecord_Create()

```
```c
OH_UdmfRecord* OH_UdmfRecord_Create()
```

@@ -838,7 +838,7 @@ Creates an [OH_UdmfRecord](capi-udmf-oh-udmfrecord.md) instance and a pointer to

### OH_UdmfRecord_Destroy()

```
```c
void OH_UdmfRecord_Destroy(OH_UdmfRecord* pThis)
```

@@ -857,7 +857,7 @@ Destroys an [OH_UdmfRecord](capi-udmf-oh-udmfrecord.md) instance.

### OH_UdmfRecord_AddGeneralEntry()

```
```c
int OH_UdmfRecord_AddGeneralEntry(OH_UdmfRecord* pThis, const char* typeId, unsigned char* entry, unsigned int count)
```

@@ -885,7 +885,7 @@ Adds customized general data to an [OH_UdmfRecord](capi-udmf-oh-udmfrecord.md) i

### OH_UdmfRecord_AddPlainText()

```
```c
int OH_UdmfRecord_AddPlainText(OH_UdmfRecord* pThis, OH_UdsPlainText* plainText)
```

@@ -911,7 +911,7 @@ Adds data of the [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) type to an [OH_

### OH_UdmfRecord_AddHyperlink()

```
```c
int OH_UdmfRecord_AddHyperlink(OH_UdmfRecord* pThis, OH_UdsHyperlink* hyperlink)
```

@@ -937,7 +937,7 @@ Adds data of the [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) type to an [OH_

### OH_UdmfRecord_AddHtml()

```
```c
int OH_UdmfRecord_AddHtml(OH_UdmfRecord* pThis, OH_UdsHtml* html)
```

@@ -963,7 +963,7 @@ Adds data of the [OH_UdsHtml](capi-udmf-oh-udshtml.md) type to an [OH_UdmfRecord

### OH_UdmfRecord_AddAppItem()

```
```c
int OH_UdmfRecord_AddAppItem(OH_UdmfRecord* pThis, OH_UdsAppItem* appItem)
```

@@ -989,7 +989,7 @@ Adds data of the [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) type to an [OH_Udmf

### OH_UdmfRecord_AddFileUri()

```
```c
int OH_UdmfRecord_AddFileUri(OH_UdmfRecord* pThis, OH_UdsFileUri* fileUri)
```

@@ -1015,7 +1015,7 @@ Adds data of the [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) type to an [OH_Udmf

### OH_UdmfRecord_AddPixelMap()

```
```c
int OH_UdmfRecord_AddPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap)
```

@@ -1041,7 +1041,7 @@ Adds data of the [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md) type to an [OH_Ud

### OH_UdmfRecord_AddArrayBuffer()

```
```c
int OH_UdmfRecord_AddArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer)
```

@@ -1068,7 +1068,7 @@ Adds data of the [OH_UdsArrayBuffer](capi-udmf-oh-udsarraybuffer.md) type to an

### OH_UdmfRecord_AddContentForm()

```
```c
int OH_UdmfRecord_AddContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm)
```

@@ -1094,7 +1094,7 @@ Adds data of the [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) type to an

### OH_UdmfRecord_GetTypes()

```
```c
char** OH_UdmfRecord_GetTypes(OH_UdmfRecord* pThis, unsigned int* count)
```

@@ -1120,7 +1120,7 @@ Obtains all data types in an [OH_UdmfRecord](capi-udmf-oh-udmfrecord.md) instanc

### OH_UdmfRecord_GetGeneralEntry()

```
```c
int OH_UdmfRecord_GetGeneralEntry(OH_UdmfRecord* pThis, const char* typeId, unsigned char** entry, unsigned int* count)
```

@@ -1148,7 +1148,7 @@ Obtains the data of the specified type in an [OH_UdmfRecord](capi-udmf-oh-udmfre

### OH_UdmfRecord_GetPlainText()

```
```c
int OH_UdmfRecord_GetPlainText(OH_UdmfRecord* pThis, OH_UdsPlainText* plainText)
```

@@ -1174,7 +1174,7 @@ Obtains [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) data from an [OH_UdmfRec

### OH_UdmfRecord_GetHyperlink()

```
```c
int OH_UdmfRecord_GetHyperlink(OH_UdmfRecord* pThis, OH_UdsHyperlink* hyperlink)
```

@@ -1200,7 +1200,7 @@ Obtains [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) data from an [OH_UdmfRec

### OH_UdmfRecord_GetHtml()

```
```c
int OH_UdmfRecord_GetHtml(OH_UdmfRecord* pThis, OH_UdsHtml* html)
```

@@ -1226,7 +1226,7 @@ Obtains [OH_UdsHtml](capi-udmf-oh-udshtml.md) data from an [OH_UdmfRecord](capi-

### OH_UdmfRecord_GetAppItem()

```
```c
int OH_UdmfRecord_GetAppItem(OH_UdmfRecord* pThis, OH_UdsAppItem* appItem)
```

@@ -1252,7 +1252,7 @@ Obtains [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) data from an [OH_UdmfRecord]

### OH_UdmfRecord_SetProvider()

```
```c
int OH_UdmfRecord_SetProvider(OH_UdmfRecord* pThis, const char* const* types, unsigned int count, OH_UdmfRecordProvider* provider)
```

@@ -1280,7 +1280,7 @@ Sets the [OH_UdmfRecordProvider](capi-udmf-oh-udmfrecordprovider.md) in an [OH_U

### OH_UdmfRecord_GetFileUri()

```
```c
int OH_UdmfRecord_GetFileUri(OH_UdmfRecord* pThis, OH_UdsFileUri* fileUri)
```

@@ -1306,7 +1306,7 @@ Obtains [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) data from an [OH_UdmfRecord]

### OH_UdmfRecord_GetPixelMap()

```
```c
int OH_UdmfRecord_GetPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap)
```

@@ -1332,7 +1332,7 @@ Obtains [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md) data from an [OH_UdmfRecor

### OH_UdmfRecord_GetArrayBuffer()

```
```c
int OH_UdmfRecord_GetArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer)
```

@@ -1359,7 +1359,7 @@ Obtains [OH_UdsArrayBuffer](capi-udmf-oh-udsarraybuffer.md) data from an [OH_Udm

### OH_UdmfRecord_GetContentForm()

```
```c
int OH_UdmfRecord_GetContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm)
```

@@ -1385,7 +1385,7 @@ Obtains [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) data from an [OH_Udm

### OH_UdmfData_GetPrimaryPlainText()

```
```c
int OH_UdmfData_GetPrimaryPlainText(OH_UdmfData* data, OH_UdsPlainText* plainText)
```

@@ -1411,7 +1411,7 @@ Obtains the first [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) data from an [

### OH_UdmfData_GetPrimaryHtml()

```
```c
int OH_UdmfData_GetPrimaryHtml(OH_UdmfData* data, OH_UdsHtml* html)
```

@@ -1437,7 +1437,7 @@ Obtains the first [OH_UdsHtml](capi-udmf-oh-udshtml.md) data from an [OH_UdmfDat

### OH_UdmfData_GetRecordCount()

```
```c
int OH_UdmfData_GetRecordCount(OH_UdmfData* data)
```

@@ -1462,7 +1462,7 @@ Obtains the number of data records contained in an [OH_UdmfData](capi-udmf-oh-ud

### OH_UdmfData_GetRecord()

```
```c
OH_UdmfRecord* OH_UdmfData_GetRecord(OH_UdmfData* data, unsigned int index)
```

@@ -1488,7 +1488,7 @@ Obtains the specified data record from an [OH_UdmfData](capi-udmf-oh-udmfdata.md

### OH_UdmfData_IsLocal()

```
```c
bool OH_UdmfData_IsLocal(OH_UdmfData* data)
```

@@ -1513,7 +1513,7 @@ Checks whether an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance is from the l

### OH_UdmfProperty_Create()

```
```c
OH_UdmfProperty* OH_UdmfProperty_Create(OH_UdmfData* unifiedData)
```

@@ -1538,7 +1538,7 @@ Creates an [OH_UdmfProperty](capi-udmf-oh-udmfproperty.md) instance and a pointe

### OH_UdmfProperty_Destroy()

```
```c
void OH_UdmfProperty_Destroy(OH_UdmfProperty* pThis)
```

@@ -1557,7 +1557,7 @@ Destroys an [OH_UdmfProperty](capi-udmf-oh-udmfproperty.md) instance.

### OH_UdmfProperty_GetTag()

```
```c
const char* OH_UdmfProperty_GetTag(OH_UdmfProperty* pThis)
```

@@ -1582,7 +1582,7 @@ Obtains the custom tag value from an [OH_UdmfProperty](capi-udmf-oh-udmfproperty

### OH_UdmfProperty_GetTimestamp()

```
```c
int64_t OH_UdmfProperty_GetTimestamp(OH_UdmfProperty* pThis)
```

@@ -1607,7 +1607,7 @@ Obtains the timestamp from an [OH_UdmfProperty](capi-udmf-oh-udmfproperty.md) in

### OH_UdmfProperty_GetShareOption()

```
```c
Udmf_ShareOption OH_UdmfProperty_GetShareOption(OH_UdmfProperty* pThis)
```

@@ -1632,7 +1632,7 @@ Obtains the share option from an [OH_UdmfProperty](capi-udmf-oh-udmfproperty.md)

### OH_UdmfProperty_GetExtrasIntParam()

```
```c
int OH_UdmfProperty_GetExtrasIntParam(OH_UdmfProperty* pThis, const char* key, int defaultValue)
```

@@ -1659,7 +1659,7 @@ Obtains the customized extra integer parameter from an [OH_UdmfProperty](capi-ud

### OH_UdmfProperty_GetExtrasStringParam()

```
```c
const char* OH_UdmfProperty_GetExtrasStringParam(OH_UdmfProperty* pThis, const char* key)
```

@@ -1685,7 +1685,7 @@ Obtains the customized extra string parameter from an [OH_UdmfProperty](capi-udm

### OH_UdmfProperty_SetTag()

```
```c
int OH_UdmfProperty_SetTag(OH_UdmfProperty* pThis, const char* tag)
```

@@ -1711,7 +1711,7 @@ Sets the tag value for an [OH_UdmfProperty](capi-udmf-oh-udmfproperty.md) instan

### OH_UdmfProperty_SetShareOption()

```
```c
int OH_UdmfProperty_SetShareOption(OH_UdmfProperty* pThis, Udmf_ShareOption option)
```

@@ -1737,7 +1737,7 @@ Sets the [Udmf_ShareOption](capi-udmf-h.md#udmf_shareoption) for an [OH_UdmfProp

### OH_UdmfProperty_SetExtrasIntParam()

```
```c
int OH_UdmfProperty_SetExtrasIntParam(OH_UdmfProperty* pThis, const char* key, int param)
```

@@ -1764,7 +1764,7 @@ Sets the extra integer parameter for an [OH_UdmfProperty](capi-udmf-oh-udmfprope

### OH_UdmfProperty_SetExtrasStringParam()

```
```c
int OH_UdmfProperty_SetExtrasStringParam(OH_UdmfProperty* pThis, const char* key, const char* param)
```

@@ -1791,7 +1791,7 @@ Sets the extra string parameter for an [OH_UdmfProperty](capi-udmf-oh-udmfproper

### OH_UdmfOptions_Create()

```
```c
OH_UdmfOptions* OH_UdmfOptions_Create()
```

@@ -1809,7 +1809,7 @@ Creates an [OH_UdmfOptions](capi-udmf-oh-udmfoptions.md) instance.

### OH_UdmfOptions_Destroy()

```
```c
void OH_UdmfOptions_Destroy(OH_UdmfOptions* pThis)
```

@@ -1828,7 +1828,7 @@ Destroys an [OH_UdmfOptions](capi-udmf-oh-udmfoptions.md) instance.

### OH_UdmfOptions_GetKey()

```
```c
const char* OH_UdmfOptions_GetKey(OH_UdmfOptions* pThis)
```

@@ -1853,7 +1853,7 @@ Obtains the key (unique identifier) from an [OH_UdmfOptions](capi-udmf-oh-udmfop

### OH_UdmfOptions_SetKey()

```
```c
int OH_UdmfOptions_SetKey(OH_UdmfOptions* pThis, const char* key)
```

@@ -1879,7 +1879,7 @@ Sets the key (unique identifier) in an [OH_UdmfOptions](capi-udmf-oh-udmfoptions

### OH_UdmfOptions_GetIntention()

```
```c
Udmf_Intention OH_UdmfOptions_GetIntention(OH_UdmfOptions* pThis)
```

@@ -1904,7 +1904,7 @@ Obtains the data channel information from an [OH_UdmfOptions](capi-udmf-oh-udmfo

### OH_UdmfOptions_SetIntention()

```
```c
int OH_UdmfOptions_SetIntention(OH_UdmfOptions* pThis, Udmf_Intention intention)
```

@@ -1930,7 +1930,7 @@ Sets the data channel content parameter in an [OH_UdmfOptions](capi-udmf-oh-udmf

### OH_UdmfOptions_Reset()

```
```c
int OH_UdmfOptions_Reset(OH_UdmfOptions* pThis)
```

@@ -1955,7 +1955,7 @@ Resets an [OH_UdmfOptions](capi-udmf-oh-udmfoptions.md) instance to empty.

### OH_Udmf_GetUnifiedData()

```
```c
int OH_Udmf_GetUnifiedData(const char* key, Udmf_Intention intention, OH_UdmfData* unifiedData)
```

@@ -1982,7 +1982,7 @@ Obtains an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance from the UDMF databa

### OH_Udmf_GetUnifiedDataByOptions()

```
```c
int OH_Udmf_GetUnifiedDataByOptions(OH_UdmfOptions* options, OH_UdmfData** dataArray, unsigned int* dataSize)
```

@@ -2009,7 +2009,7 @@ Obtains an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance from the UDMF databa

### OH_Udmf_SetUnifiedData()

```
```c
int OH_Udmf_SetUnifiedData(Udmf_Intention intention, OH_UdmfData* unifiedData, char* key, unsigned int keyLen)
```

@@ -2037,7 +2037,7 @@ Sets an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance in the UDMF database.

### OH_Udmf_SetUnifiedDataByOptions()

```
```c
int OH_Udmf_SetUnifiedDataByOptions(OH_UdmfOptions* options, OH_UdmfData *unifiedData, char *key, unsigned int keyLen)
```

@@ -2065,7 +2065,7 @@ Sets an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance in the UDMF database.

### OH_Udmf_UpdateUnifiedData()

```
```c
int OH_Udmf_UpdateUnifiedData(OH_UdmfOptions* options, OH_UdmfData* unifiedData)
```

@@ -2091,7 +2091,7 @@ Updates an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance in the UDMF database

### OH_Udmf_DeleteUnifiedData()

```
```c
int OH_Udmf_DeleteUnifiedData(OH_UdmfOptions* options, OH_UdmfData** dataArray, unsigned int* dataSize)
```

@@ -2118,7 +2118,7 @@ Deletes an [OH_UdmfData](capi-udmf-oh-udmfdata.md) instance from the UDMF databa

### OH_Udmf_DestroyDataArray()

```
```c
void OH_Udmf_DestroyDataArray(OH_UdmfData** dataArray, unsigned int dataSize)
```

@@ -2142,7 +2142,7 @@ OH_UdmfData

### OH_UdmfProgressInfo_GetProgress()

```
```c
int OH_UdmfProgressInfo_GetProgress(OH_Udmf_ProgressInfo* progressInfo)
```

@@ -2167,7 +2167,7 @@ Obtains the progress (in percentage) from an [OH_Udmf_ProgressInfo](capi-udmf-oh

### OH_UdmfProgressInfo_GetStatus()

```
```c
int OH_UdmfProgressInfo_GetStatus(OH_Udmf_ProgressInfo* progressInfo)
```

@@ -2192,7 +2192,7 @@ Obtains the status information from an [OH_Udmf_ProgressInfo](capi-udmf-oh-udmf-

### OH_UdmfGetDataParams_Create()

```
```c
OH_UdmfGetDataParams* OH_UdmfGetDataParams_Create()
```

@@ -2210,7 +2210,7 @@ Creates an [OH_UdmfGetDataParams](capi-udmf-oh-udmfgetdataparams.md) instance an

### OH_UdmfGetDataParams_Destroy()

```
```c
void OH_UdmfGetDataParams_Destroy(OH_UdmfGetDataParams* pThis)
```

@@ -2229,7 +2229,7 @@ Destroys an [OH_UdmfGetDataParams](capi-udmf-oh-udmfgetdataparams.md) instance.

### OH_UdmfGetDataParams_SetDestUri()

```
```c
void OH_UdmfGetDataParams_SetDestUri(OH_UdmfGetDataParams* params, const char* destUri)
```

@@ -2249,7 +2249,7 @@ Sets the destination directory in an [OH_UdmfGetDataParams](capi-udmf-oh-udmfget

### OH_UdmfGetDataParams_SetFileConflictOptions()

```
```c
void OH_UdmfGetDataParams_SetFileConflictOptions(OH_UdmfGetDataParams* params, const Udmf_FileConflictOptions options)
```

@@ -2269,7 +2269,7 @@ Sets the policy for resolving file conflicts in an [OH_UdmfGetDataParams](capi-u

### OH_UdmfGetDataParams_SetProgressIndicator()

```
```c
void OH_UdmfGetDataParams_SetProgressIndicator(OH_UdmfGetDataParams* params, const Udmf_ProgressIndicator progressIndicator)
```

@@ -2289,7 +2289,7 @@ Sets the progress indicator in an [OH_UdmfGetDataParams](capi-udmf-oh-udmfgetdat

### OH_UdmfGetDataParams_SetDataProgressListener()

```
```c
void OH_UdmfGetDataParams_SetDataProgressListener(OH_UdmfGetDataParams* params, const OH_Udmf_DataProgressListener dataProgressListener)
```

@@ -2309,7 +2309,7 @@ Sets the callback used to return the progress obtained in an [OH_UdmfGetDataPara

### OH_UDMF_GetDataElementAt()

```
```c
OH_UdmfData* OH_UDMF_GetDataElementAt(OH_UdmfData** dataArray, unsigned int index)
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmf-progressinfo.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Udmf_ProgressInfo OH_Udmf_ProgressInfo
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdata.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfData OH_UdmfData
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdataloadinfo.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfDataLoadInfo OH_UdmfDataLoadInfo
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfdataloadparams.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfDataLoadParams OH_UdmfDataLoadParams
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfgetdataparams.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfGetDataParams OH_UdmfGetDataParams
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfoptions.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfOptions OH_UdmfOptions
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfproperty.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfProperty OH_UdmfProperty
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfrecord.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfRecord OH_UdmfRecord
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udmfrecordprovider.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdmfRecordProvider OH_UdmfRecordProvider
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsappitem.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsAppItem OH_UdsAppItem
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsarraybuffer.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsArrayBuffer OH_UdsArrayBuffer
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udscontentform.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsContentForm OH_UdsContentForm
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsdetails.md View File

@@ -7,7 +7,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsDetails OH_UdsDetails
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsfileuri.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsFileUri OH_UdsFileUri
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udshtml.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsHtml OH_UdsHtml
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udshyperlink.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsHyperlink OH_UdsHyperlink
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udspixelmap.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsPixelMap OH_UdsPixelMap
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-udsplaintext.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_UdsPlainText OH_UdsPlainText
```



+ 1
- 1
en/application-dev/reference/apis-arkdata/capi-udmf-oh-utd.md View File

@@ -6,7 +6,7 @@
<!--Tester: @lj_liujing; @yippo; @logic42-->
<!--Adviser: @ge-yafang-->

```
```c
typedef struct OH_Utd OH_Utd
```



+ 87
- 87
en/application-dev/reference/apis-arkdata/capi-uds-h.md View File

@@ -133,7 +133,7 @@ Defines the APIs and structs related to the uniform data structs.

### OH_UdsPlainText_Create()

```
```c
OH_UdsPlainText* OH_UdsPlainText_Create()
```

@@ -151,7 +151,7 @@ Creates an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) instance and a pointe

### OH_UdsPlainText_Destroy()

```
```c
void OH_UdsPlainText_Destroy(OH_UdsPlainText* pThis)
```

@@ -170,7 +170,7 @@ Destroys an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) instance.

### OH_UdsPlainText_GetType()

```
```c
const char* OH_UdsPlainText_GetType(OH_UdsPlainText* pThis)
```

@@ -195,7 +195,7 @@ Obtains the type ID from an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) inst

### OH_UdsPlainText_GetContent()

```
```c
const char* OH_UdsPlainText_GetContent(OH_UdsPlainText* pThis)
```

@@ -220,7 +220,7 @@ Obtains the plaintext from an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) in

### OH_UdsPlainText_GetAbstract()

```
```c
const char* OH_UdsPlainText_GetAbstract(OH_UdsPlainText* pThis)
```

@@ -247,7 +247,7 @@ OH_UdsPlainText

### OH_UdsPlainText_SetContent()

```
```c
int OH_UdsPlainText_SetContent(OH_UdsPlainText* pThis, const char* content)
```

@@ -273,7 +273,7 @@ Sets the plaintext content for an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md

### OH_UdsPlainText_SetAbstract()

```
```c
int OH_UdsPlainText_SetAbstract(OH_UdsPlainText* pThis, const char* abstract)
```

@@ -299,7 +299,7 @@ Sets the abstract for an [OH_UdsPlainText](capi-udmf-oh-udsplaintext.md) instanc

### OH_UdsHyperlink_Create()

```
```c
OH_UdsHyperlink* OH_UdsHyperlink_Create()
```

@@ -317,7 +317,7 @@ Creates an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) instance and a pointe

### OH_UdsHyperlink_Destroy()

```
```c
void OH_UdsHyperlink_Destroy(OH_UdsHyperlink* pThis)
```

@@ -336,7 +336,7 @@ Destroys an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) instance.

### OH_UdsHyperlink_GetType()

```
```c
const char* OH_UdsHyperlink_GetType(OH_UdsHyperlink* pThis)
```

@@ -361,7 +361,7 @@ Obtains the type ID from an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) inst

### OH_UdsHyperlink_GetUrl()

```
```c
const char* OH_UdsHyperlink_GetUrl(OH_UdsHyperlink* pThis)
```

@@ -386,7 +386,7 @@ Obtains the URL from an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) instance

### OH_UdsHyperlink_GetDescription()

```
```c
const char* OH_UdsHyperlink_GetDescription(OH_UdsHyperlink* pThis)
```

@@ -411,7 +411,7 @@ Obtains the description from an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md)

### OH_UdsHyperlink_SetUrl()

```
```c
int OH_UdsHyperlink_SetUrl(OH_UdsHyperlink* pThis, const char* url)
```

@@ -437,7 +437,7 @@ Sets the URL for an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) instance.

### OH_UdsHyperlink_SetDescription()

```
```c
int OH_UdsHyperlink_SetDescription(OH_UdsHyperlink* pThis, const char* description)
```

@@ -463,7 +463,7 @@ Sets the description for an [OH_UdsHyperlink](capi-udmf-oh-udshyperlink.md) inst

### OH_UdsHtml_Create()

```
```c
OH_UdsHtml* OH_UdsHtml_Create()
```

@@ -481,7 +481,7 @@ Creates an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance and a pointer to it. I

### OH_UdsHtml_Destroy()

```
```c
void OH_UdsHtml_Destroy(OH_UdsHtml* pThis)
```

@@ -500,7 +500,7 @@ Destroys an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance.

### OH_UdsHtml_GetType()

```
```c
const char* OH_UdsHtml_GetType(OH_UdsHtml* pThis)
```

@@ -525,7 +525,7 @@ Obtains the type ID from an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance.

### OH_UdsHtml_GetContent()

```
```c
const char* OH_UdsHtml_GetContent(OH_UdsHtml* pThis)
```

@@ -550,7 +550,7 @@ Obtains the HTML content from an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance.

### OH_UdsHtml_GetPlainContent()

```
```c
const char* OH_UdsHtml_GetPlainContent(OH_UdsHtml* pThis)
```

@@ -575,7 +575,7 @@ Obtains the plaintext content from an [OH_UdsHtml](capi-udmf-oh-udshtml.md) inst

### OH_UdsHtml_SetContent()

```
```c
int OH_UdsHtml_SetContent(OH_UdsHtml* pThis, const char* content)
```

@@ -601,7 +601,7 @@ Sets the HTML content for an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance.

### OH_UdsHtml_SetPlainContent()

```
```c
int OH_UdsHtml_SetPlainContent(OH_UdsHtml* pThis, const char* plainContent)
```

@@ -627,7 +627,7 @@ Sets the plaintext content for an [OH_UdsHtml](capi-udmf-oh-udshtml.md) instance

### OH_UdsAppItem_Create()

```
```c
OH_UdsAppItem* OH_UdsAppItem_Create()
```

@@ -645,7 +645,7 @@ Creates an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance and a pointer to

### OH_UdsAppItem_Destroy()

```
```c
void OH_UdsAppItem_Destroy(OH_UdsAppItem* pThis)
```

@@ -664,7 +664,7 @@ Destroys an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance.

### OH_UdsAppItem_GetType()

```
```c
const char* OH_UdsAppItem_GetType(OH_UdsAppItem* pThis)
```

@@ -689,7 +689,7 @@ Obtains the type ID from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance

### OH_UdsAppItem_GetId()

```
```c
const char* OH_UdsAppItem_GetId(OH_UdsAppItem* pThis)
```

@@ -714,7 +714,7 @@ Obtains the application ID from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) i

### OH_UdsAppItem_GetName()

```
```c
const char* OH_UdsAppItem_GetName(OH_UdsAppItem* pThis)
```

@@ -739,7 +739,7 @@ Obtains the application name from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md)

### OH_UdsAppItem_GetIconId()

```
```c
const char* OH_UdsAppItem_GetIconId(OH_UdsAppItem* pThis)
```

@@ -764,7 +764,7 @@ Obtains the image ID from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instanc

### OH_UdsAppItem_GetLabelId()

```
```c
const char* OH_UdsAppItem_GetLabelId(OH_UdsAppItem* pThis)
```

@@ -789,7 +789,7 @@ Obtains the label ID from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instanc

### OH_UdsAppItem_GetBundleName()

```
```c
const char* OH_UdsAppItem_GetBundleName(OH_UdsAppItem* pThis)
```

@@ -814,7 +814,7 @@ Obtains the bundle name from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) inst

### OH_UdsAppItem_GetAbilityName()

```
```c
const char* OH_UdsAppItem_GetAbilityName(OH_UdsAppItem* pThis)
```

@@ -839,7 +839,7 @@ Obtains the ability name from an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) ins

### OH_UdsAppItem_SetId()

```
```c
int OH_UdsAppItem_SetId(OH_UdsAppItem* pThis, const char* appId)
```

@@ -865,7 +865,7 @@ Sets the application ID for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) insta

### OH_UdsAppItem_SetName()

```
```c
int OH_UdsAppItem_SetName(OH_UdsAppItem* pThis, const char* appName)
```

@@ -891,7 +891,7 @@ Sets the application name for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) ins

### OH_UdsAppItem_SetIconId()

```
```c
int OH_UdsAppItem_SetIconId(OH_UdsAppItem* pThis, const char* appIconId)
```

@@ -917,7 +917,7 @@ Sets the icon ID for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance.

### OH_UdsAppItem_SetLabelId()

```
```c
int OH_UdsAppItem_SetLabelId(OH_UdsAppItem* pThis, const char* appLabelId)
```

@@ -943,7 +943,7 @@ Sets the label ID for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance.

### OH_UdsAppItem_SetBundleName()

```
```c
int OH_UdsAppItem_SetBundleName(OH_UdsAppItem* pThis, const char* bundleName)
```

@@ -969,7 +969,7 @@ Sets the bundle name for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instance

### OH_UdsAppItem_SetAbilityName()

```
```c
int OH_UdsAppItem_SetAbilityName(OH_UdsAppItem* pThis, const char* abilityName)
```

@@ -995,7 +995,7 @@ Sets the ability name for an [OH_UdsAppItem](capi-udmf-oh-udsappitem.md) instanc

### OH_UdsFileUri_Create()

```
```c
OH_UdsFileUri* OH_UdsFileUri_Create()
```

@@ -1013,7 +1013,7 @@ Creates an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instance and a pointer to

### OH_UdsFileUri_Destroy()

```
```c
void OH_UdsFileUri_Destroy(OH_UdsFileUri* pThis)
```

@@ -1032,7 +1032,7 @@ Destroys an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instance.

### OH_UdsFileUri_GetType()

```
```c
const char* OH_UdsFileUri_GetType(OH_UdsFileUri* pThis)
```

@@ -1057,7 +1057,7 @@ Obtains the type ID from an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instance

### OH_UdsFileUri_GetFileUri()

```
```c
const char* OH_UdsFileUri_GetFileUri(OH_UdsFileUri* pThis)
```

@@ -1082,7 +1082,7 @@ Obtains the file URI from an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instanc

### OH_UdsFileUri_GetFileType()

```
```c
const char* OH_UdsFileUri_GetFileType(OH_UdsFileUri* pThis)
```

@@ -1107,7 +1107,7 @@ Obtains the file type from an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instan

### OH_UdsFileUri_SetFileUri()

```
```c
int OH_UdsFileUri_SetFileUri(OH_UdsFileUri* pThis, const char* fileUri)
```

@@ -1133,7 +1133,7 @@ Sets the URI information for an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) inst

### OH_UdsFileUri_SetFileType()

```
```c
int OH_UdsFileUri_SetFileType(OH_UdsFileUri* pThis, const char* fileType)
```

@@ -1159,7 +1159,7 @@ Sets the file type for an [OH_UdsFileUri](capi-udmf-oh-udsfileuri.md) instance.

### OH_UdsPixelMap_Create()

```
```c
OH_UdsPixelMap* OH_UdsPixelMap_Create()
```

@@ -1177,7 +1177,7 @@ Creates an [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md) instance and a pointer

### OH_UdsPixelMap_Destroy()

```
```c
void OH_UdsPixelMap_Destroy(OH_UdsPixelMap* pThis)
```

@@ -1196,7 +1196,7 @@ Destroys an [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md) instance.

### OH_UdsPixelMap_GetType()

```
```c
const char* OH_UdsPixelMap_GetType(OH_UdsPixelMap* pThis)
```

@@ -1221,7 +1221,7 @@ Obtains the type ID from an [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md) instan

### OH_UdsPixelMap_GetPixelMap()

```
```c
void OH_UdsPixelMap_GetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)
```

@@ -1241,7 +1241,7 @@ Obtains the pointer to the [OH_PixelmapNative](../apis-image-kit/capi-pixelmap-n

### OH_UdsPixelMap_SetPixelMap()

```
```c
int OH_UdsPixelMap_SetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)
```

@@ -1267,7 +1267,7 @@ Sets the pixel image content for an [OH_UdsPixelMap](capi-udmf-oh-udspixelmap.md

### OH_UdsArrayBuffer_Create()

```
```c
OH_UdsArrayBuffer* OH_UdsArrayBuffer_Create()
```

@@ -1285,7 +1285,7 @@ Creates an [OH_UdsArrayBuffer](capi-udmf-oh-udsarraybuffer.md) instance and a po

### OH_UdsArrayBuffer_Destroy()

```
```c
int OH_UdsArrayBuffer_Destroy(OH_UdsArrayBuffer* buffer)
```

@@ -1310,7 +1310,7 @@ Destroys an [OH_UdsArrayBuffer](capi-udmf-oh-udsarraybuffer.md) instance.

### OH_UdsArrayBuffer_SetData()

```
```c
int OH_UdsArrayBuffer_SetData(OH_UdsArrayBuffer* buffer, unsigned char* data, unsigned int len)
```

@@ -1337,7 +1337,7 @@ Sets the data content for an [OH_UdsArrayBuffer](capi-udmf-oh-udsarraybuffer.md)

### OH_UdsArrayBuffer_GetData()

```
```c
int OH_UdsArrayBuffer_GetData(OH_UdsArrayBuffer* buffer, unsigned char** data, unsigned int* len)
```

@@ -1364,7 +1364,7 @@ Obtains the custom ArrayBuffer data from an [OH_UdsArrayBuffer](capi-udmf-oh-uds

### OH_UdsContentForm_Create()

```
```c
OH_UdsContentForm* OH_UdsContentForm_Create()
```

@@ -1382,7 +1382,7 @@ Creates an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) instance and a po

### OH_UdsContentForm_Destroy()

```
```c
void OH_UdsContentForm_Destroy(OH_UdsContentForm* pThis)
```

@@ -1401,7 +1401,7 @@ Destroys an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) instance.

### OH_UdsContentForm_GetType()

```
```c
const char* OH_UdsContentForm_GetType(OH_UdsContentForm* pThis)
```

@@ -1426,7 +1426,7 @@ Obtains the type ID from an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md)

### OH_UdsContentForm_GetThumbData()

```
```c
int OH_UdsContentForm_GetThumbData(OH_UdsContentForm* pThis, unsigned char** thumbData, unsigned int* len)
```

@@ -1453,7 +1453,7 @@ Obtains the image data from an [OH_UdsContentForm](capi-udmf-oh-udscontentform.m

### OH_UdsContentForm_GetDescription()

```
```c
const char* OH_UdsContentForm_GetDescription(OH_UdsContentForm* pThis)
```

@@ -1478,7 +1478,7 @@ Obtains the description from an [OH_UdsContentForm](capi-udmf-oh-udscontentform.

### OH_UdsContentForm_GetTitle()

```
```c
const char* OH_UdsContentForm_GetTitle(OH_UdsContentForm* pThis)
```

@@ -1503,7 +1503,7 @@ Obtains the title from an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) in

### OH_UdsContentForm_GetAppIcon()

```
```c
int OH_UdsContentForm_GetAppIcon(OH_UdsContentForm* pThis, unsigned char** appIcon, unsigned int* len)
```

@@ -1530,7 +1530,7 @@ Obtains the application icon data from an [OH_UdsContentForm](capi-udmf-oh-udsco

### OH_UdsContentForm_GetAppName()

```
```c
const char* OH_UdsContentForm_GetAppName(OH_UdsContentForm* pThis)
```

@@ -1555,7 +1555,7 @@ Obtains the application name from an [OH_UdsContentForm](capi-udmf-oh-udscontent

### OH_UdsContentForm_GetLinkUri()

```
```c
const char* OH_UdsContentForm_GetLinkUri(OH_UdsContentForm* pThis)
```

@@ -1580,7 +1580,7 @@ Obtains the hyperlink from an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md

### OH_UdsContentForm_SetThumbData()

```
```c
int OH_UdsContentForm_SetThumbData(OH_UdsContentForm* pThis, const unsigned char* thumbData, unsigned int len)
```

@@ -1607,7 +1607,7 @@ Sets the image data for an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) i

### OH_UdsContentForm_SetDescription()

```
```c
int OH_UdsContentForm_SetDescription(OH_UdsContentForm* pThis, const char* description)
```

@@ -1633,7 +1633,7 @@ Sets the description for an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md)

### OH_UdsContentForm_SetTitle()

```
```c
int OH_UdsContentForm_SetTitle(OH_UdsContentForm* pThis, const char* title)
```

@@ -1659,7 +1659,7 @@ Sets the title for an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) instan

### OH_UdsContentForm_SetAppIcon()

```
```c
int OH_UdsContentForm_SetAppIcon(OH_UdsContentForm* pThis, const unsigned char* appIcon, unsigned int len)
```

@@ -1686,7 +1686,7 @@ Sets the application icon data for an [OH_UdsContentForm](capi-udmf-oh-udsconten

### OH_UdsContentForm_SetAppName()

```
```c
int OH_UdsContentForm_SetAppName(OH_UdsContentForm* pThis, const char* appName)
```

@@ -1712,7 +1712,7 @@ Sets the application name for an [OH_UdsContentForm](capi-udmf-oh-udscontentform

### OH_UdsContentForm_SetLinkUri()

```
```c
int OH_UdsContentForm_SetLinkUri(OH_UdsContentForm* pThis, const char* linkUri)
```

@@ -1739,7 +1739,7 @@ Sets the hyperlink for an [OH_UdsContentForm](capi-udmf-oh-udscontentform.md) in

### OH_UdsPlainText_GetDetails()

```
```c
int OH_UdsPlainText_GetDetails(OH_UdsPlainText* pThis, OH_UdsDetails* details)
```

@@ -1764,7 +1764,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsPlainText_SetDetails()

```
```c
int OH_UdsPlainText_SetDetails(OH_UdsPlainText* pThis, const OH_UdsDetails* details)
```

@@ -1789,7 +1789,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsPla

### OH_UdsHyperlink_GetDetails()

```
```c
int OH_UdsHyperlink_GetDetails(OH_UdsHyperlink* pThis, OH_UdsDetails* details)
```

@@ -1814,7 +1814,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsHyperlink_SetDetails()

```
```c
int OH_UdsHyperlink_SetDetails(OH_UdsHyperlink* pThis, const OH_UdsDetails* details)
```

@@ -1839,7 +1839,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsHyp

### OH_UdsHtml_GetDetails()

```
```c
int OH_UdsHtml_GetDetails(OH_UdsHtml* pThis, OH_UdsDetails* details)
```

@@ -1864,7 +1864,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsHtml_SetDetails()

```
```c
int OH_UdsHtml_SetDetails(OH_UdsHtml* pThis, const OH_UdsDetails* details)
```

@@ -1889,7 +1889,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsHtm

### OH_UdsAppItem_GetDetails()

```
```c
int OH_UdsAppItem_GetDetails(OH_UdsAppItem* pThis, OH_UdsDetails* details)
```

@@ -1914,7 +1914,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsAppItem_SetDetails()

```
```c
int OH_UdsAppItem_SetDetails(OH_UdsAppItem* pThis, const OH_UdsDetails* details)
```

@@ -1939,7 +1939,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsApp

### OH_UdsFileUri_GetDetails()

```
```c
int OH_UdsFileUri_GetDetails(OH_UdsFileUri* pThis, OH_UdsDetails* details)
```

@@ -1964,7 +1964,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsFileUri_SetDetails()

```
```c
int OH_UdsFileUri_SetDetails(OH_UdsFileUri* pThis, const OH_UdsDetails* details)
```

@@ -1989,7 +1989,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsFil

### OH_UdsPixelMap_GetDetails()

```
```c
int OH_UdsPixelMap_GetDetails(OH_UdsPixelMap* pThis, OH_UdsDetails* details)
```

@@ -2014,7 +2014,7 @@ Obtains the pointer to the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance

### OH_UdsPixelMap_SetDetails()

```
```c
int OH_UdsPixelMap_SetDetails(OH_UdsPixelMap* pThis, const OH_UdsDetails* details)
```

@@ -2039,7 +2039,7 @@ Sets the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) parameter for an [OH_UdsPix

### OH_UdsDetails_Create()

```
```c
OH_UdsDetails* OH_UdsDetails_Create()
```

@@ -2059,7 +2059,7 @@ If this pointer is no longer required, use [OH_UdsDetails_Destroy](capi-uds-h.md

### OH_UdsDetails_Destroy()

```
```c
void OH_UdsDetails_Destroy(OH_UdsDetails* pThis)
```

@@ -2077,7 +2077,7 @@ Destroys an [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance.

### OH_UdsDetails_HasKey()

```
```c
bool OH_UdsDetails_HasKey(const OH_UdsDetails* pThis, const char* key)
```

@@ -2102,7 +2102,7 @@ Checks whether the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance contains

### OH_UdsDetails_Remove()

```
```c
int OH_UdsDetails_Remove(OH_UdsDetails* pThis, const char* key)
```

@@ -2127,7 +2127,7 @@ Deletes the specified KV pair from the [OH_UdsDetails](capi-udmf-oh-udsdetails.m

### OH_UdsDetails_Clear()

```
```c
int OH_UdsDetails_Clear(OH_UdsDetails* pThis)
```

@@ -2151,7 +2151,7 @@ Clears all data from the [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance.

### OH_UdsDetails_SetValue()

```
```c
int OH_UdsDetails_SetValue(OH_UdsDetails* pThis, const char* key, const char* value)
```

@@ -2177,7 +2177,7 @@ Adds a KV pair to an [OH_UdsDetails](capi-udmf-oh-udsdetails.md) instance.

### OH_UdsDetails_GetValue()

```
```c
const char* OH_UdsDetails_GetValue(const OH_UdsDetails* pThis, const char* key)
```

@@ -2202,7 +2202,7 @@ Obtains the value of a specified key from an [OH_UdsDetails](capi-udmf-oh-udsdet

### OH_UdsDetails_GetAllKeys()

```
```c
char** OH_UdsDetails_GetAllKeys(OH_UdsDetails* pThis, unsigned int* count)
```



Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save
Baidu
map