From d834c3e6d73e6bfcf897ad9386c9440a6c76cbf6 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Wed, 13 Nov 2019 10:24:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- description/mongodb.js.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/description/mongodb.js.md b/description/mongodb.js.md index 7478877..4737ee3 100644 --- a/description/mongodb.js.md +++ b/description/mongodb.js.md @@ -1,6 +1,8 @@ #mongodb.js说明
####引入
dbs = require("dir/mongodb.js")
+####实例化
+dbs = dbs(数据库地址,数据库名)
####使用
add 插入一条数据 ``` From 215c909a4afe5a9082f0513037685db6f2f46827 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Wed, 13 Nov 2019 10:26:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- description/mongodb.js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/description/mongodb.js.md b/description/mongodb.js.md index 4737ee3..c4f61e0 100644 --- a/description/mongodb.js.md +++ b/description/mongodb.js.md @@ -34,7 +34,7 @@ remove 删除多条数据 ``` find 查询数据 ``` -参数(操作的集合名,条件 为空为全部数据[,{数据库地址,数据库名}]) +参数(操作的集合名,条件 为空为全部数据[第几页,每页几条,{数据库地址,数据库名}]) 返回值类型 promise 成功返回 {code:0,data:[数据集]}, 失败返回 {code:1} From 529c69335c5ee2ac7ffe541ecfdfd0157d20dfe9 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Wed, 13 Nov 2019 10:26:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- description/mongodb.js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/description/mongodb.js.md b/description/mongodb.js.md index c4f61e0..1c8114f 100644 --- a/description/mongodb.js.md +++ b/description/mongodb.js.md @@ -34,7 +34,7 @@ remove 删除多条数据 ``` find 查询数据 ``` -参数(操作的集合名,条件 为空为全部数据[第几页,每页几条,{数据库地址,数据库名}]) +参数(操作的集合名,条件 为空为全部数据[,第几页,每页几条,{数据库地址,数据库名}]) 返回值类型 promise 成功返回 {code:0,data:[数据集]}, 失败返回 {code:1}