File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -7061,6 +7061,41 @@ Select.insert.values(
7061
7061
7062
7062
7063
7063
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
+
7064
7099
## SubQuery
7065
7100
Queries that explicitly use subqueries (e.g. for `JOIN`s) or require subqueries to preserve the Scala semantics of the various operators
7066
7101
### SubQuery.sortTakeJoin
You can’t perform that action at this time.
0 commit comments