mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
GRDB Extension Guide: link to future reference
This commit is contained in:
1 parent
b4342492d5
commit
0cd2c067b6
1 file changed
+4
-4
@@ -438,7 +438,7 @@ Build a `value IN (...)` expression from any sequence of [values](../../../#valu
|
||||
![1,2,3].contains(Column("id"))
|
||||
```
|
||||
|
||||
The most general way to generate an `IN` operator is from any value that adopts the [SQLCollection](#TODO) protocol, like the [query interface requests](../../../#requests):
|
||||
The most general way to generate an `IN` operator is from any value that adopts the [SQLCollection](http://cocoadocs.org/docsets/GRDB.swift/0.85.0/Protocols/SQLCollection.html) protocol, like the [query interface requests](../../../#requests):
|
||||
|
||||
```swift
|
||||
let request = Person.select(Column("id"))
|
||||
@@ -460,7 +460,7 @@ Build a `value BETWEEN min AND max` expression from Swift ranges:
|
||||
|
||||
#### The EXISTS Operator
|
||||
|
||||
Build a `EXISTS(...)` expression from any value that adopts the [SQLSelectQuery](#TODO) protocol, like the [query interface requests](../../../#requests):
|
||||
Build a `EXISTS(...)` expression from any value that adopts the [SQLSelectQuery](http://cocoadocs.org/docsets/GRDB.swift/0.85.0/Protocols/SQLSelectQuery.html) protocol, like the [query interface requests](../../../#requests):
|
||||
|
||||
```swift
|
||||
let request = Person.all()
|
||||
@@ -472,7 +472,7 @@ request.exists()
|
||||
|
||||
#### The COUNT Function
|
||||
|
||||
Build a `COUNT(...)` expression from the [count](#TODO) and [count(distinct:)](#TODO) functions:
|
||||
Build a `COUNT(...)` expression from the [count](http://cocoadocs.org/docsets/GRDB.swift/0.85.0/Functions.html) and [count(distinct:)](http://cocoadocs.org/docsets/GRDB.swift/0.85.0/Functions.html) functions:
|
||||
|
||||
```swift
|
||||
// SQLExpression: COUNT(email)
|
||||
@@ -563,4 +563,4 @@ You may want to compare it to another protocol, SQLSpecificExpressible, which ha
|
||||
|
||||
> :point_up: **Note**: whenever you extend GRDB with a Swift function, method, or operator, you should generally make sure that its signature contains at least one GRDB-specific type. In the `cast` function, it is Database.ColumnType.
|
||||
|
||||
**If SQLExpressionLiteral reveals too limited for your purpose**, you may have to implement a new type that adopts the [SQLExpression](#TODO) protocol.
|
||||
**If SQLExpressionLiteral reveals too limited for your purpose**, you may have to implement a new type that adopts the [SQLExpression](http://cocoadocs.org/docsets/GRDB.swift/0.85.0/Protocols/SQLExpression.html) protocol.
|
||||
Reference in new issue
Block a user