Skip to content
Menu
(◍ ´꒳` ◍)

  • Blog
  • Front Page
(◍ ´꒳` ◍)

鸿蒙58update

By admin on 2021年10月13日

update() 此方法用来执行更新操作。用户可以在 ValuesBucket 参数中指定要更新的数据,在 DataAbilityPredicates 中构建更新的条件等。更新用户表的数据的代码示例如下:

public int update(Uri uri, ValuesBucket value, DataAbilityPredicates predicates) { if (ormContext == null) { HiLog.error(LABEL_LOG, “failed to update, ormContext is null”); return 返回-1; } OrmPredicates ormPredicates = DataAbilityUtils.createOrmPredicates(predicates,User.class); int index = ormContext.update(ormPredicates, value); HiLog.info(LABEL_LOG, “UserDataAbility update value:” + index); DataAbilityHelper.creator创造者(this, uri).notify通知Change(uri); return index; }

Category: 鸿蒙

文章导航

鸿蒙57batchInsert和delete
opencv腐蚀操作后二

Related Posts

鸿蒙26数据收集及使用最小化

9月 16, 2021
Read More

承认平庸-iptables规则部署-显示匹配-多端口匹配-09

3月 2, 2023
Read More

基于Docker的Kafka集群搭建003

9月 25, 2023
Read More

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

近期文章

  • 实施002
  • 实施SQL001
  • 泛微oa001-字段
  • 硬件前端-海康威视摄像头
  • 使用Docker搭建Weblogic服务001

近期评论

    归档

    • 2023年10月
    • 2023年9月
    • 2023年8月
    • 2023年5月
    • 2023年4月
    • 2023年3月
    • 2021年11月
    • 2021年10月
    • 2021年9月
    • 2021年8月
    • 2021年5月

    分类

    • C
    • docker
    • iptable
    • ISIS
    • java
    • k8s
    • liunx
    • OpenCV py
    • ospf
    • solr
    • zabbix
    • 劳动法
    • 周杰伦
    • 格林法则
    • 等保
    • 鸿蒙

    其他操作

    • 登录
    • 条目feed
    • 评论feed
    • WordPress.org
    ©2025 (◍ ´꒳` ◍) | WordPress Theme by Superb WordPress Themes