Flag SQLExpressionFunction, SQLFunctionName, SQLExpressionUnary, SQLExpressionBinary, SQLExpressionFunction, QueryInterfaceRequest.exists() as experimental

This commit is contained in:
Gwendal Roué authored and Gwendal Roué committed 2017-06-20 07:54:19 +02:00
1 parent 19c273771d
commit 6629ec48a3
2 files changed
+15 -1

No files matched your search

+12
View File
@@ -208,6 +208,8 @@ Whenever you import a SQL feature to Swift, you'll have to decide: should you pr
### STRFTIME
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((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
+3 -1
View File
@@ -2938,7 +2938,9 @@ Feed [requests](#requests) with SQL expressions built from your Swift code:
```
- `EXISTS (subquery)`, `NOT EXISTS (subquery)`
[![Experimental](https://cdn.rawgit.com/groue/GRDB.swift/GRDB1/Documentation/images/experimental.svg)]((#what-are-experimental-features))
To check is a subquery would return any row, use the `exists` property on another request:
```swift