README.md
1# Creation and Access of Native-based Data Abilities
2
3
4
5### Introduction
6
7This sample shows how to create and access a Data ability in Extended TypeScript (eTS). Data abilities are added, deleted, updated, and queried using interfaces implemented through the rational database (RDB), and accessed using **DataAbilityHelper**.
8
9### Usage
10
111. On the home page of the sample app, touch **Batch insert** in the upper right corner or **+** in the lower right corner to insert a data record to the Data ability through the **DataAbilityHelper**.
12
132. Touch **X** next to the new data record in the list to delete the record.
14
153. Touch a data record in the list to edit the record on the editing page. After the editing is complete, touch **✓** to save the data and return to the home page.
16
174. On the home page, touch the search box at the top of the list to enter the search page. Enter the keyword for search. The data that contains the keyword is displayed in the list.
18
19
20
21### Constraints
22
23This sample can only be run on standard-system devices.
24
README_zh.md
1# DataAbility的创建与使用
2
3### 简介
4
5本示例展示了在eTS中DataAbiltiy的创建与访问,其中DataAbiltiy中的增删改查接口使用rdb实现,使用DataAbilityHelper进行访问。实现效果如下:
6
7
8
9### 相关概念
10
11- DataAbility:基于Data模板的Ability(以下简称“Data”),有助于应用管理其自身和其他应用存储数据的访问,并提供与其他应用共享数据的方法。Data既可用于同设备不同应用的数据共享,也支持跨设备不同应用的数据共享。
12
13### 相关权限
14
15不涉及
16
17### 使用说明
18
191.在首页点击右上角的**批量插入**按钮或者右下角的 **+** 按钮可以通过DataAbilityHelper向DataAbiltiy中插入数据。
20
212.在首页中添加数据后,点击书籍列表中的**X**按钮可以删除该条数据。
22
233.点击书籍列表中的一条数据,可以进入编辑界面编辑该条数据,点击**✓**可以更新数据并返回首页。
24
254.在首页点击列表顶部的搜索框进入搜索界面,在搜索框中输入字符串,可以搜索书名和简介包含所输入字符串的书籍,并显示在搜索框下的列表中。
26
27### 约束与限制
28
291.本示例仅支持标准系统上运行。
30
312.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。