Socket
Socket
Sign inDemoInstall

database-ql

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

database-ql - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

6

package.json
{
"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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc