Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CDL_LuFei
Docs
提交
97be56b0
D
Docs
项目概览
CDL_LuFei
/
Docs
与 Fork 源项目一致
Fork自
OpenHarmony / Docs
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
97be56b0
编写于
12月 27, 2021
作者:
A
asfasdff
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api update
Signed-off-by:
N
asfasdff
<
zhangfei113@huawei.com
>
上级
335baf73
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
40 addition
and
0 deletion
+40
-0
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
...pplication-dev/reference/apis/js-apis-distributed-data.md
+40
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
浏览文件 @
97be56b0
...
...
@@ -1163,6 +1163,46 @@ KVStore常量。
</tbody>
</table>
## Schema ##
表示数据库架构,可以创建 Schema 对象,并在创建或打开数据库时将其放置在 Option 中。
### toJsonString ###
toJsonString():string;
获取 json 格式的 schema 。
-
返回值:
<a name="table1527413113225"></a>
<table><thead align="left"><tr id="row827519116223"><th class="cellrowborder" valign="top" width="17.83%" id="mcps1.1.3.1.1"><p id="p827512192212"><a name="p827512192212"></a><a name="p827512192212"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="82.17%" id="mcps1.1.3.1.2"><p id="p127515142218"><a name="p127515142218"></a><a name="p127515142218"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="row22758142211"><td class="cellrowborder" valign="top" width="17.83%" headers="mcps1.1.3.1.1 "><p id="p92758118220"><a name="p92758118220"></a><a name="p92758118220"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="82.17%" headers="mcps1.1.3.1.2 "><p id="p72751413225"><a name="p72751413225"></a><a name="p72751413225"></a>以 json 格式返回Schema。</p>
</td>
</tr>
</tbody>
</table>
-
示例
```
try {
let schema = new ddm.Schema();
const str = schema.toJsonString();
schema.root = new ddm.FieldNode();
const node = schema.root;
console.log("schema: " + str);
} catch (e) {}
```
## FieldNode<a name="section33333333333"></a> ##
表示 Schema 实例的节点,提供定义存储在数据库中的值的方法。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录