1

My database has two tables with bijective row correspondence (as described in this question). It seems this means that to insert a row to each table without violating foreign key constraints requires the two inserts to occur within the same query.

In the Opaleye.Manipulation module I see functions such as runInsertMany, which insert into a single table. However, these return an IO action and not a query, and I do not see how to combine them into one. Nowhere in Opaleye do I see how to insert into two tables, or an insert Query possible of combining with another.

Can Opaleye insert into two different tables within the same query? How?

mherzl
  • 5,624
  • 6
  • 34
  • 75

1 Answers1

0

Can Opaleye insert into two different tables within the same query?

No, it can't. I didn't even know that was possible! If you email me (my contact details are in the README) then we can discuss your use case.

Tom Ellis
  • 9,224
  • 1
  • 29
  • 54