-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for onConflictIgnore to H2 (v1.4.200 in PostgreSQL mo…
…de) (#1731) - Doc updated with database actions return values
- Loading branch information
Showing
4 changed files
with
53 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
quill-sql/src/test/scala/io/getquill/context/sql/idiom/H2DialectSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.getquill.context.sql.idiom | ||
|
||
import io.getquill.{ H2Dialect, Literal, SqlMirrorContext, TestEntities } | ||
|
||
class H2DialectSpec extends OnConflictSpec { | ||
val ctx = new SqlMirrorContext(H2Dialect, Literal) with TestEntities | ||
import ctx._ | ||
"OnConflict" - { | ||
"no target - ignore" in { | ||
ctx.run(`no target - ignore`).string mustEqual | ||
"INSERT INTO TestEntity (s,i,l,o) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING" | ||
} | ||
"no target - ignore batch" in { | ||
ctx.run(`no target - ignore batch`).groups.foreach { | ||
_._1 mustEqual | ||
"INSERT INTO TestEntity (s,i,l,o) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters