database-ql
Advanced tools
Comparing version 0.6.2 to 0.7.0
{ | ||
"name": "database-ql", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"description": "Database interface for laf", | ||
@@ -17,3 +17,3 @@ "main": "dist/commonjs/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/Maslow/laf.git" | ||
"url": "git+https://github.com/lafjs/laf.git" | ||
}, | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "0f798e0000a777cec967daf8ee85f15b7afe96cb" | ||
"gitHead": "fe36176c36a8a83d97b0343de9cf4b22e22a162b" | ||
} |
@@ -825,19 +825,2 @@ | ||
### Join 查询(仅MySQL) | ||
> 主要用于一对一或多对一关系的查询 | ||
```js | ||
const { data } = await db.collection('article') | ||
.leftJoin('user', 'id', 'author_id') | ||
.get() | ||
// 若左表与右表字段名有重复,避免字段覆盖的写法: | ||
const { data } = await db.collection('article') | ||
.leftJoin('user', 'id', 'author_id') | ||
.get({ nested: true }) | ||
// 结果如下:[ { article: {}, user: {} }, ... ] | ||
``` | ||
### With 子表查询(支持 MongoDb 和 MySQL) | ||
@@ -856,3 +839,3 @@ | ||
}) | ||
.merge() | ||
.get() | ||
@@ -875,3 +858,3 @@ console.log(data) | ||
}) | ||
.merge() | ||
.get() | ||
@@ -878,0 +861,0 @@ console.log(data) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
502994
1059