mirror of https://github.com/vapor/docs.git
Fix typo in Fluent -> Advanced (#757)
* Fix typo in Fluent -> Advanced (English) * Fix typo in Fluent -> Advanced (Dutch) * Fix typo in Fluent -> Advanced (Chinese)
This commit is contained in:
parent
c5bc73f599
commit
e955cc0035
|
|
@ -174,7 +174,7 @@ var queryDocument = Document()
|
|||
queryDocument["name"]["$regex"] = "e"
|
||||
queryDocument["name"]["$options"] = "i"
|
||||
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(nameDocument)).all()
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(queryDocument)).all()
|
||||
```
|
||||
|
||||
This will return planets containing 'e' and 'E'. You can also create any other complex RegEx accepted by MongoDB.
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ import FluentMongoDriver
|
|||
var queryDocument = Document()
|
||||
queryDocument["name"]["$regex"] = "e"
|
||||
queryDocument["name"]["$options"] = "i"
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(nameDocument)).all()
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(queryDocument)).all()
|
||||
```
|
||||
|
||||
Dit geeft planeten terug die 'e' en 'E' bevatten. U kunt ook elke andere complexe RegEx maken die door MongoDB wordt geaccepteerd.
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ var queryDocument = Document()
|
|||
queryDocument["name"]["$regex"] = "e"
|
||||
queryDocument["name"]["$options"] = "i"
|
||||
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(nameDocument)).all()
|
||||
let planets = try Planet.query(on: req.db).filter(.custom(queryDocument)).all()
|
||||
```
|
||||
|
||||
这将返回包含 'e' 和 'E' 的行星。你还可以创建 MongoDB 接受的任何其他复杂的 RegEx。
|
||||
|
|
|
|||
Loading…
Reference in New Issue