@@ -53,7 +53,7 @@ class ActionMacro(val c: MacroContext) extends ContextMacro with ReifyLiftings {
5353              (expanded.string, expanded.prepare, expanded.liftings) 
5454            }.groupBy(_._1).map { 
5555              case (string, items) => 
56-                  ${c.prefix}.BatchGroup(string, items.map(_._2).toList) 
56+                  ${c.prefix}.BatchGroup(string, items.map(_._2).toList, items.map(_._3).toList ) 
5757            }.toList, 
5858             $options
5959          )(io.getquill.context.ExecutionInfo.unknown, ()) 
@@ -142,11 +142,11 @@ class ActionMacro(val c: MacroContext) extends ContextMacro with ReifyLiftings {
142142              } else { 
143143                 $batch.toList.map(element => List(element)) 
144144              } 
145-             /* batchesSharded: List[(String, (Row, MirrorSession) => (List[Any], Row)  <a.k.a: prepare>)] */ 
145+             /* batchesSharded: List[(String, (Row, MirrorSession) => (List[Any], Row <a.k.a: prepare>), List[ScalarLift])  ] */ 
146146            val batchesSharded = batches.map { subBatch => { 
147147                /* `expanded` is io.getquill.context.ExpandWithInjectables(ast, subBatch, injectableLiftList) */ 
148148                val expanded =  $expanded
149-                 (expanded.string, expanded.prepare) 
149+                 (expanded.string, expanded.prepare, expanded.liftings ) 
150150              } 
151151            } 
152152            /* 
@@ -162,8 +162,8 @@ class ActionMacro(val c: MacroContext) extends ContextMacro with ReifyLiftings {
162162              (INSERT ... VALUES (? ?),         List(caboose)) 
163163            */ 
164164            batchesSharded.groupByOrdered(_._1).map { 
165-               case (string, items) => 
166-                  ${c.prefix}.BatchGroup(string, items.map(_._2).toList) 
165+               case (string, items, liftings ) => 
166+                  ${c.prefix}.BatchGroup(string, items.map(_._2).toList, items.map(_._3).toList ) 
167167            }.toList 
168168          })(io.getquill.context.ExecutionInfo.unknown, ()) 
169169         """ 
@@ -194,12 +194,12 @@ class ActionMacro(val c: MacroContext) extends ContextMacro with ReifyLiftings {
194194            val batchesSharded = batches.map { subBatch => { 
195195                /* `expanded` is io.getquill.context.ExpandWithInjectables(ast, subBatch, injectableLiftList) */ 
196196                val expanded =  $expanded
197-                 ((expanded.string,  $returningColumn), expanded.prepare) 
197+                 ((expanded.string,  $returningColumn), expanded.prepare, expanded.liftings ) 
198198              } 
199199            } 
200200            batchesSharded.groupByOrdered(_._1).map { 
201201              case ((string, column), items) => 
202-                  ${c.prefix}.BatchGroupReturning(string, column, items.map(_._2).toList) 
202+                  ${c.prefix}.BatchGroupReturning(string, column, items.map(_._2).toList, items.map(_._3).toList ) 
203203            }.toList 
204204          },  ${returningExtractor[T ]})(io.getquill.context.ExecutionInfo.unknown, ()) 
205205         """ 
0 commit comments