You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having : url="jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH;INIT=RUNSCRIPT FROM 'classpath:h2-schema.sql'"
Upsert is supported by Postgres, SQLite, MySQL and H2 onConflictIgnore only (since v1.4.200 in PostgreSQL compatibility mode)
While using h2 datasource and table :
create table if not exists ErgoTree (
hash VARCHAR(64) NOT NULL PRIMARY KEY,
blockId VARCHAR(64) NOT NULL REFERENCES Block (blockId) ON DELETE CASCADE,
hex VARCHAR NOT NULL
);
zio.FiberFailure: Malformed batch entity: Foreach(
ScalarTag("478a148e-9ea3-4726-ba2b-8146a2a24cb5", Parser),
Id("ergoTree"),
OnConflict(
Insert(
Entity("ErgoTree", List()),
List(
Assignment(Id("_$V"), _$V.hash, ergoTree.hash),
Assignment(Id("_$V"), _$V.blockId, ergoTree.blockId),
Assignment(Id("_$V"), _$V.hex, ergoTree.hex)
)
),
NoTarget,
Ignore
)
). Batch insertion entities must have the form Insert(Entity, Nil: List[Assignment])
at io.getquill.context.QueryExecutionBatchDynamic$.rightOrException(QueryExecutionBatchDynamic.scala:183)
at io.getquill.context.QueryExecutionBatchDynamic$.extractPrimaryComponents(QueryExecutionBatchDynamic.scala:220)
at io.getquill.context.QueryExecutionBatchDynamic$.apply(QueryExecutionBatchDynamic.scala:120)
at org.ergoplatform.uexplorer.backend.boxes.PersistentBoxRepo.insertUtxos(PersistentBoxRepo.scala:42)
at org.ergoplatform.uexplorer.backend.boxes.BoxRepo$.insertUtxos$$anonfun$1(BoxRepo.scala:36)
at zio.ZIO$ServiceWithZIOPartiallyApplied$.apply$extension$$anonfun$13$$anonfun$1(ZIO.scala:5332)
at org.ergoplatform.uexplorer.backend.boxes.BoxRepo.insertUtxos(BoxRepo.scala:36)
at org.ergoplatform.uexplorer.backend.H2Backend.blockWriteFlow(H2Backend.scala:58)
at org.ergoplatform.uexplorer.backend.H2Backend.blockWriteFlow(H2Backend.scala:61)
at org.ergoplatform.uexplorer.backend.H2Backend.blockWriteFlow(H2Backend.scala:62)
Version:
4.6.0.1
Module:
quill-sql
Database:
h2 2.1.214
Actual behavior
Having :
url="jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH;INIT=RUNSCRIPT FROM 'classpath:h2-schema.sql'"
While using h2 datasource and table :
does the same error and
too,
onIgnoreUpdate
has the same issue. Simpleinsert
works, this is only an issue of batch insert.The text was updated successfully, but these errors were encountered: