mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
Flag SQLExpressionFunction, SQLFunctionName, SQLExpressionUnary, SQLExpressionBinary, SQLExpressionFunction, QueryInterfaceRequest.exists() as experimental
This commit is contained in:
1 parent
19c273771d
commit
6629ec48a3
2 files changed
+15
-1
No files matched your search
@@ -208,6 +208,8 @@ Whenever you import a SQL feature to Swift, you'll have to decide: should you pr
|
||||
|
||||
### STRFTIME
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
The [STRFTIME](https://www.sqlite.org/lang_datefunc.html) SQL function accepts many arguments. We'll simplify it to `strftime(format, date)`, so that we can write:
|
||||
|
||||
```sql
|
||||
@@ -273,6 +275,8 @@ You may want to compare it to another protocol, SQLExpressible, which will be de
|
||||
|
||||
### GLOB
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
For the [GLOB](https://www.sqlite.org/lang_expr.html#like) operator, we want to define the glob Swift method:
|
||||
|
||||
```swift
|
||||
@@ -390,6 +394,8 @@ For an example of use, see the [Add a new kind of SQLite expression](#add-a-new-
|
||||
|
||||
#### SQLExpressionUnary
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
SQLExpressionUnary builds an expression by prefixing another expression with an unary operator:
|
||||
|
||||
```swift
|
||||
@@ -415,6 +421,8 @@ extension SQLUnaryOperator {
|
||||
|
||||
#### SQLExpressionBinary
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
SQLExpressionBinary builds an expression by joining two expressions with a binary operator:
|
||||
|
||||
```swift
|
||||
@@ -439,6 +447,8 @@ extension SQLBinaryOperator {
|
||||
|
||||
#### SQLExpressionFunction
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
SQLExpressionFunction builds an SQL function call:
|
||||
|
||||
```swift
|
||||
@@ -495,6 +505,8 @@ Build a `value BETWEEN min AND max` expression from Swift ranges:
|
||||
|
||||
#### The EXISTS Operator
|
||||
|
||||
[]((http://github.com/groue/GRDB.swift#what-are-experimental-features))
|
||||
|
||||
Build a `EXISTS(...)` expression from any value that adopts the [SQLSelectQuery](http://groue.github.io/GRDB.swift/docs/0.110.0/Protocols/SQLSelectQuery.html) protocol, like the [query interface requests](../../../#requests):
|
||||
|
||||
```swift
|
||||
|
||||
@@ -2938,7 +2938,9 @@ Feed [requests](#requests) with SQL expressions built from your Swift code:
|
||||
```
|
||||
|
||||
- `EXISTS (subquery)`, `NOT EXISTS (subquery)`
|
||||
|
||||
|
||||
[]((#what-are-experimental-features))
|
||||
|
||||
To check is a subquery would return any row, use the `exists` property on another request:
|
||||
|
||||
```swift
|
||||
|
||||
Reference in new issue
Block a user