Skip to content

Commit a8fa63c

Browse files
committed
update reference
1 parent 065d9dc commit a8fa63c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/reference.md

+35
Original file line numberDiff line numberDiff line change
@@ -7061,6 +7061,41 @@ Select.insert.values(
70617061
70627062
70637063
7064+
## EscapedTableNameWithReturning
7065+
7066+
If your table name is a reserved sql world, e.g. `order`, you can specify this in your table definition with
7067+
`override def escape = true`
7068+
7069+
### EscapedTableNameWithReturning.insert with returning
7070+
7071+
7072+
7073+
```scala
7074+
Select.insert
7075+
.values(
7076+
Select[Sc](
7077+
id = 0,
7078+
name = "hello"
7079+
)
7080+
)
7081+
.returning(_.id)
7082+
```
7083+
7084+
7085+
*
7086+
```sql
7087+
INSERT INTO "select" (id, name) VALUES (?, ?) RETURNING "select".id AS res
7088+
```
7089+
7090+
7091+
7092+
*
7093+
```scala
7094+
Seq(0)
7095+
```
7096+
7097+
7098+
70647099
## SubQuery
70657100
Queries that explicitly use subqueries (e.g. for `JOIN`s) or require subqueries to preserve the Scala semantics of the various operators
70667101
### SubQuery.sortTakeJoin

0 commit comments

Comments
 (0)