diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index 5f36be1a9b..3ae487f993 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -24,6 +24,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]])(implicit c: Connection): List[FootballClubRow] def selectById(id: FootballClubId)(implicit c: Connection): Option[FootballClubRow] def selectByIds(ids: Array[FootballClubId])(implicit c: Connection): List[FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow)(implicit c: Connection): Boolean def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]])(implicit c: Connection): Boolean diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 60e977e15b..2bd14cd484 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -86,6 +86,10 @@ class FootballClubRepoImpl extends FootballClubRepo { """.as(FootballClubRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 71f8bff4ac..b7992e2f8e 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -62,6 +62,10 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId])(implicit c: Connection): List[FootballClubRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index 8b3ec74044..e0bba672af 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -24,6 +24,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]])(implicit c: Connection): List[MaritalStatusRow] def selectById(id: MaritalStatusId)(implicit c: Connection): Option[MaritalStatusRow] def selectByIds(ids: Array[MaritalStatusId])(implicit c: Connection): List[MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow)(implicit c: Connection): MaritalStatusRow } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index a923295141..dff6872b15 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -84,6 +84,10 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { """.as(MaritalStatusRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 5e72c1fc1c..c0406474b2 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -61,6 +61,10 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId])(implicit c: Connection): List[MaritalStatusRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index b267a34353..f48279696c 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -27,6 +27,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]])(implicit c: Connection): List[PersonRow] def selectById(id: PersonId)(implicit c: Connection): Option[PersonRow] def selectByIds(ids: Array[PersonId])(implicit c: Connection): List[PersonRow] + def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow)(implicit c: Connection): Boolean def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]])(implicit c: Connection): Boolean diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 25ade2461e..8d37e96179 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -149,6 +149,10 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index cbe90502d9..55cf6e6455 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -84,6 +84,10 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId])(implicit c: Connection): List[PersonRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index 5f36be1a9b..3ae487f993 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -24,6 +24,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]])(implicit c: Connection): List[FootballClubRow] def selectById(id: FootballClubId)(implicit c: Connection): Option[FootballClubRow] def selectByIds(ids: Array[FootballClubId])(implicit c: Connection): List[FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow)(implicit c: Connection): Boolean def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]])(implicit c: Connection): Boolean diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 60e977e15b..2bd14cd484 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -86,6 +86,10 @@ class FootballClubRepoImpl extends FootballClubRepo { """.as(FootballClubRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 71f8bff4ac..b7992e2f8e 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -62,6 +62,10 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId])(implicit c: Connection): List[FootballClubRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index 8b3ec74044..e0bba672af 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -24,6 +24,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]])(implicit c: Connection): List[MaritalStatusRow] def selectById(id: MaritalStatusId)(implicit c: Connection): Option[MaritalStatusRow] def selectByIds(ids: Array[MaritalStatusId])(implicit c: Connection): List[MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow)(implicit c: Connection): MaritalStatusRow } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index a923295141..dff6872b15 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -84,6 +84,10 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { """.as(MaritalStatusRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 5e72c1fc1c..c0406474b2 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -61,6 +61,10 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId])(implicit c: Connection): List[MaritalStatusRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index b267a34353..f48279696c 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -27,6 +27,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]])(implicit c: Connection): List[PersonRow] def selectById(id: PersonId)(implicit c: Connection): Option[PersonRow] def selectByIds(ids: Array[PersonId])(implicit c: Connection): List[PersonRow] + def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow)(implicit c: Connection): Boolean def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]])(implicit c: Connection): Boolean diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 25ade2461e..8d37e96179 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -149,6 +149,10 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.rowParser) } diff --git a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index cbe90502d9..55cf6e6455 100644 --- a/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-anorm@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -84,6 +84,10 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId])(implicit c: Connection): List[PersonRow] = { ids.flatMap(map.get).toList } + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index a22fef51d2..a559773681 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -25,6 +25,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]]): Stream[ConnectionIO, FootballClubRow] def selectById(id: FootballClubId): ConnectionIO[Option[FootballClubRow]] def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow): ConnectionIO[Boolean] def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]]): ConnectionIO[Boolean] diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 7a15818e62..11d3f01e1f 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -63,6 +63,12 @@ class FootballClubRepoImpl extends FootballClubRepo { override def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] = { sql"""select "id", "name" from myschema.football_club where "id" = ANY(${ids})""".query(using FootballClubRow.read).stream } + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 64bbde2b67..da3ba40696 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -72,6 +72,12 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index 4da8442b55..6c25d0008d 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -25,6 +25,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]]): Stream[ConnectionIO, MaritalStatusRow] def selectById(id: MaritalStatusId): ConnectionIO[Option[MaritalStatusRow]] def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow): ConnectionIO[MaritalStatusRow] } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index e794bb9736..7b29f7a97b 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -59,6 +59,12 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { override def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] = { sql"""select "id" from myschema.marital_status where "id" = ANY(${ids})""".query(using MaritalStatusRow.read).stream } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 4a05474895..ce6d900b85 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -71,6 +71,12 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index 1bbd1285c6..d19c17e630 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -28,6 +28,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]]): Stream[ConnectionIO, PersonRow] def selectById(id: PersonId): ConnectionIO[Option[PersonRow]] def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] + def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ConnectionIO[Boolean] def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]]): ConnectionIO[Boolean] diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 720351c018..734a17e340 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -125,6 +125,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] = { sql"""select "id", "favourite_football_club_id", "name", "nick_name", "blog_url", "email", "phone", "likes_pizza", "marital_status_id", "work_email", "sector", "favorite_number" from myschema.person where "id" = ANY(${ids})""".query(using PersonRow.read).stream } + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index e4644b44a6..9ce2e3ec1f 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -98,6 +98,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index a22fef51d2..a559773681 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -25,6 +25,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]]): Stream[ConnectionIO, FootballClubRow] def selectById(id: FootballClubId): ConnectionIO[Option[FootballClubRow]] def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow): ConnectionIO[Boolean] def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]]): ConnectionIO[Boolean] diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 7a15818e62..11d3f01e1f 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -63,6 +63,12 @@ class FootballClubRepoImpl extends FootballClubRepo { override def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] = { sql"""select "id", "name" from myschema.football_club where "id" = ANY(${ids})""".query(using FootballClubRow.read).stream } + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 64bbde2b67..da3ba40696 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -72,6 +72,12 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId]): Stream[ConnectionIO, FootballClubRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index 4da8442b55..6c25d0008d 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -25,6 +25,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]]): Stream[ConnectionIO, MaritalStatusRow] def selectById(id: MaritalStatusId): ConnectionIO[Option[MaritalStatusRow]] def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow): ConnectionIO[MaritalStatusRow] } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index e794bb9736..7b29f7a97b 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -59,6 +59,12 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { override def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] = { sql"""select "id" from myschema.marital_status where "id" = ANY(${ids})""".query(using MaritalStatusRow.read).stream } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 4a05474895..ce6d900b85 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -71,6 +71,12 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId]): Stream[ConnectionIO, MaritalStatusRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index 1bbd1285c6..d19c17e630 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -28,6 +28,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]]): Stream[ConnectionIO, PersonRow] def selectById(id: PersonId): ConnectionIO[Option[PersonRow]] def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] + def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ConnectionIO[Boolean] def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]]): ConnectionIO[Boolean] diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 720351c018..734a17e340 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -125,6 +125,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] = { sql"""select "id", "favourite_football_club_id", "name", "nick_name", "blog_url", "email", "phone", "likes_pizza", "marital_status_id", "work_email", "sector", "favorite_number" from myschema.person where "id" = ANY(${ids})""".query(using PersonRow.read).stream } + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.read) } diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index e4644b44a6..9ce2e3ec1f 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -98,6 +98,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId]): Stream[ConnectionIO, PersonRow] = { Stream.emits(ids.flatMap(map.get).toList) } + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index 29594f4b7e..b32256f1c6 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -27,6 +27,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, FootballClubRow] def selectById(id: FootballClubId): ZIO[ZConnection, Throwable, Option[FootballClubRow]] def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow): ZIO[ZConnection, Throwable, Boolean] def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]]): ZIO[ZConnection, Throwable, Boolean] diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 09ec88ec8b..09552547e6 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -67,6 +67,12 @@ class FootballClubRepoImpl extends FootballClubRepo { override def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] = { sql"""select "id", "name" from myschema.football_club where "id" = ANY(${Segment.paramSegment(ids)(FootballClubId.arraySetter)})""".query(using FootballClubRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 1da7e2f360..ae204ce8e5 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -73,6 +73,12 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index e2cd7b9784..f570355762 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -27,6 +27,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, MaritalStatusRow] def selectById(id: MaritalStatusId): ZIO[ZConnection, Throwable, Option[MaritalStatusRow]] def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow): ZIO[ZConnection, Throwable, UpdateResult[MaritalStatusRow]] } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index 4d4344ce50..06cc3af2e2 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -64,6 +64,12 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { override def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] = { sql"""select "id" from myschema.marital_status where "id" = ANY(${Segment.paramSegment(ids)(MaritalStatusId.arraySetter)})""".query(using MaritalStatusRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 76e1125aac..1ae4671ccf 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -72,6 +72,12 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index 77c968f437..e73f98aa8e 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -30,6 +30,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, PersonRow] def selectById(id: PersonId): ZIO[ZConnection, Throwable, Option[PersonRow]] def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] + def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ZIO[ZConnection, Throwable, Boolean] def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]]): ZIO[ZConnection, Throwable, Boolean] diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 04e14dc08a..1734c9eb69 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -126,6 +126,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] = { sql"""select "id", "favourite_football_club_id", "name", "nick_name", "blog_url", "email", "phone", "likes_pizza", "marital_status_id", "work_email", "sector", "favorite_number" from myschema.person where "id" = ANY(${Segment.paramSegment(ids)(PersonId.arraySetter)})""".query(using PersonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index a998a415c3..1851e70f40 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -97,6 +97,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala index 29594f4b7e..b32256f1c6 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepo.scala @@ -27,6 +27,7 @@ trait FootballClubRepo { def selectByFieldValues(fieldValues: List[FootballClubFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, FootballClubRow] def selectById(id: FootballClubId): ZIO[ZConnection, Throwable, Option[FootballClubRow]] def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] + def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] def update: UpdateBuilder[FootballClubFields, FootballClubRow] def update(row: FootballClubRow): ZIO[ZConnection, Throwable, Boolean] def updateFieldValues(id: FootballClubId, fieldValues: List[FootballClubFieldValue[?]]): ZIO[ZConnection, Throwable, Boolean] diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala index 09ec88ec8b..09552547e6 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoImpl.scala @@ -67,6 +67,12 @@ class FootballClubRepoImpl extends FootballClubRepo { override def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] = { sql"""select "id", "name" from myschema.football_club where "id" = ANY(${Segment.paramSegment(ids)(FootballClubId.arraySetter)})""".query(using FootballClubRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilder("myschema.football_club", FootballClubFields.structure, FootballClubRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala index 1da7e2f360..ae204ce8e5 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/football_club/FootballClubRepoMock.scala @@ -73,6 +73,12 @@ class FootballClubRepoMock(map: scala.collection.mutable.Map[FootballClubId, Foo override def selectByIds(ids: Array[FootballClubId]): ZStream[ZConnection, Throwable, FootballClubRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, Option[FootballClubRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { UpdateBuilderMock(UpdateParams.empty, FootballClubFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala index e2cd7b9784..f570355762 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepo.scala @@ -27,6 +27,7 @@ trait MaritalStatusRepo { def selectByFieldValues(fieldValues: List[MaritalStatusFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, MaritalStatusRow] def selectById(id: MaritalStatusId): ZIO[ZConnection, Throwable, Option[MaritalStatusRow]] def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] + def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] def upsert(unsaved: MaritalStatusRow): ZIO[ZConnection, Throwable, UpdateResult[MaritalStatusRow]] } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala index 4d4344ce50..06cc3af2e2 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoImpl.scala @@ -64,6 +64,12 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { override def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] = { sql"""select "id" from myschema.marital_status where "id" = ANY(${Segment.paramSegment(ids)(MaritalStatusId.arraySetter)})""".query(using MaritalStatusRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilder("myschema.marital_status", MaritalStatusFields.structure, MaritalStatusRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala index 76e1125aac..1ae4671ccf 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/marital_status/MaritalStatusRepoMock.scala @@ -72,6 +72,12 @@ class MaritalStatusRepoMock(map: scala.collection.mutable.Map[MaritalStatusId, M override def selectByIds(ids: Array[MaritalStatusId]): ZStream[ZConnection, Throwable, MaritalStatusRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, Option[MaritalStatusRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { UpdateBuilderMock(UpdateParams.empty, MaritalStatusFields.structure.fields, map) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala index 77c968f437..e73f98aa8e 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepo.scala @@ -30,6 +30,7 @@ trait PersonRepo { def selectByFieldValues(fieldValues: List[PersonFieldOrIdValue[?]]): ZStream[ZConnection, Throwable, PersonRow] def selectById(id: PersonId): ZIO[ZConnection, Throwable, Option[PersonRow]] def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] + def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ZIO[ZConnection, Throwable, Boolean] def updateFieldValues(id: PersonId, fieldValues: List[PersonFieldValue[?]]): ZIO[ZConnection, Throwable, Boolean] diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index 04e14dc08a..1734c9eb69 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -126,6 +126,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] = { sql"""select "id", "favourite_football_club_id", "name", "nick_name", "blog_url", "email", "phone", "likes_pizza", "marital_status_id", "work_email", "sector", "favorite_number" from myschema.person where "id" = ANY(${Segment.paramSegment(ids)(PersonId.arraySetter)})""".query(using PersonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("myschema.person", PersonFields.structure, PersonRow.jdbcDecoder) } diff --git a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala index a998a415c3..1851e70f40 100644 --- a/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala +++ b/.bleep/generated-sources/typo-tester-zio-jdbc@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoMock.scala @@ -97,6 +97,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(ids: Array[PersonId]): ZStream[ZConnection, Throwable, PersonRow] = { ZStream.fromIterable(ids.flatMap(map.get)) } + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, Option[PersonRow]]] = { + selectByIds(ids).runCollect.map { rows => + val byId = rows.view.map(x => (x.id, x)).toMap + ids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/site-in/other-features/testing-with-stubs.md b/site-in/other-features/testing-with-stubs.md index 2a608cd82b..8b9b638ae1 100644 --- a/site-in/other-features/testing-with-stubs.md +++ b/site-in/other-features/testing-with-stubs.md @@ -87,6 +87,10 @@ class AddressRepoMock(toRow: Function1[AddressRowUnsaved, AddressRow], override def selectByIds(addressids: Array[AddressId])(implicit c: Connection): List[AddressRow] = { addressids.flatMap(map.get).toList } + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] = { + val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilderMock(UpdateParams.empty, AddressFields.structure.fields, map) } diff --git a/site-in/what-is/relations.md b/site-in/what-is/relations.md index 3ec3d981af..e0af8acb5d 100644 --- a/site-in/what-is/relations.md +++ b/site-in/what-is/relations.md @@ -67,13 +67,17 @@ making it easy to understand the purpose of every column. ```scala mdoc -import adventureworks.customtypes.TypoLocalDateTime +import adventureworks.customtypes.* import adventureworks.person.address.AddressId import adventureworks.person.stateprovince.StateprovinceId import java.util.UUID +/** Table: person.address + Street address information for customers, employees, and vendors. + Primary key: addressid */ case class AddressRow( - /** Primary key for Address records. */ + /** Primary key for Address records. + Default: nextval('person.address_addressid_seq'::regclass) */ addressid: AddressId, /** First street address line. */ addressline1: /* max 60 chars */ String, @@ -87,8 +91,10 @@ case class AddressRow( /** Postal code for the street address. */ postalcode: /* max 15 chars */ String, /** Latitude and longitude of this address. */ - spatiallocation: Option[Array[Byte]], - rowguid: UUID, + spatiallocation: Option[TypoBytea], + /** Default: uuid_generate_v1() */ + rowguid: TypoUUID, + /** Default: now() */ modifieddate: TypoLocalDateTime ) ``` @@ -104,18 +110,24 @@ import java.sql.Connection import typo.dsl.{DeleteBuilder, SelectBuilder, UpdateBuilder} trait AddressRepo { - def delete(addressid: AddressId)(implicit c: Connection): Boolean def delete: DeleteBuilder[AddressFields, AddressRow] + def deleteById(addressid: AddressId)(implicit c: Connection): Boolean + def deleteByIds(addressids: Array[AddressId])(implicit c: Connection): Int def insert(unsaved: AddressRow)(implicit c: Connection): AddressRow def insert(unsaved: AddressRowUnsaved)(implicit c: Connection): AddressRow + def insertStreaming(unsaved: Iterator[AddressRow], batchSize: Int)(implicit c: Connection): Long + /* NOTE: this functionality requires PostgreSQL 16 or later! */ + def insertUnsavedStreaming(unsaved: Iterator[AddressRowUnsaved], batchSize: Int)(implicit c: Connection): Long def select: SelectBuilder[AddressFields, AddressRow] def selectAll(implicit c: Connection): List[AddressRow] def selectById(addressid: AddressId)(implicit c: Connection): Option[AddressRow] def selectByIds(addressids: Array[AddressId])(implicit c: Connection): List[AddressRow] - def update(row: AddressRow)(implicit c: Connection): Boolean + def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] def update: UpdateBuilder[AddressFields, AddressRow] + def update(row: AddressRow)(implicit c: Connection): Boolean def upsert(unsaved: AddressRow)(implicit c: Connection): AddressRow } + ``` ### Simplified Insertion @@ -126,6 +138,7 @@ without the need for complex code. A special structure is provided for creating ```scala mdoc import adventureworks.customtypes.Defaulted + /** This class corresponds to a row in table `person.address` which has not been persisted yet */ case class AddressRowUnsaved( /** First street address line. */ @@ -140,15 +153,15 @@ case class AddressRowUnsaved( /** Postal code for the street address. */ postalcode: /* max 15 chars */ String, /** Latitude and longitude of this address. */ - spatiallocation: Option[Array[Byte]], + spatiallocation: Option[TypoBytea], /** Default: nextval('person.address_addressid_seq'::regclass) Primary key for Address records. */ addressid: Defaulted[AddressId] = Defaulted.UseDefault, /** Default: uuid_generate_v1() */ - rowguid: Defaulted[UUID] = Defaulted.UseDefault, + rowguid: Defaulted[TypoUUID] = Defaulted.UseDefault, /** Default: now() */ modifieddate: Defaulted[TypoLocalDateTime] = Defaulted.UseDefault -) +) ``` ### Readonly repositories @@ -206,24 +219,27 @@ import adventureworks.customtypes.TypoXml import adventureworks.person.businessentity.BusinessentityId import adventureworks.public.Name import adventureworks.public.Phone +import adventureworks.userdefined.FirstName +/** View: humanresources.vemployee */ case class VemployeeViewRow( - /** Points to [[person.person.PersonRow.businessentityid]] */ + /** Points to [[employee.EmployeeRow.businessentityid]] */ businessentityid: BusinessentityId, /** Points to [[person.person.PersonRow.title]] */ - title: /* max 8 chars */ String, + title: Option[/* max 8 chars */ String], /** Points to [[person.person.PersonRow.firstname]] */ - firstname: Name, + firstname: /* user-picked */ FirstName, /** Points to [[person.person.PersonRow.middlename]] */ - middlename: Name, + middlename: Option[Name], /** Points to [[person.person.PersonRow.lastname]] */ lastname: Name, /** Points to [[person.person.PersonRow.suffix]] */ - suffix: /* max 10 chars */ String, + suffix: Option[/* max 10 chars */ String], /** Points to [[employee.EmployeeRow.jobtitle]] */ jobtitle: /* max 50 chars */ String, /** Points to [[person.personphone.PersonphoneRow.phonenumber]] */ phonenumber: Option[Phone], + /** Points to [[person.phonenumbertype.PhonenumbertypeRow.name]] */ phonenumbertype: Option[Name], /** Points to [[person.emailaddress.EmailaddressRow.emailaddress]] */ emailaddress: Option[/* max 50 chars */ String], @@ -232,15 +248,17 @@ case class VemployeeViewRow( /** Points to [[person.address.AddressRow.addressline1]] */ addressline1: /* max 60 chars */ String, /** Points to [[person.address.AddressRow.addressline2]] */ - addressline2: /* max 60 chars */ String, + addressline2: Option[/* max 60 chars */ String], /** Points to [[person.address.AddressRow.city]] */ city: /* max 30 chars */ String, + /** Points to [[person.stateprovince.StateprovinceRow.name]] */ stateprovincename: Name, /** Points to [[person.address.AddressRow.postalcode]] */ postalcode: /* max 15 chars */ String, + /** Points to [[person.countryregion.CountryregionRow.name]] */ countryregionname: Name, /** Points to [[person.person.PersonRow.additionalcontactinfo]] */ - additionalcontactinfo: TypoXml + additionalcontactinfo: Option[TypoXml] ) ``` diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala index 75fd1a19dc..e247f5c488 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala @@ -25,6 +25,7 @@ trait DepartmentRepo { def selectAll(implicit c: Connection): List[DepartmentRow] def selectById(departmentid: DepartmentId)(implicit c: Connection): Option[DepartmentRow] def selectByIds(departmentids: Array[DepartmentId])(implicit c: Connection): List[DepartmentRow] + def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, Option[DepartmentRow]] def update: UpdateBuilder[DepartmentFields, DepartmentRow] def update(row: DepartmentRow)(implicit c: Connection): Boolean def upsert(unsaved: DepartmentRow)(implicit c: Connection): DepartmentRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala index e978db40d7..b7a87a2ea1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala @@ -102,6 +102,10 @@ class DepartmentRepoImpl extends DepartmentRepo { """.as(DepartmentRow.rowParser(1).*) } + override def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, Option[DepartmentRow]] = { + val byId = selectByIds(departmentids).view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilder("humanresources.department", DepartmentFields.structure, DepartmentRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala index 2bd995e19b..246f8a08c0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala @@ -67,6 +67,10 @@ class DepartmentRepoMock(toRow: Function1[DepartmentRowUnsaved, DepartmentRow], override def selectByIds(departmentids: Array[DepartmentId])(implicit c: Connection): List[DepartmentRow] = { departmentids.flatMap(map.get).toList } + override def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, Option[DepartmentRow]] = { + val byId = selectByIds(departmentids).view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilderMock(UpdateParams.empty, DepartmentFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala index 6337c90b3d..1f1a1d0238 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala @@ -26,6 +26,7 @@ trait EmployeeRepo { def selectAll(implicit c: Connection): List[EmployeeRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[EmployeeRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[EmployeeRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[EmployeeRow]] def update: UpdateBuilder[EmployeeFields, EmployeeRow] def update(row: EmployeeRow)(implicit c: Connection): Boolean def upsert(unsaved: EmployeeRow)(implicit c: Connection): EmployeeRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala index da6cccfacd..900193e6e3 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala @@ -134,6 +134,10 @@ class EmployeeRepoImpl extends EmployeeRepo { """.as(EmployeeRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[EmployeeRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilder("humanresources.employee", EmployeeFields.structure, EmployeeRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala index 82f3d3d893..0a47c26b2d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala @@ -68,6 +68,10 @@ class EmployeeRepoMock(toRow: Function1[EmployeeRowUnsaved, EmployeeRow], override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[EmployeeRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[EmployeeRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeeFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala index cd6e1c9cda..113f7e0c0d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala @@ -25,6 +25,7 @@ trait EmployeedepartmenthistoryRepo { def selectAll(implicit c: Connection): List[EmployeedepartmenthistoryRow] def selectById(compositeId: EmployeedepartmenthistoryId)(implicit c: Connection): Option[EmployeedepartmenthistoryRow] def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): List[EmployeedepartmenthistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]] def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] def update(row: EmployeedepartmenthistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: EmployeedepartmenthistoryRow)(implicit c: Connection): EmployeedepartmenthistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala index 007aa42a8a..2b5cffa67e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala @@ -115,6 +115,10 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.as(EmployeedepartmenthistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilder("humanresources.employeedepartmenthistory", EmployeedepartmenthistoryFields.structure, EmployeedepartmenthistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala index c8a3c41874..3a889216f8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala @@ -67,6 +67,10 @@ class EmployeedepartmenthistoryRepoMock(toRow: Function1[Employeedepartmenthisto override def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): List[EmployeedepartmenthistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeedepartmenthistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala index 625e75874b..72649f5a2e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala @@ -25,6 +25,7 @@ trait EmployeepayhistoryRepo { def selectAll(implicit c: Connection): List[EmployeepayhistoryRow] def selectById(compositeId: EmployeepayhistoryId)(implicit c: Connection): Option[EmployeepayhistoryRow] def selectByIds(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): List[EmployeepayhistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]] def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] def update(row: EmployeepayhistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: EmployeepayhistoryRow)(implicit c: Connection): EmployeepayhistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala index a22939753d..6a7f509ab8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala @@ -108,6 +108,10 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.as(EmployeepayhistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilder("humanresources.employeepayhistory", EmployeepayhistoryFields.structure, EmployeepayhistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala index 20bd09e346..d6b4cbf208 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala @@ -67,6 +67,10 @@ class EmployeepayhistoryRepoMock(toRow: Function1[EmployeepayhistoryRowUnsaved, override def selectByIds(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): List[EmployeepayhistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeepayhistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala index 960dbf30e7..a12570374a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala @@ -25,6 +25,7 @@ trait JobcandidateRepo { def selectAll(implicit c: Connection): List[JobcandidateRow] def selectById(jobcandidateid: JobcandidateId)(implicit c: Connection): Option[JobcandidateRow] def selectByIds(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): List[JobcandidateRow] + def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, Option[JobcandidateRow]] def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] def update(row: JobcandidateRow)(implicit c: Connection): Boolean def upsert(unsaved: JobcandidateRow)(implicit c: Connection): JobcandidateRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala index 26e07109d9..81ddb60728 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala @@ -104,6 +104,10 @@ class JobcandidateRepoImpl extends JobcandidateRepo { """.as(JobcandidateRow.rowParser(1).*) } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, Option[JobcandidateRow]] = { + val byId = selectByIds(jobcandidateids).view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilder("humanresources.jobcandidate", JobcandidateFields.structure, JobcandidateRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala index 534e56bc14..6893420579 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala @@ -67,6 +67,10 @@ class JobcandidateRepoMock(toRow: Function1[JobcandidateRowUnsaved, Jobcandidate override def selectByIds(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): List[JobcandidateRow] = { jobcandidateids.flatMap(map.get).toList } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, Option[JobcandidateRow]] = { + val byId = selectByIds(jobcandidateids).view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilderMock(UpdateParams.empty, JobcandidateFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala index dac9665e3e..ba68d9648f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala @@ -25,6 +25,7 @@ trait ShiftRepo { def selectAll(implicit c: Connection): List[ShiftRow] def selectById(shiftid: ShiftId)(implicit c: Connection): Option[ShiftRow] def selectByIds(shiftids: Array[ShiftId])(implicit c: Connection): List[ShiftRow] + def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, Option[ShiftRow]] def update: UpdateBuilder[ShiftFields, ShiftRow] def update(row: ShiftRow)(implicit c: Connection): Boolean def upsert(unsaved: ShiftRow)(implicit c: Connection): ShiftRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala index 5c8e7c1ffe..5d7378977e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala @@ -104,6 +104,10 @@ class ShiftRepoImpl extends ShiftRepo { """.as(ShiftRow.rowParser(1).*) } + override def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, Option[ShiftRow]] = { + val byId = selectByIds(shiftids).view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilder("humanresources.shift", ShiftFields.structure, ShiftRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala index 103334f2a6..55b9e8f743 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala @@ -67,6 +67,10 @@ class ShiftRepoMock(toRow: Function1[ShiftRowUnsaved, ShiftRow], override def selectByIds(shiftids: Array[ShiftId])(implicit c: Connection): List[ShiftRow] = { shiftids.flatMap(map.get).toList } + override def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, Option[ShiftRow]] = { + val byId = selectByIds(shiftids).view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilderMock(UpdateParams.empty, ShiftFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala index 668df0ad7f..d46be57a24 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala @@ -25,6 +25,7 @@ trait AddressRepo { def selectAll(implicit c: Connection): List[AddressRow] def selectById(addressid: AddressId)(implicit c: Connection): Option[AddressRow] def selectByIds(addressids: Array[AddressId])(implicit c: Connection): List[AddressRow] + def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] def update: UpdateBuilder[AddressFields, AddressRow] def update(row: AddressRow)(implicit c: Connection): Boolean def upsert(unsaved: AddressRow)(implicit c: Connection): AddressRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala index 40cec67f4a..a744274fa4 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala @@ -114,6 +114,10 @@ class AddressRepoImpl extends AddressRepo { """.as(AddressRow.rowParser(1).*) } + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] = { + val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilder("person.address", AddressFields.structure, AddressRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala index d791730638..3aa0f7c54b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala @@ -67,6 +67,10 @@ class AddressRepoMock(toRow: Function1[AddressRowUnsaved, AddressRow], override def selectByIds(addressids: Array[AddressId])(implicit c: Connection): List[AddressRow] = { addressids.flatMap(map.get).toList } + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] = { + val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilderMock(UpdateParams.empty, AddressFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala index 74e0bde336..639b0c8cf0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala @@ -25,6 +25,7 @@ trait AddresstypeRepo { def selectAll(implicit c: Connection): List[AddresstypeRow] def selectById(addresstypeid: AddresstypeId)(implicit c: Connection): Option[AddresstypeRow] def selectByIds(addresstypeids: Array[AddresstypeId])(implicit c: Connection): List[AddresstypeRow] + def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, Option[AddresstypeRow]] def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] def update(row: AddresstypeRow)(implicit c: Connection): Boolean def upsert(unsaved: AddresstypeRow)(implicit c: Connection): AddresstypeRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala index 2a0797038e..1fc6949f59 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala @@ -106,6 +106,10 @@ class AddresstypeRepoImpl extends AddresstypeRepo { """.as(AddresstypeRow.rowParser(1).*) } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, Option[AddresstypeRow]] = { + val byId = selectByIds(addresstypeids).view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilder("person.addresstype", AddresstypeFields.structure, AddresstypeRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala index 560d135125..e5a21f6d9b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala @@ -67,6 +67,10 @@ class AddresstypeRepoMock(toRow: Function1[AddresstypeRowUnsaved, AddresstypeRow override def selectByIds(addresstypeids: Array[AddresstypeId])(implicit c: Connection): List[AddresstypeRow] = { addresstypeids.flatMap(map.get).toList } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, Option[AddresstypeRow]] = { + val byId = selectByIds(addresstypeids).view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilderMock(UpdateParams.empty, AddresstypeFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala index 1fa69acc33..9f52cca3a6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala @@ -25,6 +25,7 @@ trait BusinessentityRepo { def selectAll(implicit c: Connection): List[BusinessentityRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[BusinessentityRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[BusinessentityRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[BusinessentityRow]] def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] def update(row: BusinessentityRow)(implicit c: Connection): Boolean def upsert(unsaved: BusinessentityRow)(implicit c: Connection): BusinessentityRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala index 1293d994e1..a22152d5e0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala @@ -104,6 +104,10 @@ class BusinessentityRepoImpl extends BusinessentityRepo { """.as(BusinessentityRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[BusinessentityRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilder("person.businessentity", BusinessentityFields.structure, BusinessentityRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala index f52885d642..e71d92c69a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala @@ -67,6 +67,10 @@ class BusinessentityRepoMock(toRow: Function1[BusinessentityRowUnsaved, Business override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[BusinessentityRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[BusinessentityRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala index b29e28ca0c..8c1d5f4746 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala @@ -25,6 +25,7 @@ trait BusinessentityaddressRepo { def selectAll(implicit c: Connection): List[BusinessentityaddressRow] def selectById(compositeId: BusinessentityaddressId)(implicit c: Connection): Option[BusinessentityaddressRow] def selectByIds(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): List[BusinessentityaddressRow] + def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, Option[BusinessentityaddressRow]] def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] def update(row: BusinessentityaddressRow)(implicit c: Connection): Boolean def upsert(unsaved: BusinessentityaddressRow)(implicit c: Connection): BusinessentityaddressRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala index 5c88bdf39c..3712df9520 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala @@ -114,6 +114,10 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.as(BusinessentityaddressRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, Option[BusinessentityaddressRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilder("person.businessentityaddress", BusinessentityaddressFields.structure, BusinessentityaddressRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala index f15ff61b51..48b5199159 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala @@ -67,6 +67,10 @@ class BusinessentityaddressRepoMock(toRow: Function1[BusinessentityaddressRowUns override def selectByIds(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): List[BusinessentityaddressRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, Option[BusinessentityaddressRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityaddressFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala index 2ca60bef33..a4bb089494 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala @@ -25,6 +25,7 @@ trait BusinessentitycontactRepo { def selectAll(implicit c: Connection): List[BusinessentitycontactRow] def selectById(compositeId: BusinessentitycontactId)(implicit c: Connection): Option[BusinessentitycontactRow] def selectByIds(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): List[BusinessentitycontactRow] + def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, Option[BusinessentitycontactRow]] def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] def update(row: BusinessentitycontactRow)(implicit c: Connection): Boolean def upsert(unsaved: BusinessentitycontactRow)(implicit c: Connection): BusinessentitycontactRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala index c246761325..e4e0088274 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala @@ -113,6 +113,10 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.as(BusinessentitycontactRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, Option[BusinessentitycontactRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilder("person.businessentitycontact", BusinessentitycontactFields.structure, BusinessentitycontactRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala index 9fbd992239..ce876528eb 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala @@ -67,6 +67,10 @@ class BusinessentitycontactRepoMock(toRow: Function1[BusinessentitycontactRowUns override def selectByIds(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): List[BusinessentitycontactRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, Option[BusinessentitycontactRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentitycontactFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala index 7976ba4790..38b106d8db 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala @@ -25,6 +25,7 @@ trait ContacttypeRepo { def selectAll(implicit c: Connection): List[ContacttypeRow] def selectById(contacttypeid: ContacttypeId)(implicit c: Connection): Option[ContacttypeRow] def selectByIds(contacttypeids: Array[ContacttypeId])(implicit c: Connection): List[ContacttypeRow] + def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, Option[ContacttypeRow]] def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] def update(row: ContacttypeRow)(implicit c: Connection): Boolean def upsert(unsaved: ContacttypeRow)(implicit c: Connection): ContacttypeRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala index bb1584a583..941da3cb8a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala @@ -101,6 +101,10 @@ class ContacttypeRepoImpl extends ContacttypeRepo { """.as(ContacttypeRow.rowParser(1).*) } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, Option[ContacttypeRow]] = { + val byId = selectByIds(contacttypeids).view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilder("person.contacttype", ContacttypeFields.structure, ContacttypeRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala index dabeec4a3d..3d89b1dba6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala @@ -67,6 +67,10 @@ class ContacttypeRepoMock(toRow: Function1[ContacttypeRowUnsaved, ContacttypeRow override def selectByIds(contacttypeids: Array[ContacttypeId])(implicit c: Connection): List[ContacttypeRow] = { contacttypeids.flatMap(map.get).toList } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, Option[ContacttypeRow]] = { + val byId = selectByIds(contacttypeids).view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilderMock(UpdateParams.empty, ContacttypeFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala index 15d26e0e8f..7281e9c87b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala @@ -25,6 +25,7 @@ trait CountryregionRepo { def selectAll(implicit c: Connection): List[CountryregionRow] def selectById(countryregioncode: CountryregionId)(implicit c: Connection): Option[CountryregionRow] def selectByIds(countryregioncodes: Array[CountryregionId])(implicit c: Connection): List[CountryregionRow] + def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, Option[CountryregionRow]] def update: UpdateBuilder[CountryregionFields, CountryregionRow] def update(row: CountryregionRow)(implicit c: Connection): Boolean def upsert(unsaved: CountryregionRow)(implicit c: Connection): CountryregionRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala index 90313232c8..526c724f2d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala @@ -98,6 +98,10 @@ class CountryregionRepoImpl extends CountryregionRepo { """.as(CountryregionRow.rowParser(1).*) } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, Option[CountryregionRow]] = { + val byId = selectByIds(countryregioncodes).view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilder("person.countryregion", CountryregionFields.structure, CountryregionRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala index 9353ee4f34..269b26a3cf 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala @@ -67,6 +67,10 @@ class CountryregionRepoMock(toRow: Function1[CountryregionRowUnsaved, Countryreg override def selectByIds(countryregioncodes: Array[CountryregionId])(implicit c: Connection): List[CountryregionRow] = { countryregioncodes.flatMap(map.get).toList } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, Option[CountryregionRow]] = { + val byId = selectByIds(countryregioncodes).view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregionFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala index 4ad5f42091..26b64ed5cd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala @@ -25,6 +25,7 @@ trait EmailaddressRepo { def selectAll(implicit c: Connection): List[EmailaddressRow] def selectById(compositeId: EmailaddressId)(implicit c: Connection): Option[EmailaddressRow] def selectByIds(compositeIds: Array[EmailaddressId])(implicit c: Connection): List[EmailaddressRow] + def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, Option[EmailaddressRow]] def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] def update(row: EmailaddressRow)(implicit c: Connection): Boolean def upsert(unsaved: EmailaddressRow)(implicit c: Connection): EmailaddressRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala index e06613e67d..54458b20e0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala @@ -115,6 +115,10 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.as(EmailaddressRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, Option[EmailaddressRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilder("person.emailaddress", EmailaddressFields.structure, EmailaddressRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala index 261fa25973..8d6d8ee070 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala @@ -67,6 +67,10 @@ class EmailaddressRepoMock(toRow: Function1[EmailaddressRowUnsaved, Emailaddress override def selectByIds(compositeIds: Array[EmailaddressId])(implicit c: Connection): List[EmailaddressRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, Option[EmailaddressRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilderMock(UpdateParams.empty, EmailaddressFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala index 259f5037bd..3f435b2312 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala @@ -26,6 +26,7 @@ trait PasswordRepo { def selectAll(implicit c: Connection): List[PasswordRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[PasswordRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[PasswordRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PasswordRow]] def update: UpdateBuilder[PasswordFields, PasswordRow] def update(row: PasswordRow)(implicit c: Connection): Boolean def upsert(unsaved: PasswordRow)(implicit c: Connection): PasswordRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala index 3cc2ea7759..d42729adad 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala @@ -105,6 +105,10 @@ class PasswordRepoImpl extends PasswordRepo { """.as(PasswordRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PasswordRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilder("person.password", PasswordFields.structure, PasswordRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala index 678d5ca3e2..9240d65590 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala @@ -68,6 +68,10 @@ class PasswordRepoMock(toRow: Function1[PasswordRowUnsaved, PasswordRow], override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[PasswordRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PasswordRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilderMock(UpdateParams.empty, PasswordFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala index 304ecb556a..9bc7385c57 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala @@ -26,6 +26,7 @@ trait PersonRepo { def selectAll(implicit c: Connection): List[PersonRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[PersonRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[PersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PersonRow]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow)(implicit c: Connection): Boolean def upsert(unsaved: PersonRow)(implicit c: Connection): PersonRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala index 8b234ef36a..93596a2584 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala @@ -124,6 +124,10 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PersonRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("person.person", PersonFields.structure, PersonRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala index d8e81d3a8a..a2bd3164e6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala @@ -68,6 +68,10 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[PersonRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PersonRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala index bf4a8e97a7..5a1f82dc25 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala @@ -25,6 +25,7 @@ trait PersonphoneRepo { def selectAll(implicit c: Connection): List[PersonphoneRow] def selectById(compositeId: PersonphoneId)(implicit c: Connection): Option[PersonphoneRow] def selectByIds(compositeIds: Array[PersonphoneId])(implicit c: Connection): List[PersonphoneRow] + def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, Option[PersonphoneRow]] def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] def update(row: PersonphoneRow)(implicit c: Connection): Boolean def upsert(unsaved: PersonphoneRow)(implicit c: Connection): PersonphoneRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala index ec99ccf1d1..3a9e85a675 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala @@ -109,6 +109,10 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.as(PersonphoneRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, Option[PersonphoneRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilder("person.personphone", PersonphoneFields.structure, PersonphoneRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala index 6f5da83d94..fb59573c87 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala @@ -67,6 +67,10 @@ class PersonphoneRepoMock(toRow: Function1[PersonphoneRowUnsaved, PersonphoneRow override def selectByIds(compositeIds: Array[PersonphoneId])(implicit c: Connection): List[PersonphoneRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, Option[PersonphoneRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilderMock(UpdateParams.empty, PersonphoneFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala index 7ff16917a3..43d83e6572 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala @@ -25,6 +25,7 @@ trait PhonenumbertypeRepo { def selectAll(implicit c: Connection): List[PhonenumbertypeRow] def selectById(phonenumbertypeid: PhonenumbertypeId)(implicit c: Connection): Option[PhonenumbertypeRow] def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): List[PhonenumbertypeRow] + def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, Option[PhonenumbertypeRow]] def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] def update(row: PhonenumbertypeRow)(implicit c: Connection): Boolean def upsert(unsaved: PhonenumbertypeRow)(implicit c: Connection): PhonenumbertypeRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala index caed51e1af..9cad1c6b9c 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala @@ -101,6 +101,10 @@ class PhonenumbertypeRepoImpl extends PhonenumbertypeRepo { """.as(PhonenumbertypeRow.rowParser(1).*) } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, Option[PhonenumbertypeRow]] = { + val byId = selectByIds(phonenumbertypeids).view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilder("person.phonenumbertype", PhonenumbertypeFields.structure, PhonenumbertypeRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala index 138e17248d..d3a52e7607 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala @@ -67,6 +67,10 @@ class PhonenumbertypeRepoMock(toRow: Function1[PhonenumbertypeRowUnsaved, Phonen override def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): List[PhonenumbertypeRow] = { phonenumbertypeids.flatMap(map.get).toList } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, Option[PhonenumbertypeRow]] = { + val byId = selectByIds(phonenumbertypeids).view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilderMock(UpdateParams.empty, PhonenumbertypeFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala index 1473d90bb9..31a390fe86 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala @@ -25,6 +25,7 @@ trait StateprovinceRepo { def selectAll(implicit c: Connection): List[StateprovinceRow] def selectById(stateprovinceid: StateprovinceId)(implicit c: Connection): Option[StateprovinceRow] def selectByIds(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): List[StateprovinceRow] + def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, Option[StateprovinceRow]] def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] def update(row: StateprovinceRow)(implicit c: Connection): Boolean def upsert(unsaved: StateprovinceRow)(implicit c: Connection): StateprovinceRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala index 46f59eefa8..2d37349a20 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala @@ -117,6 +117,10 @@ class StateprovinceRepoImpl extends StateprovinceRepo { """.as(StateprovinceRow.rowParser(1).*) } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, Option[StateprovinceRow]] = { + val byId = selectByIds(stateprovinceids).view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilder("person.stateprovince", StateprovinceFields.structure, StateprovinceRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala index 7348a87315..e6d2a814e0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala @@ -67,6 +67,10 @@ class StateprovinceRepoMock(toRow: Function1[StateprovinceRowUnsaved, Stateprovi override def selectByIds(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): List[StateprovinceRow] = { stateprovinceids.flatMap(map.get).toList } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, Option[StateprovinceRow]] = { + val byId = selectByIds(stateprovinceids).view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilderMock(UpdateParams.empty, StateprovinceFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala index a146c03ad3..88ff97f840 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala @@ -25,6 +25,7 @@ trait BillofmaterialsRepo { def selectAll(implicit c: Connection): List[BillofmaterialsRow] def selectById(billofmaterialsid: Int)(implicit c: Connection): Option[BillofmaterialsRow] def selectByIds(billofmaterialsids: Array[Int])(implicit c: Connection): List[BillofmaterialsRow] + def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, Option[BillofmaterialsRow]] def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] def update(row: BillofmaterialsRow)(implicit c: Connection): Boolean def upsert(unsaved: BillofmaterialsRow)(implicit c: Connection): BillofmaterialsRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala index 67aa4713b0..0973ce7f0b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala @@ -116,6 +116,10 @@ class BillofmaterialsRepoImpl extends BillofmaterialsRepo { """.as(BillofmaterialsRow.rowParser(1).*) } + override def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, Option[BillofmaterialsRow]] = { + val byId = selectByIds(billofmaterialsids).view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilder("production.billofmaterials", BillofmaterialsFields.structure, BillofmaterialsRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala index 978b513535..83bdd0a66b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala @@ -67,6 +67,10 @@ class BillofmaterialsRepoMock(toRow: Function1[BillofmaterialsRowUnsaved, Billof override def selectByIds(billofmaterialsids: Array[Int])(implicit c: Connection): List[BillofmaterialsRow] = { billofmaterialsids.flatMap(map.get).toList } + override def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, Option[BillofmaterialsRow]] = { + val byId = selectByIds(billofmaterialsids).view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilderMock(UpdateParams.empty, BillofmaterialsFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala index 396b1d554a..8f2418df46 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala @@ -25,6 +25,7 @@ trait CultureRepo { def selectAll(implicit c: Connection): List[CultureRow] def selectById(cultureid: CultureId)(implicit c: Connection): Option[CultureRow] def selectByIds(cultureids: Array[CultureId])(implicit c: Connection): List[CultureRow] + def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, Option[CultureRow]] def update: UpdateBuilder[CultureFields, CultureRow] def update(row: CultureRow)(implicit c: Connection): Boolean def upsert(unsaved: CultureRow)(implicit c: Connection): CultureRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala index 62d9114a8b..989e4f8f78 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala @@ -98,6 +98,10 @@ class CultureRepoImpl extends CultureRepo { """.as(CultureRow.rowParser(1).*) } + override def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, Option[CultureRow]] = { + val byId = selectByIds(cultureids).view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilder("production.culture", CultureFields.structure, CultureRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala index b2b4ec9304..8021e0494c 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala @@ -67,6 +67,10 @@ class CultureRepoMock(toRow: Function1[CultureRowUnsaved, CultureRow], override def selectByIds(cultureids: Array[CultureId])(implicit c: Connection): List[CultureRow] = { cultureids.flatMap(map.get).toList } + override def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, Option[CultureRow]] = { + val byId = selectByIds(cultureids).view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilderMock(UpdateParams.empty, CultureFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala index 1a9b3193a4..d587cbf88f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala @@ -26,6 +26,7 @@ trait DocumentRepo { def selectAll(implicit c: Connection): List[DocumentRow] def selectById(documentnode: DocumentId)(implicit c: Connection): Option[DocumentRow] def selectByIds(documentnodes: Array[DocumentId])(implicit c: Connection): List[DocumentRow] + def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, Option[DocumentRow]] def selectByUniqueRowguid(rowguid: TypoUUID)(implicit c: Connection): Option[DocumentRow] def update: UpdateBuilder[DocumentFields, DocumentRow] def update(row: DocumentRow)(implicit c: Connection): Boolean diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala index 330144a888..665d68dd84 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala @@ -126,6 +126,10 @@ class DocumentRepoImpl extends DocumentRepo { """.as(DocumentRow.rowParser(1).*) } + override def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, Option[DocumentRow]] = { + val byId = selectByIds(documentnodes).view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } override def selectByUniqueRowguid(rowguid: TypoUUID)(implicit c: Connection): Option[DocumentRow] = { SQL"""select "title", "owner", "folderflag", "filename", "fileextension", "revision", "changenumber", "status", "documentsummary", "document", "rowguid", "modifieddate"::text, "documentnode" from production.document diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala index 965c5c3d1a..6c06a8c869 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala @@ -68,6 +68,10 @@ class DocumentRepoMock(toRow: Function1[DocumentRowUnsaved, DocumentRow], override def selectByIds(documentnodes: Array[DocumentId])(implicit c: Connection): List[DocumentRow] = { documentnodes.flatMap(map.get).toList } + override def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, Option[DocumentRow]] = { + val byId = selectByIds(documentnodes).view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } override def selectByUniqueRowguid(rowguid: TypoUUID)(implicit c: Connection): Option[DocumentRow] = { map.values.find(v => rowguid == v.rowguid) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala index 059838f9a4..ee14e35f83 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala @@ -25,6 +25,7 @@ trait IllustrationRepo { def selectAll(implicit c: Connection): List[IllustrationRow] def selectById(illustrationid: IllustrationId)(implicit c: Connection): Option[IllustrationRow] def selectByIds(illustrationids: Array[IllustrationId])(implicit c: Connection): List[IllustrationRow] + def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, Option[IllustrationRow]] def update: UpdateBuilder[IllustrationFields, IllustrationRow] def update(row: IllustrationRow)(implicit c: Connection): Boolean def upsert(unsaved: IllustrationRow)(implicit c: Connection): IllustrationRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala index 548ab27fea..a80f9853ec 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala @@ -102,6 +102,10 @@ class IllustrationRepoImpl extends IllustrationRepo { """.as(IllustrationRow.rowParser(1).*) } + override def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, Option[IllustrationRow]] = { + val byId = selectByIds(illustrationids).view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilder("production.illustration", IllustrationFields.structure, IllustrationRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala index bb64e7670f..c7e9f8d604 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala @@ -67,6 +67,10 @@ class IllustrationRepoMock(toRow: Function1[IllustrationRowUnsaved, Illustration override def selectByIds(illustrationids: Array[IllustrationId])(implicit c: Connection): List[IllustrationRow] = { illustrationids.flatMap(map.get).toList } + override def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, Option[IllustrationRow]] = { + val byId = selectByIds(illustrationids).view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilderMock(UpdateParams.empty, IllustrationFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala index d462754e92..f7cc5d7514 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala @@ -25,6 +25,7 @@ trait LocationRepo { def selectAll(implicit c: Connection): List[LocationRow] def selectById(locationid: LocationId)(implicit c: Connection): Option[LocationRow] def selectByIds(locationids: Array[LocationId])(implicit c: Connection): List[LocationRow] + def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, Option[LocationRow]] def update: UpdateBuilder[LocationFields, LocationRow] def update(row: LocationRow)(implicit c: Connection): Boolean def upsert(unsaved: LocationRow)(implicit c: Connection): LocationRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala index 00e6c26f51..1ba449ede7 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala @@ -110,6 +110,10 @@ class LocationRepoImpl extends LocationRepo { """.as(LocationRow.rowParser(1).*) } + override def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, Option[LocationRow]] = { + val byId = selectByIds(locationids).view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilder("production.location", LocationFields.structure, LocationRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala index b33b90e512..b8961e65bb 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala @@ -67,6 +67,10 @@ class LocationRepoMock(toRow: Function1[LocationRowUnsaved, LocationRow], override def selectByIds(locationids: Array[LocationId])(implicit c: Connection): List[LocationRow] = { locationids.flatMap(map.get).toList } + override def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, Option[LocationRow]] = { + val byId = selectByIds(locationids).view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilderMock(UpdateParams.empty, LocationFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala index 04dbc2cfaf..5c5b264969 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala @@ -25,6 +25,7 @@ trait ProductRepo { def selectAll(implicit c: Connection): List[ProductRow] def selectById(productid: ProductId)(implicit c: Connection): Option[ProductRow] def selectByIds(productids: Array[ProductId])(implicit c: Connection): List[ProductRow] + def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, Option[ProductRow]] def update: UpdateBuilder[ProductFields, ProductRow] def update(row: ProductRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductRow)(implicit c: Connection): ProductRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala index c18a0f1028..efe7e98c35 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala @@ -140,6 +140,10 @@ class ProductRepoImpl extends ProductRepo { """.as(ProductRow.rowParser(1).*) } + override def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, Option[ProductRow]] = { + val byId = selectByIds(productids).view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilder("production.product", ProductFields.structure, ProductRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala index 9405b1f69d..4d91e193a6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala @@ -67,6 +67,10 @@ class ProductRepoMock(toRow: Function1[ProductRowUnsaved, ProductRow], override def selectByIds(productids: Array[ProductId])(implicit c: Connection): List[ProductRow] = { productids.flatMap(map.get).toList } + override def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, Option[ProductRow]] = { + val byId = selectByIds(productids).view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilderMock(UpdateParams.empty, ProductFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala index e9798543de..c7de1bd2dd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala @@ -25,6 +25,7 @@ trait ProductcategoryRepo { def selectAll(implicit c: Connection): List[ProductcategoryRow] def selectById(productcategoryid: ProductcategoryId)(implicit c: Connection): Option[ProductcategoryRow] def selectByIds(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): List[ProductcategoryRow] + def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, Option[ProductcategoryRow]] def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] def update(row: ProductcategoryRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductcategoryRow)(implicit c: Connection): ProductcategoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala index 29c83afb17..3e359bfc6d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala @@ -106,6 +106,10 @@ class ProductcategoryRepoImpl extends ProductcategoryRepo { """.as(ProductcategoryRow.rowParser(1).*) } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, Option[ProductcategoryRow]] = { + val byId = selectByIds(productcategoryids).view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilder("production.productcategory", ProductcategoryFields.structure, ProductcategoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala index 4fb4ff3b01..5e5839e765 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala @@ -67,6 +67,10 @@ class ProductcategoryRepoMock(toRow: Function1[ProductcategoryRowUnsaved, Produc override def selectByIds(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): List[ProductcategoryRow] = { productcategoryids.flatMap(map.get).toList } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, Option[ProductcategoryRow]] = { + val byId = selectByIds(productcategoryids).view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcategoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala index ab0d1ed815..e5207a9fbb 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala @@ -25,6 +25,7 @@ trait ProductcosthistoryRepo { def selectAll(implicit c: Connection): List[ProductcosthistoryRow] def selectById(compositeId: ProductcosthistoryId)(implicit c: Connection): Option[ProductcosthistoryRow] def selectByIds(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): List[ProductcosthistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, Option[ProductcosthistoryRow]] def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] def update(row: ProductcosthistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductcosthistoryRow)(implicit c: Connection): ProductcosthistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala index d2ddae025c..5ce60add60 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala @@ -107,6 +107,10 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.as(ProductcosthistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, Option[ProductcosthistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilder("production.productcosthistory", ProductcosthistoryFields.structure, ProductcosthistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala index c097b6026c..ded6f9f3cc 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala @@ -67,6 +67,10 @@ class ProductcosthistoryRepoMock(toRow: Function1[ProductcosthistoryRowUnsaved, override def selectByIds(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): List[ProductcosthistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, Option[ProductcosthistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcosthistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala index 60ace6c75f..5b2a82d9d1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala @@ -25,6 +25,7 @@ trait ProductdescriptionRepo { def selectAll(implicit c: Connection): List[ProductdescriptionRow] def selectById(productdescriptionid: ProductdescriptionId)(implicit c: Connection): Option[ProductdescriptionRow] def selectByIds(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): List[ProductdescriptionRow] + def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, Option[ProductdescriptionRow]] def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] def update(row: ProductdescriptionRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductdescriptionRow)(implicit c: Connection): ProductdescriptionRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala index 3c15b9a8cf..fb0f4780ba 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala @@ -106,6 +106,10 @@ class ProductdescriptionRepoImpl extends ProductdescriptionRepo { """.as(ProductdescriptionRow.rowParser(1).*) } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, Option[ProductdescriptionRow]] = { + val byId = selectByIds(productdescriptionids).view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilder("production.productdescription", ProductdescriptionFields.structure, ProductdescriptionRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala index 94c915162f..02c5ad837d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala @@ -67,6 +67,10 @@ class ProductdescriptionRepoMock(toRow: Function1[ProductdescriptionRowUnsaved, override def selectByIds(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): List[ProductdescriptionRow] = { productdescriptionids.flatMap(map.get).toList } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, Option[ProductdescriptionRow]] = { + val byId = selectByIds(productdescriptionids).view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdescriptionFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala index d3551da7fb..3be6ff1958 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala @@ -25,6 +25,7 @@ trait ProductdocumentRepo { def selectAll(implicit c: Connection): List[ProductdocumentRow] def selectById(compositeId: ProductdocumentId)(implicit c: Connection): Option[ProductdocumentRow] def selectByIds(compositeIds: Array[ProductdocumentId])(implicit c: Connection): List[ProductdocumentRow] + def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, Option[ProductdocumentRow]] def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] def update(row: ProductdocumentRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductdocumentRow)(implicit c: Connection): ProductdocumentRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala index 5fec252d09..2b6f5de82e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala @@ -108,6 +108,10 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.as(ProductdocumentRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, Option[ProductdocumentRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilder("production.productdocument", ProductdocumentFields.structure, ProductdocumentRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala index dfde4da6a2..38a95a0101 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala @@ -67,6 +67,10 @@ class ProductdocumentRepoMock(toRow: Function1[ProductdocumentRowUnsaved, Produc override def selectByIds(compositeIds: Array[ProductdocumentId])(implicit c: Connection): List[ProductdocumentRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, Option[ProductdocumentRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdocumentFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala index 4f4b1326c0..5600f701f0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala @@ -25,6 +25,7 @@ trait ProductinventoryRepo { def selectAll(implicit c: Connection): List[ProductinventoryRow] def selectById(compositeId: ProductinventoryId)(implicit c: Connection): Option[ProductinventoryRow] def selectByIds(compositeIds: Array[ProductinventoryId])(implicit c: Connection): List[ProductinventoryRow] + def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, Option[ProductinventoryRow]] def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] def update(row: ProductinventoryRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductinventoryRow)(implicit c: Connection): ProductinventoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala index 0e8058e5eb..25beec16f0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala @@ -118,6 +118,10 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.as(ProductinventoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, Option[ProductinventoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilder("production.productinventory", ProductinventoryFields.structure, ProductinventoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala index 54fd672eda..4a9840c4dd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala @@ -67,6 +67,10 @@ class ProductinventoryRepoMock(toRow: Function1[ProductinventoryRowUnsaved, Prod override def selectByIds(compositeIds: Array[ProductinventoryId])(implicit c: Connection): List[ProductinventoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, Option[ProductinventoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductinventoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala index 466c5794e6..a161bb8333 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala @@ -25,6 +25,7 @@ trait ProductlistpricehistoryRepo { def selectAll(implicit c: Connection): List[ProductlistpricehistoryRow] def selectById(compositeId: ProductlistpricehistoryId)(implicit c: Connection): Option[ProductlistpricehistoryRow] def selectByIds(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): List[ProductlistpricehistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]] def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] def update(row: ProductlistpricehistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductlistpricehistoryRow)(implicit c: Connection): ProductlistpricehistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala index 4d72d99bad..caa6547ac0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala @@ -107,6 +107,10 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.as(ProductlistpricehistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilder("production.productlistpricehistory", ProductlistpricehistoryFields.structure, ProductlistpricehistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala index 89759a8539..7affd61109 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala @@ -67,6 +67,10 @@ class ProductlistpricehistoryRepoMock(toRow: Function1[ProductlistpricehistoryRo override def selectByIds(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): List[ProductlistpricehistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductlistpricehistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala index 067d7681e6..a273e7b1d4 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala @@ -25,6 +25,7 @@ trait ProductmodelRepo { def selectAll(implicit c: Connection): List[ProductmodelRow] def selectById(productmodelid: ProductmodelId)(implicit c: Connection): Option[ProductmodelRow] def selectByIds(productmodelids: Array[ProductmodelId])(implicit c: Connection): List[ProductmodelRow] + def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, Option[ProductmodelRow]] def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] def update(row: ProductmodelRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductmodelRow)(implicit c: Connection): ProductmodelRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala index 170b049a01..fca20e3bc8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala @@ -110,6 +110,10 @@ class ProductmodelRepoImpl extends ProductmodelRepo { """.as(ProductmodelRow.rowParser(1).*) } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, Option[ProductmodelRow]] = { + val byId = selectByIds(productmodelids).view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilder("production.productmodel", ProductmodelFields.structure, ProductmodelRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala index 7b87834763..74b7c8d628 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala @@ -67,6 +67,10 @@ class ProductmodelRepoMock(toRow: Function1[ProductmodelRowUnsaved, Productmodel override def selectByIds(productmodelids: Array[ProductmodelId])(implicit c: Connection): List[ProductmodelRow] = { productmodelids.flatMap(map.get).toList } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, Option[ProductmodelRow]] = { + val byId = selectByIds(productmodelids).view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala index 7234705f8e..b22fc68641 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala @@ -25,6 +25,7 @@ trait ProductmodelillustrationRepo { def selectAll(implicit c: Connection): List[ProductmodelillustrationRow] def selectById(compositeId: ProductmodelillustrationId)(implicit c: Connection): Option[ProductmodelillustrationRow] def selectByIds(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): List[ProductmodelillustrationRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]] def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] def update(row: ProductmodelillustrationRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductmodelillustrationRow)(implicit c: Connection): ProductmodelillustrationRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala index 640d819a4e..273c744739 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala @@ -105,6 +105,10 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.as(ProductmodelillustrationRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilder("production.productmodelillustration", ProductmodelillustrationFields.structure, ProductmodelillustrationRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala index 00208848af..92db7cb183 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala @@ -67,6 +67,10 @@ class ProductmodelillustrationRepoMock(toRow: Function1[Productmodelillustration override def selectByIds(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): List[ProductmodelillustrationRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelillustrationFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala index de54ade109..d8d68a206a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala @@ -25,6 +25,7 @@ trait ProductmodelproductdescriptioncultureRepo { def selectAll(implicit c: Connection): List[ProductmodelproductdescriptioncultureRow] def selectById(compositeId: ProductmodelproductdescriptioncultureId)(implicit c: Connection): Option[ProductmodelproductdescriptioncultureRow] def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): List[ProductmodelproductdescriptioncultureRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]] def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] def update(row: ProductmodelproductdescriptioncultureRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductmodelproductdescriptioncultureRow)(implicit c: Connection): ProductmodelproductdescriptioncultureRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala index 6132e7f4cd..2bdf6200ec 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala @@ -109,6 +109,10 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.as(ProductmodelproductdescriptioncultureRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilder("production.productmodelproductdescriptionculture", ProductmodelproductdescriptioncultureFields.structure, ProductmodelproductdescriptioncultureRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala index ffcc9bba07..7d94fbb246 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala @@ -67,6 +67,10 @@ class ProductmodelproductdescriptioncultureRepoMock(toRow: Function1[Productmode override def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): List[ProductmodelproductdescriptioncultureRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelproductdescriptioncultureFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala index 77f9b23895..007f70db26 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala @@ -25,6 +25,7 @@ trait ProductphotoRepo { def selectAll(implicit c: Connection): List[ProductphotoRow] def selectById(productphotoid: ProductphotoId)(implicit c: Connection): Option[ProductphotoRow] def selectByIds(productphotoids: Array[ProductphotoId])(implicit c: Connection): List[ProductphotoRow] + def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, Option[ProductphotoRow]] def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] def update(row: ProductphotoRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductphotoRow)(implicit c: Connection): ProductphotoRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala index 310e58c82a..54ffd0c961 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala @@ -106,6 +106,10 @@ class ProductphotoRepoImpl extends ProductphotoRepo { """.as(ProductphotoRow.rowParser(1).*) } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, Option[ProductphotoRow]] = { + val byId = selectByIds(productphotoids).view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilder("production.productphoto", ProductphotoFields.structure, ProductphotoRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala index 32c4998962..f841857217 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala @@ -67,6 +67,10 @@ class ProductphotoRepoMock(toRow: Function1[ProductphotoRowUnsaved, Productphoto override def selectByIds(productphotoids: Array[ProductphotoId])(implicit c: Connection): List[ProductphotoRow] = { productphotoids.flatMap(map.get).toList } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, Option[ProductphotoRow]] = { + val byId = selectByIds(productphotoids).view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductphotoFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala index 7d422e11fc..07d959b961 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala @@ -25,6 +25,7 @@ trait ProductproductphotoRepo { def selectAll(implicit c: Connection): List[ProductproductphotoRow] def selectById(compositeId: ProductproductphotoId)(implicit c: Connection): Option[ProductproductphotoRow] def selectByIds(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): List[ProductproductphotoRow] + def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, Option[ProductproductphotoRow]] def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] def update(row: ProductproductphotoRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductproductphotoRow)(implicit c: Connection): ProductproductphotoRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala index 45a8ae8112..98e3cca7e8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala @@ -110,6 +110,10 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.as(ProductproductphotoRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, Option[ProductproductphotoRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilder("production.productproductphoto", ProductproductphotoFields.structure, ProductproductphotoRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala index 0c3e244764..ddbb52ced8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala @@ -67,6 +67,10 @@ class ProductproductphotoRepoMock(toRow: Function1[ProductproductphotoRowUnsaved override def selectByIds(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): List[ProductproductphotoRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, Option[ProductproductphotoRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductproductphotoFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala index 1bd8608892..132055c4d2 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala @@ -25,6 +25,7 @@ trait ProductreviewRepo { def selectAll(implicit c: Connection): List[ProductreviewRow] def selectById(productreviewid: ProductreviewId)(implicit c: Connection): Option[ProductreviewRow] def selectByIds(productreviewids: Array[ProductreviewId])(implicit c: Connection): List[ProductreviewRow] + def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, Option[ProductreviewRow]] def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] def update(row: ProductreviewRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductreviewRow)(implicit c: Connection): ProductreviewRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala index 021ff40b3d..b597002c29 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala @@ -112,6 +112,10 @@ class ProductreviewRepoImpl extends ProductreviewRepo { """.as(ProductreviewRow.rowParser(1).*) } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, Option[ProductreviewRow]] = { + val byId = selectByIds(productreviewids).view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilder("production.productreview", ProductreviewFields.structure, ProductreviewRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala index 82bf43b25e..d9cc4d282a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala @@ -67,6 +67,10 @@ class ProductreviewRepoMock(toRow: Function1[ProductreviewRowUnsaved, Productrev override def selectByIds(productreviewids: Array[ProductreviewId])(implicit c: Connection): List[ProductreviewRow] = { productreviewids.flatMap(map.get).toList } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, Option[ProductreviewRow]] = { + val byId = selectByIds(productreviewids).view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilderMock(UpdateParams.empty, ProductreviewFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala index 37e44d5a9d..e7b7682c44 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala @@ -25,6 +25,7 @@ trait ProductsubcategoryRepo { def selectAll(implicit c: Connection): List[ProductsubcategoryRow] def selectById(productsubcategoryid: ProductsubcategoryId)(implicit c: Connection): Option[ProductsubcategoryRow] def selectByIds(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): List[ProductsubcategoryRow] + def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, Option[ProductsubcategoryRow]] def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] def update(row: ProductsubcategoryRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductsubcategoryRow)(implicit c: Connection): ProductsubcategoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala index 4acec89134..d1057d8278 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala @@ -108,6 +108,10 @@ class ProductsubcategoryRepoImpl extends ProductsubcategoryRepo { """.as(ProductsubcategoryRow.rowParser(1).*) } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, Option[ProductsubcategoryRow]] = { + val byId = selectByIds(productsubcategoryids).view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilder("production.productsubcategory", ProductsubcategoryFields.structure, ProductsubcategoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala index 5554c8cf4a..728d52a4f0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala @@ -67,6 +67,10 @@ class ProductsubcategoryRepoMock(toRow: Function1[ProductsubcategoryRowUnsaved, override def selectByIds(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): List[ProductsubcategoryRow] = { productsubcategoryids.flatMap(map.get).toList } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, Option[ProductsubcategoryRow]] = { + val byId = selectByIds(productsubcategoryids).view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductsubcategoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala index 2e2b1cea2a..e0137f0c31 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala @@ -25,6 +25,7 @@ trait ScrapreasonRepo { def selectAll(implicit c: Connection): List[ScrapreasonRow] def selectById(scrapreasonid: ScrapreasonId)(implicit c: Connection): Option[ScrapreasonRow] def selectByIds(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): List[ScrapreasonRow] + def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, Option[ScrapreasonRow]] def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] def update(row: ScrapreasonRow)(implicit c: Connection): Boolean def upsert(unsaved: ScrapreasonRow)(implicit c: Connection): ScrapreasonRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala index 40c46626a1..b4023cb590 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala @@ -101,6 +101,10 @@ class ScrapreasonRepoImpl extends ScrapreasonRepo { """.as(ScrapreasonRow.rowParser(1).*) } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, Option[ScrapreasonRow]] = { + val byId = selectByIds(scrapreasonids).view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilder("production.scrapreason", ScrapreasonFields.structure, ScrapreasonRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala index 7676c0378a..c325abfbd7 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala @@ -67,6 +67,10 @@ class ScrapreasonRepoMock(toRow: Function1[ScrapreasonRowUnsaved, ScrapreasonRow override def selectByIds(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): List[ScrapreasonRow] = { scrapreasonids.flatMap(map.get).toList } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, Option[ScrapreasonRow]] = { + val byId = selectByIds(scrapreasonids).view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilderMock(UpdateParams.empty, ScrapreasonFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala index 92877b4a27..80b16c6c17 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala @@ -25,6 +25,7 @@ trait TransactionhistoryRepo { def selectAll(implicit c: Connection): List[TransactionhistoryRow] def selectById(transactionid: TransactionhistoryId)(implicit c: Connection): Option[TransactionhistoryRow] def selectByIds(transactionids: Array[TransactionhistoryId])(implicit c: Connection): List[TransactionhistoryRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, Option[TransactionhistoryRow]] def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] def update(row: TransactionhistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: TransactionhistoryRow)(implicit c: Connection): TransactionhistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala index 1a47ddd4b8..2faacf0f41 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala @@ -114,6 +114,10 @@ class TransactionhistoryRepoImpl extends TransactionhistoryRepo { """.as(TransactionhistoryRow.rowParser(1).*) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, Option[TransactionhistoryRow]] = { + val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilder("production.transactionhistory", TransactionhistoryFields.structure, TransactionhistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala index bd06b4e142..56c37bf6c0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala @@ -67,6 +67,10 @@ class TransactionhistoryRepoMock(toRow: Function1[TransactionhistoryRowUnsaved, override def selectByIds(transactionids: Array[TransactionhistoryId])(implicit c: Connection): List[TransactionhistoryRow] = { transactionids.flatMap(map.get).toList } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, Option[TransactionhistoryRow]] = { + val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala index c03763a8f6..b28a037afa 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala @@ -25,6 +25,7 @@ trait TransactionhistoryarchiveRepo { def selectAll(implicit c: Connection): List[TransactionhistoryarchiveRow] def selectById(transactionid: TransactionhistoryarchiveId)(implicit c: Connection): Option[TransactionhistoryarchiveRow] def selectByIds(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): List[TransactionhistoryarchiveRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]] def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] def update(row: TransactionhistoryarchiveRow)(implicit c: Connection): Boolean def upsert(unsaved: TransactionhistoryarchiveRow)(implicit c: Connection): TransactionhistoryarchiveRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala index fab5420928..e7e6cb4e61 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala @@ -110,6 +110,10 @@ class TransactionhistoryarchiveRepoImpl extends TransactionhistoryarchiveRepo { """.as(TransactionhistoryarchiveRow.rowParser(1).*) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]] = { + val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilder("production.transactionhistoryarchive", TransactionhistoryarchiveFields.structure, TransactionhistoryarchiveRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala index e181aec4be..f4526f6cdf 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala @@ -67,6 +67,10 @@ class TransactionhistoryarchiveRepoMock(toRow: Function1[Transactionhistoryarchi override def selectByIds(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): List[TransactionhistoryarchiveRow] = { transactionids.flatMap(map.get).toList } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]] = { + val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryarchiveFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala index cf9167dbc1..895adce3da 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala @@ -25,6 +25,7 @@ trait UnitmeasureRepo { def selectAll(implicit c: Connection): List[UnitmeasureRow] def selectById(unitmeasurecode: UnitmeasureId)(implicit c: Connection): Option[UnitmeasureRow] def selectByIds(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): List[UnitmeasureRow] + def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, Option[UnitmeasureRow]] def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] def update(row: UnitmeasureRow)(implicit c: Connection): Boolean def upsert(unsaved: UnitmeasureRow)(implicit c: Connection): UnitmeasureRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala index 2be2a961bd..c360f40e96 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala @@ -98,6 +98,10 @@ class UnitmeasureRepoImpl extends UnitmeasureRepo { """.as(UnitmeasureRow.rowParser(1).*) } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, Option[UnitmeasureRow]] = { + val byId = selectByIds(unitmeasurecodes).view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilder("production.unitmeasure", UnitmeasureFields.structure, UnitmeasureRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala index 05eb2dade9..44c0ea12c3 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala @@ -67,6 +67,10 @@ class UnitmeasureRepoMock(toRow: Function1[UnitmeasureRowUnsaved, UnitmeasureRow override def selectByIds(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): List[UnitmeasureRow] = { unitmeasurecodes.flatMap(map.get).toList } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, Option[UnitmeasureRow]] = { + val byId = selectByIds(unitmeasurecodes).view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilderMock(UpdateParams.empty, UnitmeasureFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala index 817ab99568..ae6ce6f346 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala @@ -25,6 +25,7 @@ trait WorkorderRepo { def selectAll(implicit c: Connection): List[WorkorderRow] def selectById(workorderid: WorkorderId)(implicit c: Connection): Option[WorkorderRow] def selectByIds(workorderids: Array[WorkorderId])(implicit c: Connection): List[WorkorderRow] + def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, Option[WorkorderRow]] def update: UpdateBuilder[WorkorderFields, WorkorderRow] def update(row: WorkorderRow)(implicit c: Connection): Boolean def upsert(unsaved: WorkorderRow)(implicit c: Connection): WorkorderRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala index 502a967e8e..c7a6db03fa 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala @@ -110,6 +110,10 @@ class WorkorderRepoImpl extends WorkorderRepo { """.as(WorkorderRow.rowParser(1).*) } + override def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, Option[WorkorderRow]] = { + val byId = selectByIds(workorderids).view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilder("production.workorder", WorkorderFields.structure, WorkorderRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala index 2a184b2630..1902d1ab11 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala @@ -67,6 +67,10 @@ class WorkorderRepoMock(toRow: Function1[WorkorderRowUnsaved, WorkorderRow], override def selectByIds(workorderids: Array[WorkorderId])(implicit c: Connection): List[WorkorderRow] = { workorderids.flatMap(map.get).toList } + override def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, Option[WorkorderRow]] = { + val byId = selectByIds(workorderids).view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala index 53bc5f213b..744bea9327 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala @@ -25,6 +25,7 @@ trait WorkorderroutingRepo { def selectAll(implicit c: Connection): List[WorkorderroutingRow] def selectById(compositeId: WorkorderroutingId)(implicit c: Connection): Option[WorkorderroutingRow] def selectByIds(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): List[WorkorderroutingRow] + def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, Option[WorkorderroutingRow]] def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] def update(row: WorkorderroutingRow)(implicit c: Connection): Boolean def upsert(unsaved: WorkorderroutingRow)(implicit c: Connection): WorkorderroutingRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala index 74a0f4beec..95d04d94ee 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala @@ -119,6 +119,10 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.as(WorkorderroutingRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, Option[WorkorderroutingRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilder("production.workorderrouting", WorkorderroutingFields.structure, WorkorderroutingRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala index 7ca5d3dd66..4f3afaefa1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala @@ -67,6 +67,10 @@ class WorkorderroutingRepoMock(toRow: Function1[WorkorderroutingRowUnsaved, Work override def selectByIds(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): List[WorkorderroutingRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, Option[WorkorderroutingRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderroutingFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala index 2fd05bbb13..2bb5b305b6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala @@ -22,6 +22,7 @@ trait FlaffRepo { def selectAll(implicit c: Connection): List[FlaffRow] def selectById(compositeId: FlaffId)(implicit c: Connection): Option[FlaffRow] def selectByIds(compositeIds: Array[FlaffId])(implicit c: Connection): List[FlaffRow] + def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, Option[FlaffRow]] def update: UpdateBuilder[FlaffFields, FlaffRow] def update(row: FlaffRow)(implicit c: Connection): Boolean def upsert(unsaved: FlaffRow)(implicit c: Connection): FlaffRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala index 2e28c0ffc0..b8add7a1c8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala @@ -74,6 +74,10 @@ class FlaffRepoImpl extends FlaffRepo { """.as(FlaffRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, Option[FlaffRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilder("public.flaff", FlaffFields.structure, FlaffRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala index b0cf974f88..6ef7b3ff48 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala @@ -55,6 +55,10 @@ class FlaffRepoMock(map: scala.collection.mutable.Map[FlaffId, FlaffRow] = scala override def selectByIds(compositeIds: Array[FlaffId])(implicit c: Connection): List[FlaffRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, Option[FlaffRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilderMock(UpdateParams.empty, FlaffFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala index 324520c835..19a197c3f8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala @@ -25,6 +25,7 @@ trait IdentityTestRepo { def selectAll(implicit c: Connection): List[IdentityTestRow] def selectById(name: IdentityTestId)(implicit c: Connection): Option[IdentityTestRow] def selectByIds(names: Array[IdentityTestId])(implicit c: Connection): List[IdentityTestRow] + def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, Option[IdentityTestRow]] def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] def update(row: IdentityTestRow)(implicit c: Connection): Boolean def upsert(unsaved: IdentityTestRow)(implicit c: Connection): IdentityTestRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala index c880bffd67..61d4659549 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala @@ -96,6 +96,10 @@ class IdentityTestRepoImpl extends IdentityTestRepo { """.as(IdentityTestRow.rowParser(1).*) } + override def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, Option[IdentityTestRow]] = { + val byId = selectByIds(names).view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilder("public.identity-test", IdentityTestFields.structure, IdentityTestRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala index e3d793df6e..e6153bbac9 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala @@ -67,6 +67,10 @@ class IdentityTestRepoMock(toRow: Function1[IdentityTestRowUnsaved, IdentityTest override def selectByIds(names: Array[IdentityTestId])(implicit c: Connection): List[IdentityTestRow] = { names.flatMap(map.get).toList } + override def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, Option[IdentityTestRow]] = { + val byId = selectByIds(names).view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilderMock(UpdateParams.empty, IdentityTestFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala index f81bc5797f..d74448c006 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala @@ -26,6 +26,7 @@ trait UsersRepo { def selectAll(implicit c: Connection): List[UsersRow] def selectById(userId: UsersId)(implicit c: Connection): Option[UsersRow] def selectByIds(userIds: Array[UsersId])(implicit c: Connection): List[UsersRow] + def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, Option[UsersRow]] def selectByUniqueEmail(email: TypoUnknownCitext)(implicit c: Connection): Option[UsersRow] def update: UpdateBuilder[UsersFields, UsersRow] def update(row: UsersRow)(implicit c: Connection): Boolean diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala index f510cd69b6..e944304e46 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala @@ -104,6 +104,10 @@ class UsersRepoImpl extends UsersRepo { """.as(UsersRow.rowParser(1).*) } + override def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, Option[UsersRow]] = { + val byId = selectByIds(userIds).view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } override def selectByUniqueEmail(email: TypoUnknownCitext)(implicit c: Connection): Option[UsersRow] = { SQL"""select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.users diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala index c8f081394d..be950e34eb 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala @@ -68,6 +68,10 @@ class UsersRepoMock(toRow: Function1[UsersRowUnsaved, UsersRow], override def selectByIds(userIds: Array[UsersId])(implicit c: Connection): List[UsersRow] = { userIds.flatMap(map.get).toList } + override def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, Option[UsersRow]] = { + val byId = selectByIds(userIds).view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } override def selectByUniqueEmail(email: TypoUnknownCitext)(implicit c: Connection): Option[UsersRow] = { map.values.find(v => email == v.email) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala index b70d983158..9813285a58 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala @@ -25,6 +25,7 @@ trait ProductvendorRepo { def selectAll(implicit c: Connection): List[ProductvendorRow] def selectById(compositeId: ProductvendorId)(implicit c: Connection): Option[ProductvendorRow] def selectByIds(compositeIds: Array[ProductvendorId])(implicit c: Connection): List[ProductvendorRow] + def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, Option[ProductvendorRow]] def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] def update(row: ProductvendorRow)(implicit c: Connection): Boolean def upsert(unsaved: ProductvendorRow)(implicit c: Connection): ProductvendorRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala index 90be3e928f..2c5c868e0b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala @@ -116,6 +116,10 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.as(ProductvendorRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, Option[ProductvendorRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilder("purchasing.productvendor", ProductvendorFields.structure, ProductvendorRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala index 59fdf2c9e8..2a3d6b0bf5 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala @@ -67,6 +67,10 @@ class ProductvendorRepoMock(toRow: Function1[ProductvendorRowUnsaved, Productven override def selectByIds(compositeIds: Array[ProductvendorId])(implicit c: Connection): List[ProductvendorRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, Option[ProductvendorRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilderMock(UpdateParams.empty, ProductvendorFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala index 033de0c1dc..7f79277cbc 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala @@ -15,4 +15,5 @@ trait PurchaseorderdetailRepo { def selectAll(implicit c: Connection): List[PurchaseorderdetailRow] def selectById(compositeId: PurchaseorderdetailId)(implicit c: Connection): Option[PurchaseorderdetailRow] def selectByIds(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): List[PurchaseorderdetailRow] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]] } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala index a7d580ebc7..88027d8ed4 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala @@ -40,4 +40,8 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.as(PurchaseorderdetailRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala index 544a35fd53..23cbac9c57 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala @@ -25,6 +25,7 @@ trait PurchaseorderheaderRepo { def selectAll(implicit c: Connection): List[PurchaseorderheaderRow] def selectById(purchaseorderid: PurchaseorderheaderId)(implicit c: Connection): Option[PurchaseorderheaderRow] def selectByIds(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): List[PurchaseorderheaderRow] + def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]] def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] def update(row: PurchaseorderheaderRow)(implicit c: Connection): Boolean def upsert(unsaved: PurchaseorderheaderRow)(implicit c: Connection): PurchaseorderheaderRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala index dcec59c46d..4571582834 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala @@ -131,6 +131,10 @@ class PurchaseorderheaderRepoImpl extends PurchaseorderheaderRepo { """.as(PurchaseorderheaderRow.rowParser(1).*) } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]] = { + val byId = selectByIds(purchaseorderids).view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilder("purchasing.purchaseorderheader", PurchaseorderheaderFields.structure, PurchaseorderheaderRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala index bda6e2d1cc..3d09f919a1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala @@ -67,6 +67,10 @@ class PurchaseorderheaderRepoMock(toRow: Function1[PurchaseorderheaderRowUnsaved override def selectByIds(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): List[PurchaseorderheaderRow] = { purchaseorderids.flatMap(map.get).toList } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]] = { + val byId = selectByIds(purchaseorderids).view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, PurchaseorderheaderFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala index b09573d0b8..0cf629fad6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala @@ -25,6 +25,7 @@ trait ShipmethodRepo { def selectAll(implicit c: Connection): List[ShipmethodRow] def selectById(shipmethodid: ShipmethodId)(implicit c: Connection): Option[ShipmethodRow] def selectByIds(shipmethodids: Array[ShipmethodId])(implicit c: Connection): List[ShipmethodRow] + def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, Option[ShipmethodRow]] def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] def update(row: ShipmethodRow)(implicit c: Connection): Boolean def upsert(unsaved: ShipmethodRow)(implicit c: Connection): ShipmethodRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala index d7fc9c2123..a6425b1a92 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala @@ -115,6 +115,10 @@ class ShipmethodRepoImpl extends ShipmethodRepo { """.as(ShipmethodRow.rowParser(1).*) } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, Option[ShipmethodRow]] = { + val byId = selectByIds(shipmethodids).view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilder("purchasing.shipmethod", ShipmethodFields.structure, ShipmethodRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala index a4d656f145..4f53da3f55 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala @@ -67,6 +67,10 @@ class ShipmethodRepoMock(toRow: Function1[ShipmethodRowUnsaved, ShipmethodRow], override def selectByIds(shipmethodids: Array[ShipmethodId])(implicit c: Connection): List[ShipmethodRow] = { shipmethodids.flatMap(map.get).toList } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, Option[ShipmethodRow]] = { + val byId = selectByIds(shipmethodids).view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilderMock(UpdateParams.empty, ShipmethodFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala index 90fdc01822..fdb80528fa 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala @@ -26,6 +26,7 @@ trait VendorRepo { def selectAll(implicit c: Connection): List[VendorRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[VendorRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[VendorRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[VendorRow]] def update: UpdateBuilder[VendorFields, VendorRow] def update(row: VendorRow)(implicit c: Connection): Boolean def upsert(unsaved: VendorRow)(implicit c: Connection): VendorRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala index 58e5b2f985..9048c41542 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala @@ -115,6 +115,10 @@ class VendorRepoImpl extends VendorRepo { """.as(VendorRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[VendorRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilder("purchasing.vendor", VendorFields.structure, VendorRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala index 248fe15c14..005644d90f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala @@ -68,6 +68,10 @@ class VendorRepoMock(toRow: Function1[VendorRowUnsaved, VendorRow], override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[VendorRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[VendorRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilderMock(UpdateParams.empty, VendorFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala index e240847149..ebe0f9f089 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala @@ -25,6 +25,7 @@ trait CountryregioncurrencyRepo { def selectAll(implicit c: Connection): List[CountryregioncurrencyRow] def selectById(compositeId: CountryregioncurrencyId)(implicit c: Connection): Option[CountryregioncurrencyRow] def selectByIds(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): List[CountryregioncurrencyRow] + def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]] def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] def update(row: CountryregioncurrencyRow)(implicit c: Connection): Boolean def upsert(unsaved: CountryregioncurrencyRow)(implicit c: Connection): CountryregioncurrencyRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala index 0f37af4582..81a6dad0b3 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala @@ -105,6 +105,10 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.as(CountryregioncurrencyRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilder("sales.countryregioncurrency", CountryregioncurrencyFields.structure, CountryregioncurrencyRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala index 7a53f3b321..cd08227944 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala @@ -67,6 +67,10 @@ class CountryregioncurrencyRepoMock(toRow: Function1[CountryregioncurrencyRowUns override def selectByIds(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): List[CountryregioncurrencyRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregioncurrencyFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala index 069b36954a..95a2e7edbd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala @@ -27,6 +27,7 @@ trait CreditcardRepo { def selectAll(implicit c: Connection): List[CreditcardRow] def selectById(creditcardid: /* user-picked */ CustomCreditcardId)(implicit c: Connection): Option[CreditcardRow] def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): List[CreditcardRow] + def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]] def update: UpdateBuilder[CreditcardFields, CreditcardRow] def update(row: CreditcardRow)(implicit c: Connection): Boolean def upsert(unsaved: CreditcardRow)(implicit c: Connection): CreditcardRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala index 8d6f85d976..0c2dd0b07e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala @@ -106,6 +106,10 @@ class CreditcardRepoImpl extends CreditcardRepo { """.as(CreditcardRow.rowParser(1).*) } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]] = { + val byId = selectByIds(creditcardids).view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilder("sales.creditcard", CreditcardFields.structure, CreditcardRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala index d7e39ed8a7..25a9d6530f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala @@ -69,6 +69,10 @@ class CreditcardRepoMock(toRow: Function1[CreditcardRowUnsaved, CreditcardRow], override def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): List[CreditcardRow] = { creditcardids.flatMap(map.get).toList } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]] = { + val byId = selectByIds(creditcardids).view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, CreditcardFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala index 0179b90d09..95c261ec9a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala @@ -25,6 +25,7 @@ trait CurrencyRepo { def selectAll(implicit c: Connection): List[CurrencyRow] def selectById(currencycode: CurrencyId)(implicit c: Connection): Option[CurrencyRow] def selectByIds(currencycodes: Array[CurrencyId])(implicit c: Connection): List[CurrencyRow] + def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, Option[CurrencyRow]] def update: UpdateBuilder[CurrencyFields, CurrencyRow] def update(row: CurrencyRow)(implicit c: Connection): Boolean def upsert(unsaved: CurrencyRow)(implicit c: Connection): CurrencyRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala index e04639ce9b..be5432d33f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala @@ -98,6 +98,10 @@ class CurrencyRepoImpl extends CurrencyRepo { """.as(CurrencyRow.rowParser(1).*) } + override def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, Option[CurrencyRow]] = { + val byId = selectByIds(currencycodes).view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilder("sales.currency", CurrencyFields.structure, CurrencyRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala index 3d5affd4a7..ba3d3f8dbd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala @@ -67,6 +67,10 @@ class CurrencyRepoMock(toRow: Function1[CurrencyRowUnsaved, CurrencyRow], override def selectByIds(currencycodes: Array[CurrencyId])(implicit c: Connection): List[CurrencyRow] = { currencycodes.flatMap(map.get).toList } + override def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, Option[CurrencyRow]] = { + val byId = selectByIds(currencycodes).view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala index 020f2deede..c852c2a588 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala @@ -25,6 +25,7 @@ trait CurrencyrateRepo { def selectAll(implicit c: Connection): List[CurrencyrateRow] def selectById(currencyrateid: CurrencyrateId)(implicit c: Connection): Option[CurrencyrateRow] def selectByIds(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): List[CurrencyrateRow] + def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, Option[CurrencyrateRow]] def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] def update(row: CurrencyrateRow)(implicit c: Connection): Boolean def upsert(unsaved: CurrencyrateRow)(implicit c: Connection): CurrencyrateRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala index a14ef6ef91..68957dedd5 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala @@ -106,6 +106,10 @@ class CurrencyrateRepoImpl extends CurrencyrateRepo { """.as(CurrencyrateRow.rowParser(1).*) } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, Option[CurrencyrateRow]] = { + val byId = selectByIds(currencyrateids).view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilder("sales.currencyrate", CurrencyrateFields.structure, CurrencyrateRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala index 96abf3b07c..1c51308825 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala @@ -67,6 +67,10 @@ class CurrencyrateRepoMock(toRow: Function1[CurrencyrateRowUnsaved, Currencyrate override def selectByIds(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): List[CurrencyrateRow] = { currencyrateids.flatMap(map.get).toList } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, Option[CurrencyrateRow]] = { + val byId = selectByIds(currencyrateids).view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyrateFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala index 5334812aa0..0355fdebb4 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala @@ -25,6 +25,7 @@ trait CustomerRepo { def selectAll(implicit c: Connection): List[CustomerRow] def selectById(customerid: CustomerId)(implicit c: Connection): Option[CustomerRow] def selectByIds(customerids: Array[CustomerId])(implicit c: Connection): List[CustomerRow] + def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, Option[CustomerRow]] def update: UpdateBuilder[CustomerFields, CustomerRow] def update(row: CustomerRow)(implicit c: Connection): Boolean def upsert(unsaved: CustomerRow)(implicit c: Connection): CustomerRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala index d040a7c63a..c5f8bef4b1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala @@ -110,6 +110,10 @@ class CustomerRepoImpl extends CustomerRepo { """.as(CustomerRow.rowParser(1).*) } + override def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, Option[CustomerRow]] = { + val byId = selectByIds(customerids).view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilder("sales.customer", CustomerFields.structure, CustomerRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala index ad06cc2d55..d5353a1677 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala @@ -67,6 +67,10 @@ class CustomerRepoMock(toRow: Function1[CustomerRowUnsaved, CustomerRow], override def selectByIds(customerids: Array[CustomerId])(implicit c: Connection): List[CustomerRow] = { customerids.flatMap(map.get).toList } + override def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, Option[CustomerRow]] = { + val byId = selectByIds(customerids).view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilderMock(UpdateParams.empty, CustomerFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala index d7c4e39577..f49919c759 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala @@ -27,6 +27,7 @@ trait PersoncreditcardRepo { def selectAll(implicit c: Connection): List[PersoncreditcardRow] def selectById(compositeId: PersoncreditcardId)(implicit c: Connection): Option[PersoncreditcardRow] def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): List[PersoncreditcardRow] + def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, Option[PersoncreditcardRow]] def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] def update(row: PersoncreditcardRow)(implicit c: Connection): Boolean def upsert(unsaved: PersoncreditcardRow)(implicit c: Connection): PersoncreditcardRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala index b83c630df7..1edca40964 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala @@ -106,6 +106,10 @@ class PersoncreditcardRepoImpl extends PersoncreditcardRepo { """.as(PersoncreditcardRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, Option[PersoncreditcardRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilder("sales.personcreditcard", PersoncreditcardFields.structure, PersoncreditcardRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala index b216b31588..5505aa2e5b 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala @@ -69,6 +69,10 @@ class PersoncreditcardRepoMock(toRow: Function1[PersoncreditcardRowUnsaved, Pers override def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): List[PersoncreditcardRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, Option[PersoncreditcardRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, PersoncreditcardFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala index 02b36c58fe..1ec460994d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala @@ -25,6 +25,7 @@ trait SalesorderdetailRepo { def selectAll(implicit c: Connection): List[SalesorderdetailRow] def selectById(compositeId: SalesorderdetailId)(implicit c: Connection): Option[SalesorderdetailRow] def selectByIds(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): List[SalesorderdetailRow] + def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, Option[SalesorderdetailRow]] def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] def update(row: SalesorderdetailRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesorderdetailRow)(implicit c: Connection): SalesorderdetailRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala index 76dd337b69..e8c91dd7e2 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala @@ -126,6 +126,10 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.as(SalesorderdetailRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, Option[SalesorderdetailRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilder("sales.salesorderdetail", SalesorderdetailFields.structure, SalesorderdetailRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala index 088565ea30..c1281eaf0a 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala @@ -67,6 +67,10 @@ class SalesorderdetailRepoMock(toRow: Function1[SalesorderdetailRowUnsaved, Sale override def selectByIds(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): List[SalesorderdetailRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, Option[SalesorderdetailRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderdetailFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala index 7357ff6010..9c6fe1b063 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala @@ -25,6 +25,7 @@ trait SalesorderheaderRepo { def selectAll(implicit c: Connection): List[SalesorderheaderRow] def selectById(salesorderid: SalesorderheaderId)(implicit c: Connection): Option[SalesorderheaderRow] def selectByIds(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): List[SalesorderheaderRow] + def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, Option[SalesorderheaderRow]] def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] def update(row: SalesorderheaderRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesorderheaderRow)(implicit c: Connection): SalesorderheaderRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala index dd30d27fdb..10a9f6e3fc 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala @@ -160,6 +160,10 @@ class SalesorderheaderRepoImpl extends SalesorderheaderRepo { """.as(SalesorderheaderRow.rowParser(1).*) } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, Option[SalesorderheaderRow]] = { + val byId = selectByIds(salesorderids).view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilder("sales.salesorderheader", SalesorderheaderFields.structure, SalesorderheaderRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala index 9b6532b61a..2abcfe1a64 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala @@ -67,6 +67,10 @@ class SalesorderheaderRepoMock(toRow: Function1[SalesorderheaderRowUnsaved, Sale override def selectByIds(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): List[SalesorderheaderRow] = { salesorderids.flatMap(map.get).toList } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, Option[SalesorderheaderRow]] = { + val byId = selectByIds(salesorderids).view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheaderFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala index f6c039f5d5..184cd938cc 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala @@ -25,6 +25,7 @@ trait SalesorderheadersalesreasonRepo { def selectAll(implicit c: Connection): List[SalesorderheadersalesreasonRow] def selectById(compositeId: SalesorderheadersalesreasonId)(implicit c: Connection): Option[SalesorderheadersalesreasonRow] def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): List[SalesorderheadersalesreasonRow] + def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]] def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] def update(row: SalesorderheadersalesreasonRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesorderheadersalesreasonRow)(implicit c: Connection): SalesorderheadersalesreasonRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala index 6205a5b2a1..6c4a28f96c 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala @@ -105,6 +105,10 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.as(SalesorderheadersalesreasonRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilder("sales.salesorderheadersalesreason", SalesorderheadersalesreasonFields.structure, SalesorderheadersalesreasonRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala index c36bd9eef2..2404334aed 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala @@ -67,6 +67,10 @@ class SalesorderheadersalesreasonRepoMock(toRow: Function1[Salesorderheadersales override def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): List[SalesorderheadersalesreasonRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheadersalesreasonFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala index 2a707c3ccf..307686119f 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala @@ -26,6 +26,7 @@ trait SalespersonRepo { def selectAll(implicit c: Connection): List[SalespersonRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[SalespersonRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[SalespersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[SalespersonRow]] def update: UpdateBuilder[SalespersonFields, SalespersonRow] def update(row: SalespersonRow)(implicit c: Connection): Boolean def upsert(unsaved: SalespersonRow)(implicit c: Connection): SalespersonRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala index f6b7d73400..6a6a9867fe 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala @@ -123,6 +123,10 @@ class SalespersonRepoImpl extends SalespersonRepo { """.as(SalespersonRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[SalespersonRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilder("sales.salesperson", SalespersonFields.structure, SalespersonRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala index f5df6f8aef..35ec7dacf6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala @@ -68,6 +68,10 @@ class SalespersonRepoMock(toRow: Function1[SalespersonRowUnsaved, SalespersonRow override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[SalespersonRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[SalespersonRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala index 53d681d025..708af087c7 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala @@ -25,6 +25,7 @@ trait SalespersonquotahistoryRepo { def selectAll(implicit c: Connection): List[SalespersonquotahistoryRow] def selectById(compositeId: SalespersonquotahistoryId)(implicit c: Connection): Option[SalespersonquotahistoryRow] def selectByIds(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): List[SalespersonquotahistoryRow] + def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]] def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] def update(row: SalespersonquotahistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: SalespersonquotahistoryRow)(implicit c: Connection): SalespersonquotahistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala index 09568af238..4d69c014b2 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala @@ -111,6 +111,10 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.as(SalespersonquotahistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilder("sales.salespersonquotahistory", SalespersonquotahistoryFields.structure, SalespersonquotahistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala index bfb8dee58d..3b7eddcce1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala @@ -67,6 +67,10 @@ class SalespersonquotahistoryRepoMock(toRow: Function1[SalespersonquotahistoryRo override def selectByIds(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): List[SalespersonquotahistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonquotahistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala index 8ff89cf70d..b40c151814 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala @@ -25,6 +25,7 @@ trait SalesreasonRepo { def selectAll(implicit c: Connection): List[SalesreasonRow] def selectById(salesreasonid: SalesreasonId)(implicit c: Connection): Option[SalesreasonRow] def selectByIds(salesreasonids: Array[SalesreasonId])(implicit c: Connection): List[SalesreasonRow] + def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, Option[SalesreasonRow]] def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] def update(row: SalesreasonRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesreasonRow)(implicit c: Connection): SalesreasonRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala index 2b9933bca6..5ce02d8cf8 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala @@ -102,6 +102,10 @@ class SalesreasonRepoImpl extends SalesreasonRepo { """.as(SalesreasonRow.rowParser(1).*) } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, Option[SalesreasonRow]] = { + val byId = selectByIds(salesreasonids).view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilder("sales.salesreason", SalesreasonFields.structure, SalesreasonRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala index 172f09129e..969fd57166 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala @@ -67,6 +67,10 @@ class SalesreasonRepoMock(toRow: Function1[SalesreasonRowUnsaved, SalesreasonRow override def selectByIds(salesreasonids: Array[SalesreasonId])(implicit c: Connection): List[SalesreasonRow] = { salesreasonids.flatMap(map.get).toList } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, Option[SalesreasonRow]] = { + val byId = selectByIds(salesreasonids).view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesreasonFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala index a45c1fdb2a..0c4c6e8c1d 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala @@ -25,6 +25,7 @@ trait SalestaxrateRepo { def selectAll(implicit c: Connection): List[SalestaxrateRow] def selectById(salestaxrateid: SalestaxrateId)(implicit c: Connection): Option[SalestaxrateRow] def selectByIds(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): List[SalestaxrateRow] + def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, Option[SalestaxrateRow]] def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] def update(row: SalestaxrateRow)(implicit c: Connection): Boolean def upsert(unsaved: SalestaxrateRow)(implicit c: Connection): SalestaxrateRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala index edb055b31e..278666981e 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala @@ -115,6 +115,10 @@ class SalestaxrateRepoImpl extends SalestaxrateRepo { """.as(SalestaxrateRow.rowParser(1).*) } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, Option[SalestaxrateRow]] = { + val byId = selectByIds(salestaxrateids).view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilder("sales.salestaxrate", SalestaxrateFields.structure, SalestaxrateRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala index 38940853ff..fb7292489c 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala @@ -67,6 +67,10 @@ class SalestaxrateRepoMock(toRow: Function1[SalestaxrateRowUnsaved, Salestaxrate override def selectByIds(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): List[SalestaxrateRow] = { salestaxrateids.flatMap(map.get).toList } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, Option[SalestaxrateRow]] = { + val byId = selectByIds(salestaxrateids).view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilderMock(UpdateParams.empty, SalestaxrateFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala index 604c657427..29e546c1a3 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala @@ -25,6 +25,7 @@ trait SalesterritoryRepo { def selectAll(implicit c: Connection): List[SalesterritoryRow] def selectById(territoryid: SalesterritoryId)(implicit c: Connection): Option[SalesterritoryRow] def selectByIds(territoryids: Array[SalesterritoryId])(implicit c: Connection): List[SalesterritoryRow] + def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, Option[SalesterritoryRow]] def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] def update(row: SalesterritoryRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesterritoryRow)(implicit c: Connection): SalesterritoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala index dec1de8b42..7550f447b1 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala @@ -126,6 +126,10 @@ class SalesterritoryRepoImpl extends SalesterritoryRepo { """.as(SalesterritoryRow.rowParser(1).*) } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, Option[SalesterritoryRow]] = { + val byId = selectByIds(territoryids).view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilder("sales.salesterritory", SalesterritoryFields.structure, SalesterritoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala index 108eb25b33..6d14fd6fb9 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala @@ -67,6 +67,10 @@ class SalesterritoryRepoMock(toRow: Function1[SalesterritoryRowUnsaved, Salester override def selectByIds(territoryids: Array[SalesterritoryId])(implicit c: Connection): List[SalesterritoryRow] = { territoryids.flatMap(map.get).toList } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, Option[SalesterritoryRow]] = { + val byId = selectByIds(territoryids).view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala index f6f76eb0b1..04b12edc91 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala @@ -25,6 +25,7 @@ trait SalesterritoryhistoryRepo { def selectAll(implicit c: Connection): List[SalesterritoryhistoryRow] def selectById(compositeId: SalesterritoryhistoryId)(implicit c: Connection): Option[SalesterritoryhistoryRow] def selectByIds(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): List[SalesterritoryhistoryRow] + def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]] def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] def update(row: SalesterritoryhistoryRow)(implicit c: Connection): Boolean def upsert(unsaved: SalesterritoryhistoryRow)(implicit c: Connection): SalesterritoryhistoryRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala index 175f0ec955..5bdad31bb6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala @@ -115,6 +115,10 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.as(SalesterritoryhistoryRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilder("sales.salesterritoryhistory", SalesterritoryhistoryFields.structure, SalesterritoryhistoryRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala index 4d200b81bf..9d58626621 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala @@ -67,6 +67,10 @@ class SalesterritoryhistoryRepoMock(toRow: Function1[SalesterritoryhistoryRowUns override def selectByIds(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): List[SalesterritoryhistoryRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryhistoryFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala index 054ba82264..0acd901821 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala @@ -25,6 +25,7 @@ trait ShoppingcartitemRepo { def selectAll(implicit c: Connection): List[ShoppingcartitemRow] def selectById(shoppingcartitemid: ShoppingcartitemId)(implicit c: Connection): Option[ShoppingcartitemRow] def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): List[ShoppingcartitemRow] + def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, Option[ShoppingcartitemRow]] def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] def update(row: ShoppingcartitemRow)(implicit c: Connection): Boolean def upsert(unsaved: ShoppingcartitemRow)(implicit c: Connection): ShoppingcartitemRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala index cf3c09fbdc..015b4b8843 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala @@ -111,6 +111,10 @@ class ShoppingcartitemRepoImpl extends ShoppingcartitemRepo { """.as(ShoppingcartitemRow.rowParser(1).*) } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, Option[ShoppingcartitemRow]] = { + val byId = selectByIds(shoppingcartitemids).view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilder("sales.shoppingcartitem", ShoppingcartitemFields.structure, ShoppingcartitemRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala index a6b85021d8..18a73ed447 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala @@ -67,6 +67,10 @@ class ShoppingcartitemRepoMock(toRow: Function1[ShoppingcartitemRowUnsaved, Shop override def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): List[ShoppingcartitemRow] = { shoppingcartitemids.flatMap(map.get).toList } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, Option[ShoppingcartitemRow]] = { + val byId = selectByIds(shoppingcartitemids).view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilderMock(UpdateParams.empty, ShoppingcartitemFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala index 06b37b2314..c083445b00 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala @@ -25,6 +25,7 @@ trait SpecialofferRepo { def selectAll(implicit c: Connection): List[SpecialofferRow] def selectById(specialofferid: SpecialofferId)(implicit c: Connection): Option[SpecialofferRow] def selectByIds(specialofferids: Array[SpecialofferId])(implicit c: Connection): List[SpecialofferRow] + def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, Option[SpecialofferRow]] def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] def update(row: SpecialofferRow)(implicit c: Connection): Boolean def upsert(unsaved: SpecialofferRow)(implicit c: Connection): SpecialofferRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala index 6a74baacb1..7c28ff77fd 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala @@ -120,6 +120,10 @@ class SpecialofferRepoImpl extends SpecialofferRepo { """.as(SpecialofferRow.rowParser(1).*) } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, Option[SpecialofferRow]] = { + val byId = selectByIds(specialofferids).view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilder("sales.specialoffer", SpecialofferFields.structure, SpecialofferRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala index a019a1ef22..1ccc5d4734 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala @@ -67,6 +67,10 @@ class SpecialofferRepoMock(toRow: Function1[SpecialofferRowUnsaved, Specialoffer override def selectByIds(specialofferids: Array[SpecialofferId])(implicit c: Connection): List[SpecialofferRow] = { specialofferids.flatMap(map.get).toList } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, Option[SpecialofferRow]] = { + val byId = selectByIds(specialofferids).view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala index 59f00d9ba2..43652f3a70 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala @@ -25,6 +25,7 @@ trait SpecialofferproductRepo { def selectAll(implicit c: Connection): List[SpecialofferproductRow] def selectById(compositeId: SpecialofferproductId)(implicit c: Connection): Option[SpecialofferproductRow] def selectByIds(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): List[SpecialofferproductRow] + def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, Option[SpecialofferproductRow]] def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] def update(row: SpecialofferproductRow)(implicit c: Connection): Boolean def upsert(unsaved: SpecialofferproductRow)(implicit c: Connection): SpecialofferproductRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala index aac07de69b..7364dc34a6 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala @@ -110,6 +110,10 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.as(SpecialofferproductRow.rowParser(1).*) } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, Option[SpecialofferproductRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilder("sales.specialofferproduct", SpecialofferproductFields.structure, SpecialofferproductRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala index 6561b424e2..c15c0407a0 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala @@ -67,6 +67,10 @@ class SpecialofferproductRepoMock(toRow: Function1[SpecialofferproductRowUnsaved override def selectByIds(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): List[SpecialofferproductRow] = { compositeIds.flatMap(map.get).toList } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, Option[SpecialofferproductRow]] = { + val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferproductFields.structure.fields, map) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala index 29b74373cb..b1606a1173 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala @@ -26,6 +26,7 @@ trait StoreRepo { def selectAll(implicit c: Connection): List[StoreRow] def selectById(businessentityid: BusinessentityId)(implicit c: Connection): Option[StoreRow] def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[StoreRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[StoreRow]] def update: UpdateBuilder[StoreFields, StoreRow] def update(row: StoreRow)(implicit c: Connection): Boolean def upsert(unsaved: StoreRow)(implicit c: Connection): StoreRow diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala index 1c82b6f2b5..e06bdfee83 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala @@ -108,6 +108,10 @@ class StoreRepoImpl extends StoreRepo { """.as(StoreRow.rowParser(1).*) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[StoreRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilder("sales.store", StoreFields.structure, StoreRow.rowParser) } diff --git a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala index 3c0f998307..f8f98c2a72 100644 --- a/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala +++ b/typo-tester-anorm/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala @@ -68,6 +68,10 @@ class StoreRepoMock(toRow: Function1[StoreRowUnsaved, StoreRow], override def selectByIds(businessentityids: Array[BusinessentityId])(implicit c: Connection): List[StoreRow] = { businessentityids.flatMap(map.get).toList } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[StoreRow]] = { + val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilderMock(UpdateParams.empty, StoreFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala index 91c2566d19..01b156f745 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala @@ -26,6 +26,7 @@ trait DepartmentRepo { def selectAll: Stream[ConnectionIO, DepartmentRow] def selectById(departmentid: DepartmentId): ConnectionIO[Option[DepartmentRow]] def selectByIds(departmentids: Array[DepartmentId]): Stream[ConnectionIO, DepartmentRow] + def selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, Option[DepartmentRow]]] def update: UpdateBuilder[DepartmentFields, DepartmentRow] def update(row: DepartmentRow): ConnectionIO[Boolean] def upsert(unsaved: DepartmentRow): ConnectionIO[DepartmentRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala index 94e102fae9..8664439de3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala @@ -85,6 +85,12 @@ class DepartmentRepoImpl extends DepartmentRepo { override def selectByIds(departmentids: Array[DepartmentId]): Stream[ConnectionIO, DepartmentRow] = { sql"""select "departmentid", "name", "groupname", "modifieddate"::text from humanresources.department where "departmentid" = ANY(${departmentids})""".query(using DepartmentRow.read).stream } + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, Option[DepartmentRow]]] = { + selectByIds(departmentids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilder("humanresources.department", DepartmentFields.structure, DepartmentRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala index bd3d4063c5..19baf6ab58 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala @@ -79,6 +79,12 @@ class DepartmentRepoMock(toRow: Function1[DepartmentRowUnsaved, DepartmentRow], override def selectByIds(departmentids: Array[DepartmentId]): Stream[ConnectionIO, DepartmentRow] = { Stream.emits(departmentids.flatMap(map.get).toList) } + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, Option[DepartmentRow]]] = { + selectByIds(departmentids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilderMock(UpdateParams.empty, DepartmentFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala index 6beb27a34e..944d8d05c6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala @@ -27,6 +27,7 @@ trait EmployeeRepo { def selectAll: Stream[ConnectionIO, EmployeeRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[EmployeeRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, EmployeeRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[EmployeeRow]]] def update: UpdateBuilder[EmployeeFields, EmployeeRow] def update(row: EmployeeRow): ConnectionIO[Boolean] def upsert(unsaved: EmployeeRow): ConnectionIO[EmployeeRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala index b9b15eae3a..bb11062c48 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala @@ -116,6 +116,12 @@ class EmployeeRepoImpl extends EmployeeRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, EmployeeRow] = { sql"""select "businessentityid", "nationalidnumber", "loginid", "jobtitle", "birthdate"::text, "maritalstatus", "gender", "hiredate"::text, "salariedflag", "vacationhours", "sickleavehours", "currentflag", "rowguid", "modifieddate"::text, "organizationnode" from humanresources.employee where "businessentityid" = ANY(${businessentityids})""".query(using EmployeeRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[EmployeeRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilder("humanresources.employee", EmployeeFields.structure, EmployeeRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala index ee0c06687e..85ed3c21e3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala @@ -80,6 +80,12 @@ class EmployeeRepoMock(toRow: Function1[EmployeeRowUnsaved, EmployeeRow], override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, EmployeeRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[EmployeeRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeeFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala index b8050ac99d..ed79a3b387 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala @@ -26,6 +26,7 @@ trait EmployeedepartmenthistoryRepo { def selectAll: Stream[ConnectionIO, EmployeedepartmenthistoryRow] def selectById(compositeId: EmployeedepartmenthistoryId): ConnectionIO[Option[EmployeedepartmenthistoryRow]] def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId]): Stream[ConnectionIO, EmployeedepartmenthistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] def update(row: EmployeedepartmenthistoryRow): ConnectionIO[Boolean] def upsert(unsaved: EmployeedepartmenthistoryRow): ConnectionIO[EmployeedepartmenthistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala index 2102126c5c..03374e57f8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala @@ -105,6 +105,12 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.query(using EmployeedepartmenthistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilder("humanresources.employeedepartmenthistory", EmployeedepartmenthistoryFields.structure, EmployeedepartmenthistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala index 188a20649d..65dd166603 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala @@ -79,6 +79,12 @@ class EmployeedepartmenthistoryRepoMock(toRow: Function1[Employeedepartmenthisto override def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId]): Stream[ConnectionIO, EmployeedepartmenthistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeedepartmenthistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala index 54babdbc54..e354c9651a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala @@ -26,6 +26,7 @@ trait EmployeepayhistoryRepo { def selectAll: Stream[ConnectionIO, EmployeepayhistoryRow] def selectById(compositeId: EmployeepayhistoryId): ConnectionIO[Option[EmployeepayhistoryRow]] def selectByIds(compositeIds: Array[EmployeepayhistoryId]): Stream[ConnectionIO, EmployeepayhistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] def update(row: EmployeepayhistoryRow): ConnectionIO[Boolean] def upsert(unsaved: EmployeepayhistoryRow): ConnectionIO[EmployeepayhistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala index 9db4a61ec5..4b6220be78 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala @@ -99,6 +99,12 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.query(using EmployeepayhistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilder("humanresources.employeepayhistory", EmployeepayhistoryFields.structure, EmployeepayhistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala index 5cd7951d16..633f1bc058 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala @@ -79,6 +79,12 @@ class EmployeepayhistoryRepoMock(toRow: Function1[EmployeepayhistoryRowUnsaved, override def selectByIds(compositeIds: Array[EmployeepayhistoryId]): Stream[ConnectionIO, EmployeepayhistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeepayhistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala index d27377f648..dbe24084a5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala @@ -26,6 +26,7 @@ trait JobcandidateRepo { def selectAll: Stream[ConnectionIO, JobcandidateRow] def selectById(jobcandidateid: JobcandidateId): ConnectionIO[Option[JobcandidateRow]] def selectByIds(jobcandidateids: Array[JobcandidateId]): Stream[ConnectionIO, JobcandidateRow] + def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, Option[JobcandidateRow]]] def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] def update(row: JobcandidateRow): ConnectionIO[Boolean] def upsert(unsaved: JobcandidateRow): ConnectionIO[JobcandidateRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala index 469a4980cf..e3ac6218cb 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala @@ -86,6 +86,12 @@ class JobcandidateRepoImpl extends JobcandidateRepo { override def selectByIds(jobcandidateids: Array[JobcandidateId]): Stream[ConnectionIO, JobcandidateRow] = { sql"""select "jobcandidateid", "businessentityid", "resume", "modifieddate"::text from humanresources.jobcandidate where "jobcandidateid" = ANY(${jobcandidateids})""".query(using JobcandidateRow.read).stream } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, Option[JobcandidateRow]]] = { + selectByIds(jobcandidateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilder("humanresources.jobcandidate", JobcandidateFields.structure, JobcandidateRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala index 910b64a476..4c18b3c3f2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala @@ -79,6 +79,12 @@ class JobcandidateRepoMock(toRow: Function1[JobcandidateRowUnsaved, Jobcandidate override def selectByIds(jobcandidateids: Array[JobcandidateId]): Stream[ConnectionIO, JobcandidateRow] = { Stream.emits(jobcandidateids.flatMap(map.get).toList) } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, Option[JobcandidateRow]]] = { + selectByIds(jobcandidateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilderMock(UpdateParams.empty, JobcandidateFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala index a53f340e2e..62c0758f00 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala @@ -26,6 +26,7 @@ trait ShiftRepo { def selectAll: Stream[ConnectionIO, ShiftRow] def selectById(shiftid: ShiftId): ConnectionIO[Option[ShiftRow]] def selectByIds(shiftids: Array[ShiftId]): Stream[ConnectionIO, ShiftRow] + def selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, Option[ShiftRow]]] def update: UpdateBuilder[ShiftFields, ShiftRow] def update(row: ShiftRow): ConnectionIO[Boolean] def upsert(unsaved: ShiftRow): ConnectionIO[ShiftRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala index 95cc2723b0..141903e3c8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala @@ -87,6 +87,12 @@ class ShiftRepoImpl extends ShiftRepo { override def selectByIds(shiftids: Array[ShiftId]): Stream[ConnectionIO, ShiftRow] = { sql"""select "shiftid", "name", "starttime"::text, "endtime"::text, "modifieddate"::text from humanresources.shift where "shiftid" = ANY(${shiftids})""".query(using ShiftRow.read).stream } + override def selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, Option[ShiftRow]]] = { + selectByIds(shiftids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilder("humanresources.shift", ShiftFields.structure, ShiftRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala index 616b741320..53ed01270c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala @@ -79,6 +79,12 @@ class ShiftRepoMock(toRow: Function1[ShiftRowUnsaved, ShiftRow], override def selectByIds(shiftids: Array[ShiftId]): Stream[ConnectionIO, ShiftRow] = { Stream.emits(shiftids.flatMap(map.get).toList) } + override def selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, Option[ShiftRow]]] = { + selectByIds(shiftids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilderMock(UpdateParams.empty, ShiftFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala index 051dea6d46..6a8d402579 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala @@ -26,6 +26,7 @@ trait AddressRepo { def selectAll: Stream[ConnectionIO, AddressRow] def selectById(addressid: AddressId): ConnectionIO[Option[AddressRow]] def selectByIds(addressids: Array[AddressId]): Stream[ConnectionIO, AddressRow] + def selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, Option[AddressRow]]] def update: UpdateBuilder[AddressFields, AddressRow] def update(row: AddressRow): ConnectionIO[Boolean] def upsert(unsaved: AddressRow): ConnectionIO[AddressRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala index ea0f0c0a5f..7f97a73d4a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala @@ -96,6 +96,12 @@ class AddressRepoImpl extends AddressRepo { override def selectByIds(addressids: Array[AddressId]): Stream[ConnectionIO, AddressRow] = { sql"""select "addressid", "addressline1", "addressline2", "city", "stateprovinceid", "postalcode", "spatiallocation", "rowguid", "modifieddate"::text from person.address where "addressid" = ANY(${addressids})""".query(using AddressRow.read).stream } + override def selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, Option[AddressRow]]] = { + selectByIds(addressids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilder("person.address", AddressFields.structure, AddressRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala index f4e40f3a15..65667999a0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala @@ -79,6 +79,12 @@ class AddressRepoMock(toRow: Function1[AddressRowUnsaved, AddressRow], override def selectByIds(addressids: Array[AddressId]): Stream[ConnectionIO, AddressRow] = { Stream.emits(addressids.flatMap(map.get).toList) } + override def selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, Option[AddressRow]]] = { + selectByIds(addressids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilderMock(UpdateParams.empty, AddressFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala index 24104e3e20..149b13a1e1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala @@ -26,6 +26,7 @@ trait AddresstypeRepo { def selectAll: Stream[ConnectionIO, AddresstypeRow] def selectById(addresstypeid: AddresstypeId): ConnectionIO[Option[AddresstypeRow]] def selectByIds(addresstypeids: Array[AddresstypeId]): Stream[ConnectionIO, AddresstypeRow] + def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, Option[AddresstypeRow]]] def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] def update(row: AddresstypeRow): ConnectionIO[Boolean] def upsert(unsaved: AddresstypeRow): ConnectionIO[AddresstypeRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala index 26fcfaca40..dbe763113b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala @@ -89,6 +89,12 @@ class AddresstypeRepoImpl extends AddresstypeRepo { override def selectByIds(addresstypeids: Array[AddresstypeId]): Stream[ConnectionIO, AddresstypeRow] = { sql"""select "addresstypeid", "name", "rowguid", "modifieddate"::text from person.addresstype where "addresstypeid" = ANY(${addresstypeids})""".query(using AddresstypeRow.read).stream } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, Option[AddresstypeRow]]] = { + selectByIds(addresstypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilder("person.addresstype", AddresstypeFields.structure, AddresstypeRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala index 4b220da9a9..a6ce3ad29c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala @@ -79,6 +79,12 @@ class AddresstypeRepoMock(toRow: Function1[AddresstypeRowUnsaved, AddresstypeRow override def selectByIds(addresstypeids: Array[AddresstypeId]): Stream[ConnectionIO, AddresstypeRow] = { Stream.emits(addresstypeids.flatMap(map.get).toList) } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, Option[AddresstypeRow]]] = { + selectByIds(addresstypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilderMock(UpdateParams.empty, AddresstypeFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala index c54f58a002..478b9654a5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala @@ -26,6 +26,7 @@ trait BusinessentityRepo { def selectAll: Stream[ConnectionIO, BusinessentityRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[BusinessentityRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, BusinessentityRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[BusinessentityRow]]] def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] def update(row: BusinessentityRow): ConnectionIO[Boolean] def upsert(unsaved: BusinessentityRow): ConnectionIO[BusinessentityRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala index ccb7991a03..f5136f1a29 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala @@ -87,6 +87,12 @@ class BusinessentityRepoImpl extends BusinessentityRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, BusinessentityRow] = { sql"""select "businessentityid", "rowguid", "modifieddate"::text from person.businessentity where "businessentityid" = ANY(${businessentityids})""".query(using BusinessentityRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[BusinessentityRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilder("person.businessentity", BusinessentityFields.structure, BusinessentityRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala index b2261f81e7..ce4a43cd2a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala @@ -79,6 +79,12 @@ class BusinessentityRepoMock(toRow: Function1[BusinessentityRowUnsaved, Business override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, BusinessentityRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[BusinessentityRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala index 40f8627505..bdb93879a7 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala @@ -26,6 +26,7 @@ trait BusinessentityaddressRepo { def selectAll: Stream[ConnectionIO, BusinessentityaddressRow] def selectById(compositeId: BusinessentityaddressId): ConnectionIO[Option[BusinessentityaddressRow]] def selectByIds(compositeIds: Array[BusinessentityaddressId]): Stream[ConnectionIO, BusinessentityaddressRow] + def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] def update(row: BusinessentityaddressRow): ConnectionIO[Boolean] def upsert(unsaved: BusinessentityaddressRow): ConnectionIO[BusinessentityaddressRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala index 602dc88b0f..28c4777808 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala @@ -105,6 +105,12 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.query(using BusinessentityaddressRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilder("person.businessentityaddress", BusinessentityaddressFields.structure, BusinessentityaddressRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala index 32a614bc50..0c43e625db 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala @@ -79,6 +79,12 @@ class BusinessentityaddressRepoMock(toRow: Function1[BusinessentityaddressRowUns override def selectByIds(compositeIds: Array[BusinessentityaddressId]): Stream[ConnectionIO, BusinessentityaddressRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityaddressFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala index 673eac96af..305478fb91 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala @@ -26,6 +26,7 @@ trait BusinessentitycontactRepo { def selectAll: Stream[ConnectionIO, BusinessentitycontactRow] def selectById(compositeId: BusinessentitycontactId): ConnectionIO[Option[BusinessentitycontactRow]] def selectByIds(compositeIds: Array[BusinessentitycontactId]): Stream[ConnectionIO, BusinessentitycontactRow] + def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] def update(row: BusinessentitycontactRow): ConnectionIO[Boolean] def upsert(unsaved: BusinessentitycontactRow): ConnectionIO[BusinessentitycontactRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala index de87e4fe44..1ef4e9280d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala @@ -104,6 +104,12 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.query(using BusinessentitycontactRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilder("person.businessentitycontact", BusinessentitycontactFields.structure, BusinessentitycontactRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala index aa5ed2de4f..1f33872a2e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala @@ -79,6 +79,12 @@ class BusinessentitycontactRepoMock(toRow: Function1[BusinessentitycontactRowUns override def selectByIds(compositeIds: Array[BusinessentitycontactId]): Stream[ConnectionIO, BusinessentitycontactRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentitycontactFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala index 600095a261..7beace49f1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala @@ -26,6 +26,7 @@ trait ContacttypeRepo { def selectAll: Stream[ConnectionIO, ContacttypeRow] def selectById(contacttypeid: ContacttypeId): ConnectionIO[Option[ContacttypeRow]] def selectByIds(contacttypeids: Array[ContacttypeId]): Stream[ConnectionIO, ContacttypeRow] + def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, Option[ContacttypeRow]]] def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] def update(row: ContacttypeRow): ConnectionIO[Boolean] def upsert(unsaved: ContacttypeRow): ConnectionIO[ContacttypeRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala index 475ddf0507..1ae242e930 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala @@ -84,6 +84,12 @@ class ContacttypeRepoImpl extends ContacttypeRepo { override def selectByIds(contacttypeids: Array[ContacttypeId]): Stream[ConnectionIO, ContacttypeRow] = { sql"""select "contacttypeid", "name", "modifieddate"::text from person.contacttype where "contacttypeid" = ANY(${contacttypeids})""".query(using ContacttypeRow.read).stream } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, Option[ContacttypeRow]]] = { + selectByIds(contacttypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilder("person.contacttype", ContacttypeFields.structure, ContacttypeRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala index 762ed3e14d..363f52575d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala @@ -79,6 +79,12 @@ class ContacttypeRepoMock(toRow: Function1[ContacttypeRowUnsaved, ContacttypeRow override def selectByIds(contacttypeids: Array[ContacttypeId]): Stream[ConnectionIO, ContacttypeRow] = { Stream.emits(contacttypeids.flatMap(map.get).toList) } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, Option[ContacttypeRow]]] = { + selectByIds(contacttypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilderMock(UpdateParams.empty, ContacttypeFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala index 89d0f32521..0458fd5014 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala @@ -26,6 +26,7 @@ trait CountryregionRepo { def selectAll: Stream[ConnectionIO, CountryregionRow] def selectById(countryregioncode: CountryregionId): ConnectionIO[Option[CountryregionRow]] def selectByIds(countryregioncodes: Array[CountryregionId]): Stream[ConnectionIO, CountryregionRow] + def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, Option[CountryregionRow]]] def update: UpdateBuilder[CountryregionFields, CountryregionRow] def update(row: CountryregionRow): ConnectionIO[Boolean] def upsert(unsaved: CountryregionRow): ConnectionIO[CountryregionRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala index 138fbed268..ad033e94cc 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala @@ -81,6 +81,12 @@ class CountryregionRepoImpl extends CountryregionRepo { override def selectByIds(countryregioncodes: Array[CountryregionId]): Stream[ConnectionIO, CountryregionRow] = { sql"""select "countryregioncode", "name", "modifieddate"::text from person.countryregion where "countryregioncode" = ANY(${countryregioncodes})""".query(using CountryregionRow.read).stream } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, Option[CountryregionRow]]] = { + selectByIds(countryregioncodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilder("person.countryregion", CountryregionFields.structure, CountryregionRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala index 0e1eb1491d..a264373cec 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala @@ -79,6 +79,12 @@ class CountryregionRepoMock(toRow: Function1[CountryregionRowUnsaved, Countryreg override def selectByIds(countryregioncodes: Array[CountryregionId]): Stream[ConnectionIO, CountryregionRow] = { Stream.emits(countryregioncodes.flatMap(map.get).toList) } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, Option[CountryregionRow]]] = { + selectByIds(countryregioncodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregionFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala index a64c22bcbb..50d56ecd3b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala @@ -26,6 +26,7 @@ trait EmailaddressRepo { def selectAll: Stream[ConnectionIO, EmailaddressRow] def selectById(compositeId: EmailaddressId): ConnectionIO[Option[EmailaddressRow]] def selectByIds(compositeIds: Array[EmailaddressId]): Stream[ConnectionIO, EmailaddressRow] + def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, Option[EmailaddressRow]]] def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] def update(row: EmailaddressRow): ConnectionIO[Boolean] def upsert(unsaved: EmailaddressRow): ConnectionIO[EmailaddressRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala index ef7e9ed4d3..d6b7ef3ccf 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala @@ -105,6 +105,12 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.query(using EmailaddressRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, Option[EmailaddressRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilder("person.emailaddress", EmailaddressFields.structure, EmailaddressRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala index 6b845185ff..26c754046b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala @@ -79,6 +79,12 @@ class EmailaddressRepoMock(toRow: Function1[EmailaddressRowUnsaved, Emailaddress override def selectByIds(compositeIds: Array[EmailaddressId]): Stream[ConnectionIO, EmailaddressRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, Option[EmailaddressRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilderMock(UpdateParams.empty, EmailaddressFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala index ccdf60f4aa..70de8db32b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala @@ -27,6 +27,7 @@ trait PasswordRepo { def selectAll: Stream[ConnectionIO, PasswordRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[PasswordRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PasswordRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PasswordRow]]] def update: UpdateBuilder[PasswordFields, PasswordRow] def update(row: PasswordRow): ConnectionIO[Boolean] def upsert(unsaved: PasswordRow): ConnectionIO[PasswordRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala index 587e33f1a4..debd41f294 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala @@ -88,6 +88,12 @@ class PasswordRepoImpl extends PasswordRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PasswordRow] = { sql"""select "businessentityid", "passwordhash", "passwordsalt", "rowguid", "modifieddate"::text from person.password where "businessentityid" = ANY(${businessentityids})""".query(using PasswordRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PasswordRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilder("person.password", PasswordFields.structure, PasswordRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala index 226bcc7e94..d2b6e7925b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala @@ -80,6 +80,12 @@ class PasswordRepoMock(toRow: Function1[PasswordRowUnsaved, PasswordRow], override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PasswordRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PasswordRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilderMock(UpdateParams.empty, PasswordFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala index c0c0e8bbdd..557c945432 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala @@ -27,6 +27,7 @@ trait PersonRepo { def selectAll: Stream[ConnectionIO, PersonRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[PersonRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ConnectionIO[Boolean] def upsert(unsaved: PersonRow): ConnectionIO[PersonRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala index 5bd5e8aa00..77034d873a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala @@ -106,6 +106,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PersonRow] = { sql"""select "businessentityid", "persontype", "namestyle", "title", "firstname", "middlename", "lastname", "suffix", "emailpromotion", "additionalcontactinfo", "demographics", "rowguid", "modifieddate"::text from person.person where "businessentityid" = ANY(${businessentityids})""".query(using PersonRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PersonRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("person.person", PersonFields.structure, PersonRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala index 4355259b5f..f5870e67c3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala @@ -80,6 +80,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, PersonRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[PersonRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala index ca26434225..312cc411a2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala @@ -26,6 +26,7 @@ trait PersonphoneRepo { def selectAll: Stream[ConnectionIO, PersonphoneRow] def selectById(compositeId: PersonphoneId): ConnectionIO[Option[PersonphoneRow]] def selectByIds(compositeIds: Array[PersonphoneId]): Stream[ConnectionIO, PersonphoneRow] + def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, Option[PersonphoneRow]]] def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] def update(row: PersonphoneRow): ConnectionIO[Boolean] def upsert(unsaved: PersonphoneRow): ConnectionIO[PersonphoneRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala index 34931d6146..e17df642a8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala @@ -100,6 +100,12 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.query(using PersonphoneRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, Option[PersonphoneRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilder("person.personphone", PersonphoneFields.structure, PersonphoneRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala index c11ba06580..9bbf4a04df 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala @@ -79,6 +79,12 @@ class PersonphoneRepoMock(toRow: Function1[PersonphoneRowUnsaved, PersonphoneRow override def selectByIds(compositeIds: Array[PersonphoneId]): Stream[ConnectionIO, PersonphoneRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, Option[PersonphoneRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilderMock(UpdateParams.empty, PersonphoneFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala index 99dd328721..d80fa53d02 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala @@ -26,6 +26,7 @@ trait PhonenumbertypeRepo { def selectAll: Stream[ConnectionIO, PhonenumbertypeRow] def selectById(phonenumbertypeid: PhonenumbertypeId): ConnectionIO[Option[PhonenumbertypeRow]] def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): Stream[ConnectionIO, PhonenumbertypeRow] + def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] def update(row: PhonenumbertypeRow): ConnectionIO[Boolean] def upsert(unsaved: PhonenumbertypeRow): ConnectionIO[PhonenumbertypeRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala index 2d8c42e9e1..4c333af141 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala @@ -84,6 +84,12 @@ class PhonenumbertypeRepoImpl extends PhonenumbertypeRepo { override def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): Stream[ConnectionIO, PhonenumbertypeRow] = { sql"""select "phonenumbertypeid", "name", "modifieddate"::text from person.phonenumbertype where "phonenumbertypeid" = ANY(${phonenumbertypeids})""".query(using PhonenumbertypeRow.read).stream } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] = { + selectByIds(phonenumbertypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilder("person.phonenumbertype", PhonenumbertypeFields.structure, PhonenumbertypeRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala index d8044b2091..90bbab73c6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala @@ -79,6 +79,12 @@ class PhonenumbertypeRepoMock(toRow: Function1[PhonenumbertypeRowUnsaved, Phonen override def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): Stream[ConnectionIO, PhonenumbertypeRow] = { Stream.emits(phonenumbertypeids.flatMap(map.get).toList) } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] = { + selectByIds(phonenumbertypeids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilderMock(UpdateParams.empty, PhonenumbertypeFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala index 97fac0c9c6..5becb9256a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala @@ -26,6 +26,7 @@ trait StateprovinceRepo { def selectAll: Stream[ConnectionIO, StateprovinceRow] def selectById(stateprovinceid: StateprovinceId): ConnectionIO[Option[StateprovinceRow]] def selectByIds(stateprovinceids: Array[StateprovinceId]): Stream[ConnectionIO, StateprovinceRow] + def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, Option[StateprovinceRow]]] def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] def update(row: StateprovinceRow): ConnectionIO[Boolean] def upsert(unsaved: StateprovinceRow): ConnectionIO[StateprovinceRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala index f7865a546f..e921b1e4f9 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala @@ -100,6 +100,12 @@ class StateprovinceRepoImpl extends StateprovinceRepo { override def selectByIds(stateprovinceids: Array[StateprovinceId]): Stream[ConnectionIO, StateprovinceRow] = { sql"""select "stateprovinceid", "stateprovincecode", "countryregioncode", "isonlystateprovinceflag", "name", "territoryid", "rowguid", "modifieddate"::text from person.stateprovince where "stateprovinceid" = ANY(${stateprovinceids})""".query(using StateprovinceRow.read).stream } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, Option[StateprovinceRow]]] = { + selectByIds(stateprovinceids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilder("person.stateprovince", StateprovinceFields.structure, StateprovinceRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala index bfc38fbeb5..e9217ef084 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala @@ -79,6 +79,12 @@ class StateprovinceRepoMock(toRow: Function1[StateprovinceRowUnsaved, Stateprovi override def selectByIds(stateprovinceids: Array[StateprovinceId]): Stream[ConnectionIO, StateprovinceRow] = { Stream.emits(stateprovinceids.flatMap(map.get).toList) } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, Option[StateprovinceRow]]] = { + selectByIds(stateprovinceids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilderMock(UpdateParams.empty, StateprovinceFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala index e313c3ba3c..38121dca28 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala @@ -26,6 +26,7 @@ trait BillofmaterialsRepo { def selectAll: Stream[ConnectionIO, BillofmaterialsRow] def selectById(billofmaterialsid: Int): ConnectionIO[Option[BillofmaterialsRow]] def selectByIds(billofmaterialsids: Array[Int]): Stream[ConnectionIO, BillofmaterialsRow] + def selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, Option[BillofmaterialsRow]]] def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] def update(row: BillofmaterialsRow): ConnectionIO[Boolean] def upsert(unsaved: BillofmaterialsRow): ConnectionIO[BillofmaterialsRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala index 63f58bfe28..33c85bcb66 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala @@ -99,6 +99,12 @@ class BillofmaterialsRepoImpl extends BillofmaterialsRepo { override def selectByIds(billofmaterialsids: Array[Int]): Stream[ConnectionIO, BillofmaterialsRow] = { sql"""select "billofmaterialsid", "productassemblyid", "componentid", "startdate"::text, "enddate"::text, "unitmeasurecode", "bomlevel", "perassemblyqty", "modifieddate"::text from production.billofmaterials where "billofmaterialsid" = ANY(${billofmaterialsids})""".query(using BillofmaterialsRow.read).stream } + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, Option[BillofmaterialsRow]]] = { + selectByIds(billofmaterialsids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilder("production.billofmaterials", BillofmaterialsFields.structure, BillofmaterialsRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala index 9466b853a0..dcddb46506 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala @@ -79,6 +79,12 @@ class BillofmaterialsRepoMock(toRow: Function1[BillofmaterialsRowUnsaved, Billof override def selectByIds(billofmaterialsids: Array[Int]): Stream[ConnectionIO, BillofmaterialsRow] = { Stream.emits(billofmaterialsids.flatMap(map.get).toList) } + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, Option[BillofmaterialsRow]]] = { + selectByIds(billofmaterialsids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilderMock(UpdateParams.empty, BillofmaterialsFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala index b4f8f39356..2953930b8b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala @@ -26,6 +26,7 @@ trait CultureRepo { def selectAll: Stream[ConnectionIO, CultureRow] def selectById(cultureid: CultureId): ConnectionIO[Option[CultureRow]] def selectByIds(cultureids: Array[CultureId]): Stream[ConnectionIO, CultureRow] + def selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, Option[CultureRow]]] def update: UpdateBuilder[CultureFields, CultureRow] def update(row: CultureRow): ConnectionIO[Boolean] def upsert(unsaved: CultureRow): ConnectionIO[CultureRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala index 20e53e2326..4a33b2e48f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala @@ -81,6 +81,12 @@ class CultureRepoImpl extends CultureRepo { override def selectByIds(cultureids: Array[CultureId]): Stream[ConnectionIO, CultureRow] = { sql"""select "cultureid", "name", "modifieddate"::text from production.culture where "cultureid" = ANY(${cultureids})""".query(using CultureRow.read).stream } + override def selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, Option[CultureRow]]] = { + selectByIds(cultureids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilder("production.culture", CultureFields.structure, CultureRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala index 977157ede8..004c6e4fd6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala @@ -79,6 +79,12 @@ class CultureRepoMock(toRow: Function1[CultureRowUnsaved, CultureRow], override def selectByIds(cultureids: Array[CultureId]): Stream[ConnectionIO, CultureRow] = { Stream.emits(cultureids.flatMap(map.get).toList) } + override def selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, Option[CultureRow]]] = { + selectByIds(cultureids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilderMock(UpdateParams.empty, CultureFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala index f2ba095a47..e2c32c03b0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala @@ -27,6 +27,7 @@ trait DocumentRepo { def selectAll: Stream[ConnectionIO, DocumentRow] def selectById(documentnode: DocumentId): ConnectionIO[Option[DocumentRow]] def selectByIds(documentnodes: Array[DocumentId]): Stream[ConnectionIO, DocumentRow] + def selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, Option[DocumentRow]]] def selectByUniqueRowguid(rowguid: TypoUUID): ConnectionIO[Option[DocumentRow]] def update: UpdateBuilder[DocumentFields, DocumentRow] def update(row: DocumentRow): ConnectionIO[Boolean] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala index 15a9c2ca9d..5744e9563a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala @@ -108,6 +108,12 @@ class DocumentRepoImpl extends DocumentRepo { override def selectByIds(documentnodes: Array[DocumentId]): Stream[ConnectionIO, DocumentRow] = { sql"""select "title", "owner", "folderflag", "filename", "fileextension", "revision", "changenumber", "status", "documentsummary", "document", "rowguid", "modifieddate"::text, "documentnode" from production.document where "documentnode" = ANY(${documentnodes})""".query(using DocumentRow.read).stream } + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, Option[DocumentRow]]] = { + selectByIds(documentnodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueRowguid(rowguid: TypoUUID): ConnectionIO[Option[DocumentRow]] = { sql"""select "title", "owner", "folderflag", "filename", "fileextension", "revision", "changenumber", "status", "documentsummary", "document", "rowguid", "modifieddate"::text, "documentnode" from production.document diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala index 3dd30a4d66..9e4fc08c60 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala @@ -80,6 +80,12 @@ class DocumentRepoMock(toRow: Function1[DocumentRowUnsaved, DocumentRow], override def selectByIds(documentnodes: Array[DocumentId]): Stream[ConnectionIO, DocumentRow] = { Stream.emits(documentnodes.flatMap(map.get).toList) } + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, Option[DocumentRow]]] = { + selectByIds(documentnodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueRowguid(rowguid: TypoUUID): ConnectionIO[Option[DocumentRow]] = { delay(map.values.find(v => rowguid == v.rowguid)) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala index 6247195451..5949cda6cf 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala @@ -26,6 +26,7 @@ trait IllustrationRepo { def selectAll: Stream[ConnectionIO, IllustrationRow] def selectById(illustrationid: IllustrationId): ConnectionIO[Option[IllustrationRow]] def selectByIds(illustrationids: Array[IllustrationId]): Stream[ConnectionIO, IllustrationRow] + def selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, Option[IllustrationRow]]] def update: UpdateBuilder[IllustrationFields, IllustrationRow] def update(row: IllustrationRow): ConnectionIO[Boolean] def upsert(unsaved: IllustrationRow): ConnectionIO[IllustrationRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala index 35bb376707..17804b113e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala @@ -84,6 +84,12 @@ class IllustrationRepoImpl extends IllustrationRepo { override def selectByIds(illustrationids: Array[IllustrationId]): Stream[ConnectionIO, IllustrationRow] = { sql"""select "illustrationid", "diagram", "modifieddate"::text from production.illustration where "illustrationid" = ANY(${illustrationids})""".query(using IllustrationRow.read).stream } + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, Option[IllustrationRow]]] = { + selectByIds(illustrationids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilder("production.illustration", IllustrationFields.structure, IllustrationRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala index 8ad55b7f26..82f042b23e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala @@ -79,6 +79,12 @@ class IllustrationRepoMock(toRow: Function1[IllustrationRowUnsaved, Illustration override def selectByIds(illustrationids: Array[IllustrationId]): Stream[ConnectionIO, IllustrationRow] = { Stream.emits(illustrationids.flatMap(map.get).toList) } + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, Option[IllustrationRow]]] = { + selectByIds(illustrationids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilderMock(UpdateParams.empty, IllustrationFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala index f140339f3b..5443e2e20c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala @@ -26,6 +26,7 @@ trait LocationRepo { def selectAll: Stream[ConnectionIO, LocationRow] def selectById(locationid: LocationId): ConnectionIO[Option[LocationRow]] def selectByIds(locationids: Array[LocationId]): Stream[ConnectionIO, LocationRow] + def selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, Option[LocationRow]]] def update: UpdateBuilder[LocationFields, LocationRow] def update(row: LocationRow): ConnectionIO[Boolean] def upsert(unsaved: LocationRow): ConnectionIO[LocationRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala index 3b8f07b7c7..bfac097e3f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala @@ -93,6 +93,12 @@ class LocationRepoImpl extends LocationRepo { override def selectByIds(locationids: Array[LocationId]): Stream[ConnectionIO, LocationRow] = { sql"""select "locationid", "name", "costrate", "availability", "modifieddate"::text from production.location where "locationid" = ANY(${locationids})""".query(using LocationRow.read).stream } + override def selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, Option[LocationRow]]] = { + selectByIds(locationids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilder("production.location", LocationFields.structure, LocationRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala index 5da8ab0aa4..d9bacc27ad 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala @@ -79,6 +79,12 @@ class LocationRepoMock(toRow: Function1[LocationRowUnsaved, LocationRow], override def selectByIds(locationids: Array[LocationId]): Stream[ConnectionIO, LocationRow] = { Stream.emits(locationids.flatMap(map.get).toList) } + override def selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, Option[LocationRow]]] = { + selectByIds(locationids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilderMock(UpdateParams.empty, LocationFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala index abd1c7da6e..69110cd2a0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala @@ -26,6 +26,7 @@ trait ProductRepo { def selectAll: Stream[ConnectionIO, ProductRow] def selectById(productid: ProductId): ConnectionIO[Option[ProductRow]] def selectByIds(productids: Array[ProductId]): Stream[ConnectionIO, ProductRow] + def selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, Option[ProductRow]]] def update: UpdateBuilder[ProductFields, ProductRow] def update(row: ProductRow): ConnectionIO[Boolean] def upsert(unsaved: ProductRow): ConnectionIO[ProductRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala index ce5e6817aa..6f6e77033d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala @@ -122,6 +122,12 @@ class ProductRepoImpl extends ProductRepo { override def selectByIds(productids: Array[ProductId]): Stream[ConnectionIO, ProductRow] = { sql"""select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product where "productid" = ANY(${productids})""".query(using ProductRow.read).stream } + override def selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, Option[ProductRow]]] = { + selectByIds(productids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilder("production.product", ProductFields.structure, ProductRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala index 599b199a3a..c803d817ee 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala @@ -79,6 +79,12 @@ class ProductRepoMock(toRow: Function1[ProductRowUnsaved, ProductRow], override def selectByIds(productids: Array[ProductId]): Stream[ConnectionIO, ProductRow] = { Stream.emits(productids.flatMap(map.get).toList) } + override def selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, Option[ProductRow]]] = { + selectByIds(productids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilderMock(UpdateParams.empty, ProductFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala index 0da61eeed4..f655dd37de 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala @@ -26,6 +26,7 @@ trait ProductcategoryRepo { def selectAll: Stream[ConnectionIO, ProductcategoryRow] def selectById(productcategoryid: ProductcategoryId): ConnectionIO[Option[ProductcategoryRow]] def selectByIds(productcategoryids: Array[ProductcategoryId]): Stream[ConnectionIO, ProductcategoryRow] + def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, Option[ProductcategoryRow]]] def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] def update(row: ProductcategoryRow): ConnectionIO[Boolean] def upsert(unsaved: ProductcategoryRow): ConnectionIO[ProductcategoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala index 02ced4a921..132deb1667 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala @@ -89,6 +89,12 @@ class ProductcategoryRepoImpl extends ProductcategoryRepo { override def selectByIds(productcategoryids: Array[ProductcategoryId]): Stream[ConnectionIO, ProductcategoryRow] = { sql"""select "productcategoryid", "name", "rowguid", "modifieddate"::text from production.productcategory where "productcategoryid" = ANY(${productcategoryids})""".query(using ProductcategoryRow.read).stream } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, Option[ProductcategoryRow]]] = { + selectByIds(productcategoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilder("production.productcategory", ProductcategoryFields.structure, ProductcategoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala index 0141211bac..3b7a3ee266 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala @@ -79,6 +79,12 @@ class ProductcategoryRepoMock(toRow: Function1[ProductcategoryRowUnsaved, Produc override def selectByIds(productcategoryids: Array[ProductcategoryId]): Stream[ConnectionIO, ProductcategoryRow] = { Stream.emits(productcategoryids.flatMap(map.get).toList) } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, Option[ProductcategoryRow]]] = { + selectByIds(productcategoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcategoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala index 4129e1a1e6..c09f9a8fbd 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala @@ -26,6 +26,7 @@ trait ProductcosthistoryRepo { def selectAll: Stream[ConnectionIO, ProductcosthistoryRow] def selectById(compositeId: ProductcosthistoryId): ConnectionIO[Option[ProductcosthistoryRow]] def selectByIds(compositeIds: Array[ProductcosthistoryId]): Stream[ConnectionIO, ProductcosthistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] def update(row: ProductcosthistoryRow): ConnectionIO[Boolean] def upsert(unsaved: ProductcosthistoryRow): ConnectionIO[ProductcosthistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala index 262d90b353..4c372b2ed3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala @@ -98,6 +98,12 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.query(using ProductcosthistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilder("production.productcosthistory", ProductcosthistoryFields.structure, ProductcosthistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala index 2f4c9f299b..5db5012b4c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala @@ -79,6 +79,12 @@ class ProductcosthistoryRepoMock(toRow: Function1[ProductcosthistoryRowUnsaved, override def selectByIds(compositeIds: Array[ProductcosthistoryId]): Stream[ConnectionIO, ProductcosthistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcosthistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala index 2b05b8950d..9d73fd9ea9 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala @@ -26,6 +26,7 @@ trait ProductdescriptionRepo { def selectAll: Stream[ConnectionIO, ProductdescriptionRow] def selectById(productdescriptionid: ProductdescriptionId): ConnectionIO[Option[ProductdescriptionRow]] def selectByIds(productdescriptionids: Array[ProductdescriptionId]): Stream[ConnectionIO, ProductdescriptionRow] + def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, Option[ProductdescriptionRow]]] def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] def update(row: ProductdescriptionRow): ConnectionIO[Boolean] def upsert(unsaved: ProductdescriptionRow): ConnectionIO[ProductdescriptionRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala index 23449493e7..e32a01dfe0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala @@ -89,6 +89,12 @@ class ProductdescriptionRepoImpl extends ProductdescriptionRepo { override def selectByIds(productdescriptionids: Array[ProductdescriptionId]): Stream[ConnectionIO, ProductdescriptionRow] = { sql"""select "productdescriptionid", "description", "rowguid", "modifieddate"::text from production.productdescription where "productdescriptionid" = ANY(${productdescriptionids})""".query(using ProductdescriptionRow.read).stream } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, Option[ProductdescriptionRow]]] = { + selectByIds(productdescriptionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilder("production.productdescription", ProductdescriptionFields.structure, ProductdescriptionRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala index 394f70f9f8..e1600cde8b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala @@ -79,6 +79,12 @@ class ProductdescriptionRepoMock(toRow: Function1[ProductdescriptionRowUnsaved, override def selectByIds(productdescriptionids: Array[ProductdescriptionId]): Stream[ConnectionIO, ProductdescriptionRow] = { Stream.emits(productdescriptionids.flatMap(map.get).toList) } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, Option[ProductdescriptionRow]]] = { + selectByIds(productdescriptionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdescriptionFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala index f36954ad00..acb9442e3b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala @@ -26,6 +26,7 @@ trait ProductdocumentRepo { def selectAll: Stream[ConnectionIO, ProductdocumentRow] def selectById(compositeId: ProductdocumentId): ConnectionIO[Option[ProductdocumentRow]] def selectByIds(compositeIds: Array[ProductdocumentId]): Stream[ConnectionIO, ProductdocumentRow] + def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, Option[ProductdocumentRow]]] def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] def update(row: ProductdocumentRow): ConnectionIO[Boolean] def upsert(unsaved: ProductdocumentRow): ConnectionIO[ProductdocumentRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala index d1ed330cd3..b57ac56a9b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala @@ -99,6 +99,12 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.query(using ProductdocumentRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilder("production.productdocument", ProductdocumentFields.structure, ProductdocumentRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala index d00ebc46c3..0ff27f0341 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala @@ -79,6 +79,12 @@ class ProductdocumentRepoMock(toRow: Function1[ProductdocumentRowUnsaved, Produc override def selectByIds(compositeIds: Array[ProductdocumentId]): Stream[ConnectionIO, ProductdocumentRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdocumentFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala index 7131a8f9cb..c0dd09cf35 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala @@ -26,6 +26,7 @@ trait ProductinventoryRepo { def selectAll: Stream[ConnectionIO, ProductinventoryRow] def selectById(compositeId: ProductinventoryId): ConnectionIO[Option[ProductinventoryRow]] def selectByIds(compositeIds: Array[ProductinventoryId]): Stream[ConnectionIO, ProductinventoryRow] + def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, Option[ProductinventoryRow]]] def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] def update(row: ProductinventoryRow): ConnectionIO[Boolean] def upsert(unsaved: ProductinventoryRow): ConnectionIO[ProductinventoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala index f051196efb..a24077c745 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala @@ -109,6 +109,12 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.query(using ProductinventoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilder("production.productinventory", ProductinventoryFields.structure, ProductinventoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala index a3c078dc21..6ef6976dfc 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala @@ -79,6 +79,12 @@ class ProductinventoryRepoMock(toRow: Function1[ProductinventoryRowUnsaved, Prod override def selectByIds(compositeIds: Array[ProductinventoryId]): Stream[ConnectionIO, ProductinventoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductinventoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala index 230b43b7b2..3a279e5723 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala @@ -26,6 +26,7 @@ trait ProductlistpricehistoryRepo { def selectAll: Stream[ConnectionIO, ProductlistpricehistoryRow] def selectById(compositeId: ProductlistpricehistoryId): ConnectionIO[Option[ProductlistpricehistoryRow]] def selectByIds(compositeIds: Array[ProductlistpricehistoryId]): Stream[ConnectionIO, ProductlistpricehistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] def update(row: ProductlistpricehistoryRow): ConnectionIO[Boolean] def upsert(unsaved: ProductlistpricehistoryRow): ConnectionIO[ProductlistpricehistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala index e977bddab4..f17ab68258 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala @@ -98,6 +98,12 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.query(using ProductlistpricehistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilder("production.productlistpricehistory", ProductlistpricehistoryFields.structure, ProductlistpricehistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala index 126936b15a..d48540a538 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala @@ -79,6 +79,12 @@ class ProductlistpricehistoryRepoMock(toRow: Function1[ProductlistpricehistoryRo override def selectByIds(compositeIds: Array[ProductlistpricehistoryId]): Stream[ConnectionIO, ProductlistpricehistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductlistpricehistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala index 166cac8ec8..18ce467ed8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala @@ -26,6 +26,7 @@ trait ProductmodelRepo { def selectAll: Stream[ConnectionIO, ProductmodelRow] def selectById(productmodelid: ProductmodelId): ConnectionIO[Option[ProductmodelRow]] def selectByIds(productmodelids: Array[ProductmodelId]): Stream[ConnectionIO, ProductmodelRow] + def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, Option[ProductmodelRow]]] def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] def update(row: ProductmodelRow): ConnectionIO[Boolean] def upsert(unsaved: ProductmodelRow): ConnectionIO[ProductmodelRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala index c5de19fc9d..a2362e4a11 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala @@ -92,6 +92,12 @@ class ProductmodelRepoImpl extends ProductmodelRepo { override def selectByIds(productmodelids: Array[ProductmodelId]): Stream[ConnectionIO, ProductmodelRow] = { sql"""select "productmodelid", "name", "catalogdescription", "instructions", "rowguid", "modifieddate"::text from production.productmodel where "productmodelid" = ANY(${productmodelids})""".query(using ProductmodelRow.read).stream } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, Option[ProductmodelRow]]] = { + selectByIds(productmodelids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilder("production.productmodel", ProductmodelFields.structure, ProductmodelRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala index 5116c1332d..ff8ca3b480 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala @@ -79,6 +79,12 @@ class ProductmodelRepoMock(toRow: Function1[ProductmodelRowUnsaved, Productmodel override def selectByIds(productmodelids: Array[ProductmodelId]): Stream[ConnectionIO, ProductmodelRow] = { Stream.emits(productmodelids.flatMap(map.get).toList) } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, Option[ProductmodelRow]]] = { + selectByIds(productmodelids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala index ba1580b7ff..6d9253d11c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala @@ -26,6 +26,7 @@ trait ProductmodelillustrationRepo { def selectAll: Stream[ConnectionIO, ProductmodelillustrationRow] def selectById(compositeId: ProductmodelillustrationId): ConnectionIO[Option[ProductmodelillustrationRow]] def selectByIds(compositeIds: Array[ProductmodelillustrationId]): Stream[ConnectionIO, ProductmodelillustrationRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] def update(row: ProductmodelillustrationRow): ConnectionIO[Boolean] def upsert(unsaved: ProductmodelillustrationRow): ConnectionIO[ProductmodelillustrationRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala index d0aa55ca23..5448b90682 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala @@ -96,6 +96,12 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.query(using ProductmodelillustrationRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilder("production.productmodelillustration", ProductmodelillustrationFields.structure, ProductmodelillustrationRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala index 789f5afd52..0f2759dbbb 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala @@ -79,6 +79,12 @@ class ProductmodelillustrationRepoMock(toRow: Function1[Productmodelillustration override def selectByIds(compositeIds: Array[ProductmodelillustrationId]): Stream[ConnectionIO, ProductmodelillustrationRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelillustrationFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala index dba0f75ce4..eba13d4b0d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala @@ -26,6 +26,7 @@ trait ProductmodelproductdescriptioncultureRepo { def selectAll: Stream[ConnectionIO, ProductmodelproductdescriptioncultureRow] def selectById(compositeId: ProductmodelproductdescriptioncultureId): ConnectionIO[Option[ProductmodelproductdescriptioncultureRow]] def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId]): Stream[ConnectionIO, ProductmodelproductdescriptioncultureRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] def update(row: ProductmodelproductdescriptioncultureRow): ConnectionIO[Boolean] def upsert(unsaved: ProductmodelproductdescriptioncultureRow): ConnectionIO[ProductmodelproductdescriptioncultureRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala index 4e6415666e..ba537d9121 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala @@ -100,6 +100,12 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.query(using ProductmodelproductdescriptioncultureRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilder("production.productmodelproductdescriptionculture", ProductmodelproductdescriptioncultureFields.structure, ProductmodelproductdescriptioncultureRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala index 709547118a..81b1f7fe5c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala @@ -79,6 +79,12 @@ class ProductmodelproductdescriptioncultureRepoMock(toRow: Function1[Productmode override def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId]): Stream[ConnectionIO, ProductmodelproductdescriptioncultureRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelproductdescriptioncultureFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala index 368059b04c..14f704581f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala @@ -26,6 +26,7 @@ trait ProductphotoRepo { def selectAll: Stream[ConnectionIO, ProductphotoRow] def selectById(productphotoid: ProductphotoId): ConnectionIO[Option[ProductphotoRow]] def selectByIds(productphotoids: Array[ProductphotoId]): Stream[ConnectionIO, ProductphotoRow] + def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, Option[ProductphotoRow]]] def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] def update(row: ProductphotoRow): ConnectionIO[Boolean] def upsert(unsaved: ProductphotoRow): ConnectionIO[ProductphotoRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala index ef5210650e..2d3c9f35e2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala @@ -88,6 +88,12 @@ class ProductphotoRepoImpl extends ProductphotoRepo { override def selectByIds(productphotoids: Array[ProductphotoId]): Stream[ConnectionIO, ProductphotoRow] = { sql"""select "productphotoid", "thumbnailphoto", "thumbnailphotofilename", "largephoto", "largephotofilename", "modifieddate"::text from production.productphoto where "productphotoid" = ANY(${productphotoids})""".query(using ProductphotoRow.read).stream } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, Option[ProductphotoRow]]] = { + selectByIds(productphotoids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilder("production.productphoto", ProductphotoFields.structure, ProductphotoRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala index 55ab1c1eab..71896a416d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala @@ -79,6 +79,12 @@ class ProductphotoRepoMock(toRow: Function1[ProductphotoRowUnsaved, Productphoto override def selectByIds(productphotoids: Array[ProductphotoId]): Stream[ConnectionIO, ProductphotoRow] = { Stream.emits(productphotoids.flatMap(map.get).toList) } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, Option[ProductphotoRow]]] = { + selectByIds(productphotoids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductphotoFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala index e8116e6fac..aa924fd889 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala @@ -26,6 +26,7 @@ trait ProductproductphotoRepo { def selectAll: Stream[ConnectionIO, ProductproductphotoRow] def selectById(compositeId: ProductproductphotoId): ConnectionIO[Option[ProductproductphotoRow]] def selectByIds(compositeIds: Array[ProductproductphotoId]): Stream[ConnectionIO, ProductproductphotoRow] + def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, Option[ProductproductphotoRow]]] def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] def update(row: ProductproductphotoRow): ConnectionIO[Boolean] def upsert(unsaved: ProductproductphotoRow): ConnectionIO[ProductproductphotoRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala index b778657a11..e5065f41b8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala @@ -101,6 +101,12 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.query(using ProductproductphotoRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilder("production.productproductphoto", ProductproductphotoFields.structure, ProductproductphotoRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala index 68911c3535..a2ca0aaaab 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala @@ -79,6 +79,12 @@ class ProductproductphotoRepoMock(toRow: Function1[ProductproductphotoRowUnsaved override def selectByIds(compositeIds: Array[ProductproductphotoId]): Stream[ConnectionIO, ProductproductphotoRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductproductphotoFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala index 61097529b7..699363b1d5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala @@ -26,6 +26,7 @@ trait ProductreviewRepo { def selectAll: Stream[ConnectionIO, ProductreviewRow] def selectById(productreviewid: ProductreviewId): ConnectionIO[Option[ProductreviewRow]] def selectByIds(productreviewids: Array[ProductreviewId]): Stream[ConnectionIO, ProductreviewRow] + def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, Option[ProductreviewRow]]] def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] def update(row: ProductreviewRow): ConnectionIO[Boolean] def upsert(unsaved: ProductreviewRow): ConnectionIO[ProductreviewRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala index 97c33c84c9..aaaa5dee67 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala @@ -94,6 +94,12 @@ class ProductreviewRepoImpl extends ProductreviewRepo { override def selectByIds(productreviewids: Array[ProductreviewId]): Stream[ConnectionIO, ProductreviewRow] = { sql"""select "productreviewid", "productid", "reviewername", "reviewdate"::text, "emailaddress", "rating", "comments", "modifieddate"::text from production.productreview where "productreviewid" = ANY(${productreviewids})""".query(using ProductreviewRow.read).stream } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, Option[ProductreviewRow]]] = { + selectByIds(productreviewids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilder("production.productreview", ProductreviewFields.structure, ProductreviewRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala index e2575633e9..a9a951a04e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala @@ -79,6 +79,12 @@ class ProductreviewRepoMock(toRow: Function1[ProductreviewRowUnsaved, Productrev override def selectByIds(productreviewids: Array[ProductreviewId]): Stream[ConnectionIO, ProductreviewRow] = { Stream.emits(productreviewids.flatMap(map.get).toList) } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, Option[ProductreviewRow]]] = { + selectByIds(productreviewids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilderMock(UpdateParams.empty, ProductreviewFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala index 5335e470c7..7d57b48bbb 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala @@ -26,6 +26,7 @@ trait ProductsubcategoryRepo { def selectAll: Stream[ConnectionIO, ProductsubcategoryRow] def selectById(productsubcategoryid: ProductsubcategoryId): ConnectionIO[Option[ProductsubcategoryRow]] def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): Stream[ConnectionIO, ProductsubcategoryRow] + def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] def update(row: ProductsubcategoryRow): ConnectionIO[Boolean] def upsert(unsaved: ProductsubcategoryRow): ConnectionIO[ProductsubcategoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala index ee8de76087..d9228881e7 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala @@ -91,6 +91,12 @@ class ProductsubcategoryRepoImpl extends ProductsubcategoryRepo { override def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): Stream[ConnectionIO, ProductsubcategoryRow] = { sql"""select "productsubcategoryid", "productcategoryid", "name", "rowguid", "modifieddate"::text from production.productsubcategory where "productsubcategoryid" = ANY(${productsubcategoryids})""".query(using ProductsubcategoryRow.read).stream } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] = { + selectByIds(productsubcategoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilder("production.productsubcategory", ProductsubcategoryFields.structure, ProductsubcategoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala index b3ba20f9f1..26a67a8e3e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala @@ -79,6 +79,12 @@ class ProductsubcategoryRepoMock(toRow: Function1[ProductsubcategoryRowUnsaved, override def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): Stream[ConnectionIO, ProductsubcategoryRow] = { Stream.emits(productsubcategoryids.flatMap(map.get).toList) } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] = { + selectByIds(productsubcategoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductsubcategoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala index 346e6131d0..c640de331c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala @@ -26,6 +26,7 @@ trait ScrapreasonRepo { def selectAll: Stream[ConnectionIO, ScrapreasonRow] def selectById(scrapreasonid: ScrapreasonId): ConnectionIO[Option[ScrapreasonRow]] def selectByIds(scrapreasonids: Array[ScrapreasonId]): Stream[ConnectionIO, ScrapreasonRow] + def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, Option[ScrapreasonRow]]] def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] def update(row: ScrapreasonRow): ConnectionIO[Boolean] def upsert(unsaved: ScrapreasonRow): ConnectionIO[ScrapreasonRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala index 1eb2c868a0..9861ed9cce 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala @@ -84,6 +84,12 @@ class ScrapreasonRepoImpl extends ScrapreasonRepo { override def selectByIds(scrapreasonids: Array[ScrapreasonId]): Stream[ConnectionIO, ScrapreasonRow] = { sql"""select "scrapreasonid", "name", "modifieddate"::text from production.scrapreason where "scrapreasonid" = ANY(${scrapreasonids})""".query(using ScrapreasonRow.read).stream } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, Option[ScrapreasonRow]]] = { + selectByIds(scrapreasonids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilder("production.scrapreason", ScrapreasonFields.structure, ScrapreasonRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala index 5997a2e321..e83e400561 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala @@ -79,6 +79,12 @@ class ScrapreasonRepoMock(toRow: Function1[ScrapreasonRowUnsaved, ScrapreasonRow override def selectByIds(scrapreasonids: Array[ScrapreasonId]): Stream[ConnectionIO, ScrapreasonRow] = { Stream.emits(scrapreasonids.flatMap(map.get).toList) } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, Option[ScrapreasonRow]]] = { + selectByIds(scrapreasonids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilderMock(UpdateParams.empty, ScrapreasonFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala index 3c713b7d25..11f923193d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala @@ -26,6 +26,7 @@ trait TransactionhistoryRepo { def selectAll: Stream[ConnectionIO, TransactionhistoryRow] def selectById(transactionid: TransactionhistoryId): ConnectionIO[Option[TransactionhistoryRow]] def selectByIds(transactionids: Array[TransactionhistoryId]): Stream[ConnectionIO, TransactionhistoryRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, Option[TransactionhistoryRow]]] def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] def update(row: TransactionhistoryRow): ConnectionIO[Boolean] def upsert(unsaved: TransactionhistoryRow): ConnectionIO[TransactionhistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala index bbcc917bb7..f30122bcea 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala @@ -97,6 +97,12 @@ class TransactionhistoryRepoImpl extends TransactionhistoryRepo { override def selectByIds(transactionids: Array[TransactionhistoryId]): Stream[ConnectionIO, TransactionhistoryRow] = { sql"""select "transactionid", "productid", "referenceorderid", "referenceorderlineid", "transactiondate"::text, "transactiontype", "quantity", "actualcost", "modifieddate"::text from production.transactionhistory where "transactionid" = ANY(${transactionids})""".query(using TransactionhistoryRow.read).stream } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, Option[TransactionhistoryRow]]] = { + selectByIds(transactionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilder("production.transactionhistory", TransactionhistoryFields.structure, TransactionhistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala index 0a79465b85..44b5eb2fa3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala @@ -79,6 +79,12 @@ class TransactionhistoryRepoMock(toRow: Function1[TransactionhistoryRowUnsaved, override def selectByIds(transactionids: Array[TransactionhistoryId]): Stream[ConnectionIO, TransactionhistoryRow] = { Stream.emits(transactionids.flatMap(map.get).toList) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, Option[TransactionhistoryRow]]] = { + selectByIds(transactionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala index d2d1f7391e..add885c635 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala @@ -26,6 +26,7 @@ trait TransactionhistoryarchiveRepo { def selectAll: Stream[ConnectionIO, TransactionhistoryarchiveRow] def selectById(transactionid: TransactionhistoryarchiveId): ConnectionIO[Option[TransactionhistoryarchiveRow]] def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): Stream[ConnectionIO, TransactionhistoryarchiveRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] def update(row: TransactionhistoryarchiveRow): ConnectionIO[Boolean] def upsert(unsaved: TransactionhistoryarchiveRow): ConnectionIO[TransactionhistoryarchiveRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala index 8157177d3e..616a85cacd 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala @@ -93,6 +93,12 @@ class TransactionhistoryarchiveRepoImpl extends TransactionhistoryarchiveRepo { override def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): Stream[ConnectionIO, TransactionhistoryarchiveRow] = { sql"""select "transactionid", "productid", "referenceorderid", "referenceorderlineid", "transactiondate"::text, "transactiontype", "quantity", "actualcost", "modifieddate"::text from production.transactionhistoryarchive where "transactionid" = ANY(${transactionids})""".query(using TransactionhistoryarchiveRow.read).stream } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] = { + selectByIds(transactionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilder("production.transactionhistoryarchive", TransactionhistoryarchiveFields.structure, TransactionhistoryarchiveRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala index 5790715c03..ae3e63dc6d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala @@ -79,6 +79,12 @@ class TransactionhistoryarchiveRepoMock(toRow: Function1[Transactionhistoryarchi override def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): Stream[ConnectionIO, TransactionhistoryarchiveRow] = { Stream.emits(transactionids.flatMap(map.get).toList) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] = { + selectByIds(transactionids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryarchiveFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala index c135cc9aec..e913edde03 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala @@ -26,6 +26,7 @@ trait UnitmeasureRepo { def selectAll: Stream[ConnectionIO, UnitmeasureRow] def selectById(unitmeasurecode: UnitmeasureId): ConnectionIO[Option[UnitmeasureRow]] def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): Stream[ConnectionIO, UnitmeasureRow] + def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, Option[UnitmeasureRow]]] def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] def update(row: UnitmeasureRow): ConnectionIO[Boolean] def upsert(unsaved: UnitmeasureRow): ConnectionIO[UnitmeasureRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala index bec6fd614b..2c931ba0af 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala @@ -81,6 +81,12 @@ class UnitmeasureRepoImpl extends UnitmeasureRepo { override def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): Stream[ConnectionIO, UnitmeasureRow] = { sql"""select "unitmeasurecode", "name", "modifieddate"::text from production.unitmeasure where "unitmeasurecode" = ANY(${unitmeasurecodes})""".query(using UnitmeasureRow.read).stream } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, Option[UnitmeasureRow]]] = { + selectByIds(unitmeasurecodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilder("production.unitmeasure", UnitmeasureFields.structure, UnitmeasureRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala index a7bf402050..5703dc3615 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala @@ -79,6 +79,12 @@ class UnitmeasureRepoMock(toRow: Function1[UnitmeasureRowUnsaved, UnitmeasureRow override def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): Stream[ConnectionIO, UnitmeasureRow] = { Stream.emits(unitmeasurecodes.flatMap(map.get).toList) } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, Option[UnitmeasureRow]]] = { + selectByIds(unitmeasurecodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilderMock(UpdateParams.empty, UnitmeasureFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala index b9939b82fc..134803e245 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala @@ -26,6 +26,7 @@ trait WorkorderRepo { def selectAll: Stream[ConnectionIO, WorkorderRow] def selectById(workorderid: WorkorderId): ConnectionIO[Option[WorkorderRow]] def selectByIds(workorderids: Array[WorkorderId]): Stream[ConnectionIO, WorkorderRow] + def selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, Option[WorkorderRow]]] def update: UpdateBuilder[WorkorderFields, WorkorderRow] def update(row: WorkorderRow): ConnectionIO[Boolean] def upsert(unsaved: WorkorderRow): ConnectionIO[WorkorderRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala index b2202c9afc..4fa428ec5b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala @@ -93,6 +93,12 @@ class WorkorderRepoImpl extends WorkorderRepo { override def selectByIds(workorderids: Array[WorkorderId]): Stream[ConnectionIO, WorkorderRow] = { sql"""select "workorderid", "productid", "orderqty", "scrappedqty", "startdate"::text, "enddate"::text, "duedate"::text, "scrapreasonid", "modifieddate"::text from production.workorder where "workorderid" = ANY(${workorderids})""".query(using WorkorderRow.read).stream } + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, Option[WorkorderRow]]] = { + selectByIds(workorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilder("production.workorder", WorkorderFields.structure, WorkorderRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala index a26973c760..07a6c477c5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala @@ -79,6 +79,12 @@ class WorkorderRepoMock(toRow: Function1[WorkorderRowUnsaved, WorkorderRow], override def selectByIds(workorderids: Array[WorkorderId]): Stream[ConnectionIO, WorkorderRow] = { Stream.emits(workorderids.flatMap(map.get).toList) } + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, Option[WorkorderRow]]] = { + selectByIds(workorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala index 768efebb05..889200977f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala @@ -26,6 +26,7 @@ trait WorkorderroutingRepo { def selectAll: Stream[ConnectionIO, WorkorderroutingRow] def selectById(compositeId: WorkorderroutingId): ConnectionIO[Option[WorkorderroutingRow]] def selectByIds(compositeIds: Array[WorkorderroutingId]): Stream[ConnectionIO, WorkorderroutingRow] + def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, Option[WorkorderroutingRow]]] def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] def update(row: WorkorderroutingRow): ConnectionIO[Boolean] def upsert(unsaved: WorkorderroutingRow): ConnectionIO[WorkorderroutingRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala index d2fbb887ec..a68a962328 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala @@ -109,6 +109,12 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.query(using WorkorderroutingRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilder("production.workorderrouting", WorkorderroutingFields.structure, WorkorderroutingRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala index c8d6788005..1de9558995 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala @@ -79,6 +79,12 @@ class WorkorderroutingRepoMock(toRow: Function1[WorkorderroutingRowUnsaved, Work override def selectByIds(compositeIds: Array[WorkorderroutingId]): Stream[ConnectionIO, WorkorderroutingRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderroutingFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala index 226a089b7e..e8e35940cc 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala @@ -23,6 +23,7 @@ trait FlaffRepo { def selectAll: Stream[ConnectionIO, FlaffRow] def selectById(compositeId: FlaffId): ConnectionIO[Option[FlaffRow]] def selectByIds(compositeIds: Array[FlaffId]): Stream[ConnectionIO, FlaffRow] + def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, Option[FlaffRow]]] def update: UpdateBuilder[FlaffFields, FlaffRow] def update(row: FlaffRow): ConnectionIO[Boolean] def upsert(unsaved: FlaffRow): ConnectionIO[FlaffRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala index b155b9e3e5..8e9d7dc3d2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala @@ -69,6 +69,12 @@ class FlaffRepoImpl extends FlaffRepo { """.query(using FlaffRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, Option[FlaffRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilder("public.flaff", FlaffFields.structure, FlaffRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala index 45ab59fc07..5167df5308 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala @@ -63,6 +63,12 @@ class FlaffRepoMock(map: scala.collection.mutable.Map[FlaffId, FlaffRow] = scala override def selectByIds(compositeIds: Array[FlaffId]): Stream[ConnectionIO, FlaffRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, Option[FlaffRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilderMock(UpdateParams.empty, FlaffFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala index 1ca89118d1..7c3feac416 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala @@ -26,6 +26,7 @@ trait IdentityTestRepo { def selectAll: Stream[ConnectionIO, IdentityTestRow] def selectById(name: IdentityTestId): ConnectionIO[Option[IdentityTestRow]] def selectByIds(names: Array[IdentityTestId]): Stream[ConnectionIO, IdentityTestRow] + def selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, Option[IdentityTestRow]]] def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] def update(row: IdentityTestRow): ConnectionIO[Boolean] def upsert(unsaved: IdentityTestRow): ConnectionIO[IdentityTestRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala index 0e2b569bba..5a4bf5ef0f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala @@ -79,6 +79,12 @@ class IdentityTestRepoImpl extends IdentityTestRepo { override def selectByIds(names: Array[IdentityTestId]): Stream[ConnectionIO, IdentityTestRow] = { sql"""select "always_generated", "default_generated", "name" from public.identity-test where "name" = ANY(${names})""".query(using IdentityTestRow.read).stream } + override def selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, Option[IdentityTestRow]]] = { + selectByIds(names).compile.toList.map { rows => + val byId = rows.view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilder("public.identity-test", IdentityTestFields.structure, IdentityTestRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala index 34a64106b6..90a45ab074 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala @@ -79,6 +79,12 @@ class IdentityTestRepoMock(toRow: Function1[IdentityTestRowUnsaved, IdentityTest override def selectByIds(names: Array[IdentityTestId]): Stream[ConnectionIO, IdentityTestRow] = { Stream.emits(names.flatMap(map.get).toList) } + override def selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, Option[IdentityTestRow]]] = { + selectByIds(names).compile.toList.map { rows => + val byId = rows.view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilderMock(UpdateParams.empty, IdentityTestFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala index 022bfc4066..0cdcd0384b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala @@ -27,6 +27,7 @@ trait UsersRepo { def selectAll: Stream[ConnectionIO, UsersRow] def selectById(userId: UsersId): ConnectionIO[Option[UsersRow]] def selectByIds(userIds: Array[UsersId]): Stream[ConnectionIO, UsersRow] + def selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, Option[UsersRow]]] def selectByUniqueEmail(email: TypoUnknownCitext): ConnectionIO[Option[UsersRow]] def update: UpdateBuilder[UsersFields, UsersRow] def update(row: UsersRow): ConnectionIO[Boolean] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala index 85914adbb4..9478858757 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala @@ -86,6 +86,12 @@ class UsersRepoImpl extends UsersRepo { override def selectByIds(userIds: Array[UsersId]): Stream[ConnectionIO, UsersRow] = { sql"""select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.users where "user_id" = ANY(${userIds})""".query(using UsersRow.read).stream } + override def selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, Option[UsersRow]]] = { + selectByIds(userIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueEmail(email: TypoUnknownCitext): ConnectionIO[Option[UsersRow]] = { sql"""select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.users diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala index 5ab517bc7e..2cfc58cff0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala @@ -80,6 +80,12 @@ class UsersRepoMock(toRow: Function1[UsersRowUnsaved, UsersRow], override def selectByIds(userIds: Array[UsersId]): Stream[ConnectionIO, UsersRow] = { Stream.emits(userIds.flatMap(map.get).toList) } + override def selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, Option[UsersRow]]] = { + selectByIds(userIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueEmail(email: TypoUnknownCitext): ConnectionIO[Option[UsersRow]] = { delay(map.values.find(v => email == v.email)) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala index 6301bdb526..44055da181 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala @@ -26,6 +26,7 @@ trait ProductvendorRepo { def selectAll: Stream[ConnectionIO, ProductvendorRow] def selectById(compositeId: ProductvendorId): ConnectionIO[Option[ProductvendorRow]] def selectByIds(compositeIds: Array[ProductvendorId]): Stream[ConnectionIO, ProductvendorRow] + def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, Option[ProductvendorRow]]] def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] def update(row: ProductvendorRow): ConnectionIO[Boolean] def upsert(unsaved: ProductvendorRow): ConnectionIO[ProductvendorRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala index eef5684f68..133db01cc2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala @@ -106,6 +106,12 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.query(using ProductvendorRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, Option[ProductvendorRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilder("purchasing.productvendor", ProductvendorFields.structure, ProductvendorRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala index d28bea2ce1..218a93bd9e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala @@ -79,6 +79,12 @@ class ProductvendorRepoMock(toRow: Function1[ProductvendorRowUnsaved, Productven override def selectByIds(compositeIds: Array[ProductvendorId]): Stream[ConnectionIO, ProductvendorRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, Option[ProductvendorRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilderMock(UpdateParams.empty, ProductvendorFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala index ded1254666..8bbcefccd2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala @@ -16,4 +16,5 @@ trait PurchaseorderdetailRepo { def selectAll: Stream[ConnectionIO, PurchaseorderdetailRow] def selectById(compositeId: PurchaseorderdetailId): ConnectionIO[Option[PurchaseorderdetailRow]] def selectByIds(compositeIds: Array[PurchaseorderdetailId]): Stream[ConnectionIO, PurchaseorderdetailRow] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ConnectionIO[Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala index 828eefd0c8..6e48e024ee 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala @@ -37,4 +37,10 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.query(using PurchaseorderdetailRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ConnectionIO[Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala index adb8d8c2f3..14a858554f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala @@ -26,6 +26,7 @@ trait PurchaseorderheaderRepo { def selectAll: Stream[ConnectionIO, PurchaseorderheaderRow] def selectById(purchaseorderid: PurchaseorderheaderId): ConnectionIO[Option[PurchaseorderheaderRow]] def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): Stream[ConnectionIO, PurchaseorderheaderRow] + def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] def update(row: PurchaseorderheaderRow): ConnectionIO[Boolean] def upsert(unsaved: PurchaseorderheaderRow): ConnectionIO[PurchaseorderheaderRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala index 87ebd3d788..6305e4b13b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala @@ -114,6 +114,12 @@ class PurchaseorderheaderRepoImpl extends PurchaseorderheaderRepo { override def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): Stream[ConnectionIO, PurchaseorderheaderRow] = { sql"""select "purchaseorderid", "revisionnumber", "status", "employeeid", "vendorid", "shipmethodid", "orderdate"::text, "shipdate"::text, "subtotal", "taxamt", "freight", "modifieddate"::text from purchasing.purchaseorderheader where "purchaseorderid" = ANY(${purchaseorderids})""".query(using PurchaseorderheaderRow.read).stream } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] = { + selectByIds(purchaseorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilder("purchasing.purchaseorderheader", PurchaseorderheaderFields.structure, PurchaseorderheaderRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala index c7b84c32d2..9414109a74 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala @@ -79,6 +79,12 @@ class PurchaseorderheaderRepoMock(toRow: Function1[PurchaseorderheaderRowUnsaved override def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): Stream[ConnectionIO, PurchaseorderheaderRow] = { Stream.emits(purchaseorderids.flatMap(map.get).toList) } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] = { + selectByIds(purchaseorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, PurchaseorderheaderFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala index 149aea9248..beb2d6df3b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala @@ -26,6 +26,7 @@ trait ShipmethodRepo { def selectAll: Stream[ConnectionIO, ShipmethodRow] def selectById(shipmethodid: ShipmethodId): ConnectionIO[Option[ShipmethodRow]] def selectByIds(shipmethodids: Array[ShipmethodId]): Stream[ConnectionIO, ShipmethodRow] + def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, Option[ShipmethodRow]]] def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] def update(row: ShipmethodRow): ConnectionIO[Boolean] def upsert(unsaved: ShipmethodRow): ConnectionIO[ShipmethodRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala index 6733896eab..563727293c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala @@ -98,6 +98,12 @@ class ShipmethodRepoImpl extends ShipmethodRepo { override def selectByIds(shipmethodids: Array[ShipmethodId]): Stream[ConnectionIO, ShipmethodRow] = { sql"""select "shipmethodid", "name", "shipbase", "shiprate", "rowguid", "modifieddate"::text from purchasing.shipmethod where "shipmethodid" = ANY(${shipmethodids})""".query(using ShipmethodRow.read).stream } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, Option[ShipmethodRow]]] = { + selectByIds(shipmethodids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilder("purchasing.shipmethod", ShipmethodFields.structure, ShipmethodRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala index 62b41607a9..79dba56552 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala @@ -79,6 +79,12 @@ class ShipmethodRepoMock(toRow: Function1[ShipmethodRowUnsaved, ShipmethodRow], override def selectByIds(shipmethodids: Array[ShipmethodId]): Stream[ConnectionIO, ShipmethodRow] = { Stream.emits(shipmethodids.flatMap(map.get).toList) } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, Option[ShipmethodRow]]] = { + selectByIds(shipmethodids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilderMock(UpdateParams.empty, ShipmethodFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala index 2ccb12212e..92d30edd9e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala @@ -27,6 +27,7 @@ trait VendorRepo { def selectAll: Stream[ConnectionIO, VendorRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[VendorRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, VendorRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[VendorRow]]] def update: UpdateBuilder[VendorFields, VendorRow] def update(row: VendorRow): ConnectionIO[Boolean] def upsert(unsaved: VendorRow): ConnectionIO[VendorRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala index 1ac329db29..8f3d7dc7ba 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala @@ -97,6 +97,12 @@ class VendorRepoImpl extends VendorRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, VendorRow] = { sql"""select "businessentityid", "accountnumber", "name", "creditrating", "preferredvendorstatus", "activeflag", "purchasingwebserviceurl", "modifieddate"::text from purchasing.vendor where "businessentityid" = ANY(${businessentityids})""".query(using VendorRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[VendorRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilder("purchasing.vendor", VendorFields.structure, VendorRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala index 2f47ac9eb1..09bd7cd033 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala @@ -80,6 +80,12 @@ class VendorRepoMock(toRow: Function1[VendorRowUnsaved, VendorRow], override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, VendorRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[VendorRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilderMock(UpdateParams.empty, VendorFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala index b5b07c39ef..1e23215a05 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala @@ -26,6 +26,7 @@ trait CountryregioncurrencyRepo { def selectAll: Stream[ConnectionIO, CountryregioncurrencyRow] def selectById(compositeId: CountryregioncurrencyId): ConnectionIO[Option[CountryregioncurrencyRow]] def selectByIds(compositeIds: Array[CountryregioncurrencyId]): Stream[ConnectionIO, CountryregioncurrencyRow] + def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] def update(row: CountryregioncurrencyRow): ConnectionIO[Boolean] def upsert(unsaved: CountryregioncurrencyRow): ConnectionIO[CountryregioncurrencyRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala index 2e8dc2b199..ac5f586db2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala @@ -96,6 +96,12 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.query(using CountryregioncurrencyRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilder("sales.countryregioncurrency", CountryregioncurrencyFields.structure, CountryregioncurrencyRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala index f7043f6ec8..0c84b10cc3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala @@ -79,6 +79,12 @@ class CountryregioncurrencyRepoMock(toRow: Function1[CountryregioncurrencyRowUns override def selectByIds(compositeIds: Array[CountryregioncurrencyId]): Stream[ConnectionIO, CountryregioncurrencyRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregioncurrencyFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala index bad324ae38..711a59fdaa 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala @@ -28,6 +28,7 @@ trait CreditcardRepo { def selectAll: Stream[ConnectionIO, CreditcardRow] def selectById(creditcardid: /* user-picked */ CustomCreditcardId): ConnectionIO[Option[CreditcardRow]] def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): Stream[ConnectionIO, CreditcardRow] + def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] def update: UpdateBuilder[CreditcardFields, CreditcardRow] def update(row: CreditcardRow): ConnectionIO[Boolean] def upsert(unsaved: CreditcardRow): ConnectionIO[CreditcardRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala index ba734042db..582d1f1a81 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala @@ -90,6 +90,12 @@ class CreditcardRepoImpl extends CreditcardRepo { override def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): Stream[ConnectionIO, CreditcardRow] = { sql"""select "creditcardid", "cardtype", "cardnumber", "expmonth", "expyear", "modifieddate"::text from sales.creditcard where "creditcardid" = ANY(${creditcardids})""".query(using CreditcardRow.read).stream } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] = { + selectByIds(creditcardids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilder("sales.creditcard", CreditcardFields.structure, CreditcardRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala index efb0b5438f..252e14393a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala @@ -81,6 +81,12 @@ class CreditcardRepoMock(toRow: Function1[CreditcardRowUnsaved, CreditcardRow], override def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): Stream[ConnectionIO, CreditcardRow] = { Stream.emits(creditcardids.flatMap(map.get).toList) } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] = { + selectByIds(creditcardids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, CreditcardFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala index 07257e5bd5..ab45ba3c56 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala @@ -26,6 +26,7 @@ trait CurrencyRepo { def selectAll: Stream[ConnectionIO, CurrencyRow] def selectById(currencycode: CurrencyId): ConnectionIO[Option[CurrencyRow]] def selectByIds(currencycodes: Array[CurrencyId]): Stream[ConnectionIO, CurrencyRow] + def selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, Option[CurrencyRow]]] def update: UpdateBuilder[CurrencyFields, CurrencyRow] def update(row: CurrencyRow): ConnectionIO[Boolean] def upsert(unsaved: CurrencyRow): ConnectionIO[CurrencyRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala index f6f04c0ece..ea8197a980 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala @@ -81,6 +81,12 @@ class CurrencyRepoImpl extends CurrencyRepo { override def selectByIds(currencycodes: Array[CurrencyId]): Stream[ConnectionIO, CurrencyRow] = { sql"""select "currencycode", "name", "modifieddate"::text from sales.currency where "currencycode" = ANY(${currencycodes})""".query(using CurrencyRow.read).stream } + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, Option[CurrencyRow]]] = { + selectByIds(currencycodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilder("sales.currency", CurrencyFields.structure, CurrencyRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala index f9dd35cbe4..255df2ea93 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala @@ -79,6 +79,12 @@ class CurrencyRepoMock(toRow: Function1[CurrencyRowUnsaved, CurrencyRow], override def selectByIds(currencycodes: Array[CurrencyId]): Stream[ConnectionIO, CurrencyRow] = { Stream.emits(currencycodes.flatMap(map.get).toList) } + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, Option[CurrencyRow]]] = { + selectByIds(currencycodes).compile.toList.map { rows => + val byId = rows.view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala index 628e15f011..a11348ff95 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala @@ -26,6 +26,7 @@ trait CurrencyrateRepo { def selectAll: Stream[ConnectionIO, CurrencyrateRow] def selectById(currencyrateid: CurrencyrateId): ConnectionIO[Option[CurrencyrateRow]] def selectByIds(currencyrateids: Array[CurrencyrateId]): Stream[ConnectionIO, CurrencyrateRow] + def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, Option[CurrencyrateRow]]] def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] def update(row: CurrencyrateRow): ConnectionIO[Boolean] def upsert(unsaved: CurrencyrateRow): ConnectionIO[CurrencyrateRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala index 8126086def..66ebe3a1c0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala @@ -89,6 +89,12 @@ class CurrencyrateRepoImpl extends CurrencyrateRepo { override def selectByIds(currencyrateids: Array[CurrencyrateId]): Stream[ConnectionIO, CurrencyrateRow] = { sql"""select "currencyrateid", "currencyratedate"::text, "fromcurrencycode", "tocurrencycode", "averagerate", "endofdayrate", "modifieddate"::text from sales.currencyrate where "currencyrateid" = ANY(${currencyrateids})""".query(using CurrencyrateRow.read).stream } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, Option[CurrencyrateRow]]] = { + selectByIds(currencyrateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilder("sales.currencyrate", CurrencyrateFields.structure, CurrencyrateRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala index ada4ae3c70..9c665e0e09 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala @@ -79,6 +79,12 @@ class CurrencyrateRepoMock(toRow: Function1[CurrencyrateRowUnsaved, Currencyrate override def selectByIds(currencyrateids: Array[CurrencyrateId]): Stream[ConnectionIO, CurrencyrateRow] = { Stream.emits(currencyrateids.flatMap(map.get).toList) } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, Option[CurrencyrateRow]]] = { + selectByIds(currencyrateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyrateFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala index 753d92eb89..dad8925d48 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala @@ -26,6 +26,7 @@ trait CustomerRepo { def selectAll: Stream[ConnectionIO, CustomerRow] def selectById(customerid: CustomerId): ConnectionIO[Option[CustomerRow]] def selectByIds(customerids: Array[CustomerId]): Stream[ConnectionIO, CustomerRow] + def selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, Option[CustomerRow]]] def update: UpdateBuilder[CustomerFields, CustomerRow] def update(row: CustomerRow): ConnectionIO[Boolean] def upsert(unsaved: CustomerRow): ConnectionIO[CustomerRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala index b16e8b60e4..3252631e02 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala @@ -92,6 +92,12 @@ class CustomerRepoImpl extends CustomerRepo { override def selectByIds(customerids: Array[CustomerId]): Stream[ConnectionIO, CustomerRow] = { sql"""select "customerid", "personid", "storeid", "territoryid", "rowguid", "modifieddate"::text from sales.customer where "customerid" = ANY(${customerids})""".query(using CustomerRow.read).stream } + override def selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, Option[CustomerRow]]] = { + selectByIds(customerids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilder("sales.customer", CustomerFields.structure, CustomerRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala index 1860a5411d..6726cf0050 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala @@ -79,6 +79,12 @@ class CustomerRepoMock(toRow: Function1[CustomerRowUnsaved, CustomerRow], override def selectByIds(customerids: Array[CustomerId]): Stream[ConnectionIO, CustomerRow] = { Stream.emits(customerids.flatMap(map.get).toList) } + override def selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, Option[CustomerRow]]] = { + selectByIds(customerids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilderMock(UpdateParams.empty, CustomerFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala index e9624841af..7d567a259c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala @@ -28,6 +28,7 @@ trait PersoncreditcardRepo { def selectAll: Stream[ConnectionIO, PersoncreditcardRow] def selectById(compositeId: PersoncreditcardId): ConnectionIO[Option[PersoncreditcardRow]] def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): Stream[ConnectionIO, PersoncreditcardRow] + def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, Option[PersoncreditcardRow]]] def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] def update(row: PersoncreditcardRow): ConnectionIO[Boolean] def upsert(unsaved: PersoncreditcardRow): ConnectionIO[PersoncreditcardRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala index bcb12c8067..88e443f851 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala @@ -97,6 +97,12 @@ class PersoncreditcardRepoImpl extends PersoncreditcardRepo { """.query(using PersoncreditcardRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, Option[PersoncreditcardRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilder("sales.personcreditcard", PersoncreditcardFields.structure, PersoncreditcardRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala index c2d4f081b6..5d092d179d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala @@ -81,6 +81,12 @@ class PersoncreditcardRepoMock(toRow: Function1[PersoncreditcardRowUnsaved, Pers override def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): Stream[ConnectionIO, PersoncreditcardRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, Option[PersoncreditcardRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, PersoncreditcardFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala index e0337f29a8..5c70c82cb0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala @@ -26,6 +26,7 @@ trait SalesorderdetailRepo { def selectAll: Stream[ConnectionIO, SalesorderdetailRow] def selectById(compositeId: SalesorderdetailId): ConnectionIO[Option[SalesorderdetailRow]] def selectByIds(compositeIds: Array[SalesorderdetailId]): Stream[ConnectionIO, SalesorderdetailRow] + def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, Option[SalesorderdetailRow]]] def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] def update(row: SalesorderdetailRow): ConnectionIO[Boolean] def upsert(unsaved: SalesorderdetailRow): ConnectionIO[SalesorderdetailRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala index 8cb0bbe6b6..e40a569a88 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala @@ -116,6 +116,12 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.query(using SalesorderdetailRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilder("sales.salesorderdetail", SalesorderdetailFields.structure, SalesorderdetailRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala index a4e1df5a3f..3f55fa376e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala @@ -79,6 +79,12 @@ class SalesorderdetailRepoMock(toRow: Function1[SalesorderdetailRowUnsaved, Sale override def selectByIds(compositeIds: Array[SalesorderdetailId]): Stream[ConnectionIO, SalesorderdetailRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderdetailFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala index 4857c660d3..884a925f46 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala @@ -26,6 +26,7 @@ trait SalesorderheaderRepo { def selectAll: Stream[ConnectionIO, SalesorderheaderRow] def selectById(salesorderid: SalesorderheaderId): ConnectionIO[Option[SalesorderheaderRow]] def selectByIds(salesorderids: Array[SalesorderheaderId]): Stream[ConnectionIO, SalesorderheaderRow] + def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, Option[SalesorderheaderRow]]] def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] def update(row: SalesorderheaderRow): ConnectionIO[Boolean] def upsert(unsaved: SalesorderheaderRow): ConnectionIO[SalesorderheaderRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala index e3f103f7c1..4b0b61d9ae 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala @@ -142,6 +142,12 @@ class SalesorderheaderRepoImpl extends SalesorderheaderRepo { override def selectByIds(salesorderids: Array[SalesorderheaderId]): Stream[ConnectionIO, SalesorderheaderRow] = { sql"""select "salesorderid", "revisionnumber", "orderdate"::text, "duedate"::text, "shipdate"::text, "status", "onlineorderflag", "purchaseordernumber", "accountnumber", "customerid", "salespersonid", "territoryid", "billtoaddressid", "shiptoaddressid", "shipmethodid", "creditcardid", "creditcardapprovalcode", "currencyrateid", "subtotal", "taxamt", "freight", "totaldue", "comment", "rowguid", "modifieddate"::text from sales.salesorderheader where "salesorderid" = ANY(${salesorderids})""".query(using SalesorderheaderRow.read).stream } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, Option[SalesorderheaderRow]]] = { + selectByIds(salesorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilder("sales.salesorderheader", SalesorderheaderFields.structure, SalesorderheaderRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala index db7ebc88d9..465581d3ff 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala @@ -79,6 +79,12 @@ class SalesorderheaderRepoMock(toRow: Function1[SalesorderheaderRowUnsaved, Sale override def selectByIds(salesorderids: Array[SalesorderheaderId]): Stream[ConnectionIO, SalesorderheaderRow] = { Stream.emits(salesorderids.flatMap(map.get).toList) } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, Option[SalesorderheaderRow]]] = { + selectByIds(salesorderids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheaderFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala index 0c11a5455a..adb3755020 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala @@ -26,6 +26,7 @@ trait SalesorderheadersalesreasonRepo { def selectAll: Stream[ConnectionIO, SalesorderheadersalesreasonRow] def selectById(compositeId: SalesorderheadersalesreasonId): ConnectionIO[Option[SalesorderheadersalesreasonRow]] def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId]): Stream[ConnectionIO, SalesorderheadersalesreasonRow] + def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] def update(row: SalesorderheadersalesreasonRow): ConnectionIO[Boolean] def upsert(unsaved: SalesorderheadersalesreasonRow): ConnectionIO[SalesorderheadersalesreasonRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala index 46a94c397c..9bd8305ef0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala @@ -96,6 +96,12 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.query(using SalesorderheadersalesreasonRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilder("sales.salesorderheadersalesreason", SalesorderheadersalesreasonFields.structure, SalesorderheadersalesreasonRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala index 406d63fce9..ba3c57efa8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala @@ -79,6 +79,12 @@ class SalesorderheadersalesreasonRepoMock(toRow: Function1[Salesorderheadersales override def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId]): Stream[ConnectionIO, SalesorderheadersalesreasonRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheadersalesreasonFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala index d434284231..bed41c2f2e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala @@ -27,6 +27,7 @@ trait SalespersonRepo { def selectAll: Stream[ConnectionIO, SalespersonRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[SalespersonRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, SalespersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[SalespersonRow]]] def update: UpdateBuilder[SalespersonFields, SalespersonRow] def update(row: SalespersonRow): ConnectionIO[Boolean] def upsert(unsaved: SalespersonRow): ConnectionIO[SalespersonRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala index 66c0b79ebc..3bcc84fbb9 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala @@ -105,6 +105,12 @@ class SalespersonRepoImpl extends SalespersonRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, SalespersonRow] = { sql"""select "businessentityid", "territoryid", "salesquota", "bonus", "commissionpct", "salesytd", "saleslastyear", "rowguid", "modifieddate"::text from sales.salesperson where "businessentityid" = ANY(${businessentityids})""".query(using SalespersonRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[SalespersonRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilder("sales.salesperson", SalespersonFields.structure, SalespersonRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala index bdcf213530..c76758996c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala @@ -80,6 +80,12 @@ class SalespersonRepoMock(toRow: Function1[SalespersonRowUnsaved, SalespersonRow override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, SalespersonRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[SalespersonRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala index 7d5d17d2f3..05ce3e9051 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala @@ -26,6 +26,7 @@ trait SalespersonquotahistoryRepo { def selectAll: Stream[ConnectionIO, SalespersonquotahistoryRow] def selectById(compositeId: SalespersonquotahistoryId): ConnectionIO[Option[SalespersonquotahistoryRow]] def selectByIds(compositeIds: Array[SalespersonquotahistoryId]): Stream[ConnectionIO, SalespersonquotahistoryRow] + def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] def update(row: SalespersonquotahistoryRow): ConnectionIO[Boolean] def upsert(unsaved: SalespersonquotahistoryRow): ConnectionIO[SalespersonquotahistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala index 40753a3d79..536128ab79 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala @@ -102,6 +102,12 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.query(using SalespersonquotahistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilder("sales.salespersonquotahistory", SalespersonquotahistoryFields.structure, SalespersonquotahistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala index 15bbcf2b7f..fca5c27379 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala @@ -79,6 +79,12 @@ class SalespersonquotahistoryRepoMock(toRow: Function1[SalespersonquotahistoryRo override def selectByIds(compositeIds: Array[SalespersonquotahistoryId]): Stream[ConnectionIO, SalespersonquotahistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonquotahistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala index 23d02291bf..ef34694de6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala @@ -26,6 +26,7 @@ trait SalesreasonRepo { def selectAll: Stream[ConnectionIO, SalesreasonRow] def selectById(salesreasonid: SalesreasonId): ConnectionIO[Option[SalesreasonRow]] def selectByIds(salesreasonids: Array[SalesreasonId]): Stream[ConnectionIO, SalesreasonRow] + def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, Option[SalesreasonRow]]] def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] def update(row: SalesreasonRow): ConnectionIO[Boolean] def upsert(unsaved: SalesreasonRow): ConnectionIO[SalesreasonRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala index 92c304e908..818d874624 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala @@ -85,6 +85,12 @@ class SalesreasonRepoImpl extends SalesreasonRepo { override def selectByIds(salesreasonids: Array[SalesreasonId]): Stream[ConnectionIO, SalesreasonRow] = { sql"""select "salesreasonid", "name", "reasontype", "modifieddate"::text from sales.salesreason where "salesreasonid" = ANY(${salesreasonids})""".query(using SalesreasonRow.read).stream } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, Option[SalesreasonRow]]] = { + selectByIds(salesreasonids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilder("sales.salesreason", SalesreasonFields.structure, SalesreasonRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala index 02f8871ec6..f1885865a5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala @@ -79,6 +79,12 @@ class SalesreasonRepoMock(toRow: Function1[SalesreasonRowUnsaved, SalesreasonRow override def selectByIds(salesreasonids: Array[SalesreasonId]): Stream[ConnectionIO, SalesreasonRow] = { Stream.emits(salesreasonids.flatMap(map.get).toList) } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, Option[SalesreasonRow]]] = { + selectByIds(salesreasonids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesreasonFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala index 840c767cb7..2a99de9b22 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala @@ -26,6 +26,7 @@ trait SalestaxrateRepo { def selectAll: Stream[ConnectionIO, SalestaxrateRow] def selectById(salestaxrateid: SalestaxrateId): ConnectionIO[Option[SalestaxrateRow]] def selectByIds(salestaxrateids: Array[SalestaxrateId]): Stream[ConnectionIO, SalestaxrateRow] + def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, Option[SalestaxrateRow]]] def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] def update(row: SalestaxrateRow): ConnectionIO[Boolean] def upsert(unsaved: SalestaxrateRow): ConnectionIO[SalestaxrateRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala index 51998001cb..c83a841237 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala @@ -98,6 +98,12 @@ class SalestaxrateRepoImpl extends SalestaxrateRepo { override def selectByIds(salestaxrateids: Array[SalestaxrateId]): Stream[ConnectionIO, SalestaxrateRow] = { sql"""select "salestaxrateid", "stateprovinceid", "taxtype", "taxrate", "name", "rowguid", "modifieddate"::text from sales.salestaxrate where "salestaxrateid" = ANY(${salestaxrateids})""".query(using SalestaxrateRow.read).stream } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, Option[SalestaxrateRow]]] = { + selectByIds(salestaxrateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilder("sales.salestaxrate", SalestaxrateFields.structure, SalestaxrateRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala index 20af3e398c..9756de5560 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala @@ -79,6 +79,12 @@ class SalestaxrateRepoMock(toRow: Function1[SalestaxrateRowUnsaved, Salestaxrate override def selectByIds(salestaxrateids: Array[SalestaxrateId]): Stream[ConnectionIO, SalestaxrateRow] = { Stream.emits(salestaxrateids.flatMap(map.get).toList) } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, Option[SalestaxrateRow]]] = { + selectByIds(salestaxrateids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilderMock(UpdateParams.empty, SalestaxrateFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala index 229beaf4af..5037de2175 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala @@ -26,6 +26,7 @@ trait SalesterritoryRepo { def selectAll: Stream[ConnectionIO, SalesterritoryRow] def selectById(territoryid: SalesterritoryId): ConnectionIO[Option[SalesterritoryRow]] def selectByIds(territoryids: Array[SalesterritoryId]): Stream[ConnectionIO, SalesterritoryRow] + def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, Option[SalesterritoryRow]]] def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] def update(row: SalesterritoryRow): ConnectionIO[Boolean] def upsert(unsaved: SalesterritoryRow): ConnectionIO[SalesterritoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala index fe31652fc4..6b96e6e121 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala @@ -109,6 +109,12 @@ class SalesterritoryRepoImpl extends SalesterritoryRepo { override def selectByIds(territoryids: Array[SalesterritoryId]): Stream[ConnectionIO, SalesterritoryRow] = { sql"""select "territoryid", "name", "countryregioncode", "group", "salesytd", "saleslastyear", "costytd", "costlastyear", "rowguid", "modifieddate"::text from sales.salesterritory where "territoryid" = ANY(${territoryids})""".query(using SalesterritoryRow.read).stream } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, Option[SalesterritoryRow]]] = { + selectByIds(territoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilder("sales.salesterritory", SalesterritoryFields.structure, SalesterritoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala index e1d79e37b5..b7a44e004c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala @@ -79,6 +79,12 @@ class SalesterritoryRepoMock(toRow: Function1[SalesterritoryRowUnsaved, Salester override def selectByIds(territoryids: Array[SalesterritoryId]): Stream[ConnectionIO, SalesterritoryRow] = { Stream.emits(territoryids.flatMap(map.get).toList) } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, Option[SalesterritoryRow]]] = { + selectByIds(territoryids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala index 7f3198bf85..55c4b5733e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala @@ -26,6 +26,7 @@ trait SalesterritoryhistoryRepo { def selectAll: Stream[ConnectionIO, SalesterritoryhistoryRow] def selectById(compositeId: SalesterritoryhistoryId): ConnectionIO[Option[SalesterritoryhistoryRow]] def selectByIds(compositeIds: Array[SalesterritoryhistoryId]): Stream[ConnectionIO, SalesterritoryhistoryRow] + def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] def update(row: SalesterritoryhistoryRow): ConnectionIO[Boolean] def upsert(unsaved: SalesterritoryhistoryRow): ConnectionIO[SalesterritoryhistoryRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala index 64efffdab0..0ad71ea89c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala @@ -105,6 +105,12 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.query(using SalesterritoryhistoryRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilder("sales.salesterritoryhistory", SalesterritoryhistoryFields.structure, SalesterritoryhistoryRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala index 6e58522ba2..d061ebff5d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala @@ -79,6 +79,12 @@ class SalesterritoryhistoryRepoMock(toRow: Function1[SalesterritoryhistoryRowUns override def selectByIds(compositeIds: Array[SalesterritoryhistoryId]): Stream[ConnectionIO, SalesterritoryhistoryRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryhistoryFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala index f8c9aa0d57..4cfaa5c135 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala @@ -26,6 +26,7 @@ trait ShoppingcartitemRepo { def selectAll: Stream[ConnectionIO, ShoppingcartitemRow] def selectById(shoppingcartitemid: ShoppingcartitemId): ConnectionIO[Option[ShoppingcartitemRow]] def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): Stream[ConnectionIO, ShoppingcartitemRow] + def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] def update(row: ShoppingcartitemRow): ConnectionIO[Boolean] def upsert(unsaved: ShoppingcartitemRow): ConnectionIO[ShoppingcartitemRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala index 9a4c15d67b..59eda3ba90 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala @@ -94,6 +94,12 @@ class ShoppingcartitemRepoImpl extends ShoppingcartitemRepo { override def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): Stream[ConnectionIO, ShoppingcartitemRow] = { sql"""select "shoppingcartitemid", "shoppingcartid", "quantity", "productid", "datecreated"::text, "modifieddate"::text from sales.shoppingcartitem where "shoppingcartitemid" = ANY(${shoppingcartitemids})""".query(using ShoppingcartitemRow.read).stream } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] = { + selectByIds(shoppingcartitemids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilder("sales.shoppingcartitem", ShoppingcartitemFields.structure, ShoppingcartitemRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala index b8da8e8c78..850dc4773b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala @@ -79,6 +79,12 @@ class ShoppingcartitemRepoMock(toRow: Function1[ShoppingcartitemRowUnsaved, Shop override def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): Stream[ConnectionIO, ShoppingcartitemRow] = { Stream.emits(shoppingcartitemids.flatMap(map.get).toList) } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] = { + selectByIds(shoppingcartitemids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilderMock(UpdateParams.empty, ShoppingcartitemFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala index c44beee1b2..e5af9823c5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala @@ -26,6 +26,7 @@ trait SpecialofferRepo { def selectAll: Stream[ConnectionIO, SpecialofferRow] def selectById(specialofferid: SpecialofferId): ConnectionIO[Option[SpecialofferRow]] def selectByIds(specialofferids: Array[SpecialofferId]): Stream[ConnectionIO, SpecialofferRow] + def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, Option[SpecialofferRow]]] def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] def update(row: SpecialofferRow): ConnectionIO[Boolean] def upsert(unsaved: SpecialofferRow): ConnectionIO[SpecialofferRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala index 37a7664a4e..0ec9477921 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala @@ -102,6 +102,12 @@ class SpecialofferRepoImpl extends SpecialofferRepo { override def selectByIds(specialofferids: Array[SpecialofferId]): Stream[ConnectionIO, SpecialofferRow] = { sql"""select "specialofferid", "description", "discountpct", "type", "category", "startdate"::text, "enddate"::text, "minqty", "maxqty", "rowguid", "modifieddate"::text from sales.specialoffer where "specialofferid" = ANY(${specialofferids})""".query(using SpecialofferRow.read).stream } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, Option[SpecialofferRow]]] = { + selectByIds(specialofferids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilder("sales.specialoffer", SpecialofferFields.structure, SpecialofferRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala index a0062a7b44..90c62069c8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala @@ -79,6 +79,12 @@ class SpecialofferRepoMock(toRow: Function1[SpecialofferRowUnsaved, Specialoffer override def selectByIds(specialofferids: Array[SpecialofferId]): Stream[ConnectionIO, SpecialofferRow] = { Stream.emits(specialofferids.flatMap(map.get).toList) } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, Option[SpecialofferRow]]] = { + selectByIds(specialofferids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala index f342980bf6..0444298604 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala @@ -26,6 +26,7 @@ trait SpecialofferproductRepo { def selectAll: Stream[ConnectionIO, SpecialofferproductRow] def selectById(compositeId: SpecialofferproductId): ConnectionIO[Option[SpecialofferproductRow]] def selectByIds(compositeIds: Array[SpecialofferproductId]): Stream[ConnectionIO, SpecialofferproductRow] + def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, Option[SpecialofferproductRow]]] def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] def update(row: SpecialofferproductRow): ConnectionIO[Boolean] def upsert(unsaved: SpecialofferproductRow): ConnectionIO[SpecialofferproductRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala index 6ad3fc603e..c88cde649d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala @@ -101,6 +101,12 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.query(using SpecialofferproductRow.read).stream } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilder("sales.specialofferproduct", SpecialofferproductFields.structure, SpecialofferproductRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala index e2b00f08eb..f21ec02c6f 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala @@ -79,6 +79,12 @@ class SpecialofferproductRepoMock(toRow: Function1[SpecialofferproductRowUnsaved override def selectByIds(compositeIds: Array[SpecialofferproductId]): Stream[ConnectionIO, SpecialofferproductRow] = { Stream.emits(compositeIds.flatMap(map.get).toList) } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + selectByIds(compositeIds).compile.toList.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferproductFields.structure.fields, map) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala index 1bc478c648..ad4a39ddd0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala @@ -27,6 +27,7 @@ trait StoreRepo { def selectAll: Stream[ConnectionIO, StoreRow] def selectById(businessentityid: BusinessentityId): ConnectionIO[Option[StoreRow]] def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, StoreRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[StoreRow]]] def update: UpdateBuilder[StoreFields, StoreRow] def update(row: StoreRow): ConnectionIO[Boolean] def upsert(unsaved: StoreRow): ConnectionIO[StoreRow] diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala index e18dcf0591..d3ed6111b6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala @@ -90,6 +90,12 @@ class StoreRepoImpl extends StoreRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, StoreRow] = { sql"""select "businessentityid", "name", "salespersonid", "demographics", "rowguid", "modifieddate"::text from sales.store where "businessentityid" = ANY(${businessentityids})""".query(using StoreRow.read).stream } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[StoreRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilder("sales.store", StoreFields.structure, StoreRow.read) } diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala index 234dd9f950..7d80645332 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala @@ -80,6 +80,12 @@ class StoreRepoMock(toRow: Function1[StoreRowUnsaved, StoreRow], override def selectByIds(businessentityids: Array[BusinessentityId]): Stream[ConnectionIO, StoreRow] = { Stream.emits(businessentityids.flatMap(map.get).toList) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, Option[StoreRow]]] = { + selectByIds(businessentityids).compile.toList.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilderMock(UpdateParams.empty, StoreFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala index 837de0f546..9ea0c765da 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepo.scala @@ -28,6 +28,7 @@ trait DepartmentRepo { def selectAll: ZStream[ZConnection, Throwable, DepartmentRow] def selectById(departmentid: DepartmentId): ZIO[ZConnection, Throwable, Option[DepartmentRow]] def selectByIds(departmentids: Array[DepartmentId]): ZStream[ZConnection, Throwable, DepartmentRow] + def selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, Option[DepartmentRow]]] def update: UpdateBuilder[DepartmentFields, DepartmentRow] def update(row: DepartmentRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: DepartmentRow): ZIO[ZConnection, Throwable, UpdateResult[DepartmentRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala index d560b1765e..4298f61ffd 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala @@ -84,6 +84,12 @@ class DepartmentRepoImpl extends DepartmentRepo { override def selectByIds(departmentids: Array[DepartmentId]): ZStream[ZConnection, Throwable, DepartmentRow] = { sql"""select "departmentid", "name", "groupname", "modifieddate"::text from humanresources.department where "departmentid" = ANY(${Segment.paramSegment(departmentids)(DepartmentId.arraySetter)})""".query(using DepartmentRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, Option[DepartmentRow]]] = { + selectByIds(departmentids).runCollect.map { rows => + val byId = rows.view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilder("humanresources.department", DepartmentFields.structure, DepartmentRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala index 0644e62c3c..c1dd2880ad 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoMock.scala @@ -78,6 +78,12 @@ class DepartmentRepoMock(toRow: Function1[DepartmentRowUnsaved, DepartmentRow], override def selectByIds(departmentids: Array[DepartmentId]): ZStream[ZConnection, Throwable, DepartmentRow] = { ZStream.fromIterable(departmentids.flatMap(map.get)) } + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, Option[DepartmentRow]]] = { + selectByIds(departmentids).runCollect.map { rows => + val byId = rows.view.map(x => (x.departmentid, x)).toMap + departmentids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { UpdateBuilderMock(UpdateParams.empty, DepartmentFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala index 20bb9cbaca..162544f683 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepo.scala @@ -29,6 +29,7 @@ trait EmployeeRepo { def selectAll: ZStream[ZConnection, Throwable, EmployeeRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[EmployeeRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, EmployeeRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[EmployeeRow]]] def update: UpdateBuilder[EmployeeFields, EmployeeRow] def update(row: EmployeeRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: EmployeeRow): ZIO[ZConnection, Throwable, UpdateResult[EmployeeRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala index bda9b150b6..78c99b6767 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala @@ -115,6 +115,12 @@ class EmployeeRepoImpl extends EmployeeRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, EmployeeRow] = { sql"""select "businessentityid", "nationalidnumber", "loginid", "jobtitle", "birthdate"::text, "maritalstatus", "gender", "hiredate"::text, "salariedflag", "vacationhours", "sickleavehours", "currentflag", "rowguid", "modifieddate"::text, "organizationnode" from humanresources.employee where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using EmployeeRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[EmployeeRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilder("humanresources.employee", EmployeeFields.structure, EmployeeRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala index d37a0e6aa7..4d0d87037f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoMock.scala @@ -79,6 +79,12 @@ class EmployeeRepoMock(toRow: Function1[EmployeeRowUnsaved, EmployeeRow], override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, EmployeeRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[EmployeeRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeeFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala index dd1026b650..8a0de34dc3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepo.scala @@ -28,6 +28,7 @@ trait EmployeedepartmenthistoryRepo { def selectAll: ZStream[ZConnection, Throwable, EmployeedepartmenthistoryRow] def selectById(compositeId: EmployeedepartmenthistoryId): ZIO[ZConnection, Throwable, Option[EmployeedepartmenthistoryRow]] def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId]): ZStream[ZConnection, Throwable, EmployeedepartmenthistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] def update(row: EmployeedepartmenthistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: EmployeedepartmenthistoryRow): ZIO[ZConnection, Throwable, UpdateResult[EmployeedepartmenthistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala index 3fd560bf95..5d204d68ea 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala @@ -105,6 +105,12 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.query(using EmployeedepartmenthistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilder("humanresources.employeedepartmenthistory", EmployeedepartmenthistoryFields.structure, EmployeedepartmenthistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala index a87e01b337..5540343cd1 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoMock.scala @@ -78,6 +78,12 @@ class EmployeedepartmenthistoryRepoMock(toRow: Function1[Employeedepartmenthisto override def selectByIds(compositeIds: Array[EmployeedepartmenthistoryId]): ZStream[ZConnection, Throwable, EmployeedepartmenthistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeedepartmenthistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala index 45567710d6..1fc79fbf0f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepo.scala @@ -28,6 +28,7 @@ trait EmployeepayhistoryRepo { def selectAll: ZStream[ZConnection, Throwable, EmployeepayhistoryRow] def selectById(compositeId: EmployeepayhistoryId): ZIO[ZConnection, Throwable, Option[EmployeepayhistoryRow]] def selectByIds(compositeIds: Array[EmployeepayhistoryId]): ZStream[ZConnection, Throwable, EmployeepayhistoryRow] + def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] def update(row: EmployeepayhistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: EmployeepayhistoryRow): ZIO[ZConnection, Throwable, UpdateResult[EmployeepayhistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala index f7b9678965..0c8451c15a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala @@ -98,6 +98,12 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.query(using EmployeepayhistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilder("humanresources.employeepayhistory", EmployeepayhistoryFields.structure, EmployeepayhistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala index 77ac106e21..701e0dfa56 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoMock.scala @@ -78,6 +78,12 @@ class EmployeepayhistoryRepoMock(toRow: Function1[EmployeepayhistoryRowUnsaved, override def selectByIds(compositeIds: Array[EmployeepayhistoryId]): ZStream[ZConnection, Throwable, EmployeepayhistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, EmployeepayhistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala index d6e653bfd0..71881d6241 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepo.scala @@ -28,6 +28,7 @@ trait JobcandidateRepo { def selectAll: ZStream[ZConnection, Throwable, JobcandidateRow] def selectById(jobcandidateid: JobcandidateId): ZIO[ZConnection, Throwable, Option[JobcandidateRow]] def selectByIds(jobcandidateids: Array[JobcandidateId]): ZStream[ZConnection, Throwable, JobcandidateRow] + def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, Option[JobcandidateRow]]] def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] def update(row: JobcandidateRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: JobcandidateRow): ZIO[ZConnection, Throwable, UpdateResult[JobcandidateRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala index 7bfa86b423..2e8d430ab9 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala @@ -86,6 +86,12 @@ class JobcandidateRepoImpl extends JobcandidateRepo { override def selectByIds(jobcandidateids: Array[JobcandidateId]): ZStream[ZConnection, Throwable, JobcandidateRow] = { sql"""select "jobcandidateid", "businessentityid", "resume", "modifieddate"::text from humanresources.jobcandidate where "jobcandidateid" = ANY(${Segment.paramSegment(jobcandidateids)(JobcandidateId.arraySetter)})""".query(using JobcandidateRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, Option[JobcandidateRow]]] = { + selectByIds(jobcandidateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilder("humanresources.jobcandidate", JobcandidateFields.structure, JobcandidateRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala index 3f6a65153a..d2e41081d5 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoMock.scala @@ -78,6 +78,12 @@ class JobcandidateRepoMock(toRow: Function1[JobcandidateRowUnsaved, Jobcandidate override def selectByIds(jobcandidateids: Array[JobcandidateId]): ZStream[ZConnection, Throwable, JobcandidateRow] = { ZStream.fromIterable(jobcandidateids.flatMap(map.get)) } + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, Option[JobcandidateRow]]] = { + selectByIds(jobcandidateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.jobcandidateid, x)).toMap + jobcandidateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { UpdateBuilderMock(UpdateParams.empty, JobcandidateFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala index 3d83c9072c..47c2bdd74a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepo.scala @@ -28,6 +28,7 @@ trait ShiftRepo { def selectAll: ZStream[ZConnection, Throwable, ShiftRow] def selectById(shiftid: ShiftId): ZIO[ZConnection, Throwable, Option[ShiftRow]] def selectByIds(shiftids: Array[ShiftId]): ZStream[ZConnection, Throwable, ShiftRow] + def selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, Option[ShiftRow]]] def update: UpdateBuilder[ShiftFields, ShiftRow] def update(row: ShiftRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ShiftRow): ZIO[ZConnection, Throwable, UpdateResult[ShiftRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala index b77c3006b8..90646be058 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala @@ -86,6 +86,12 @@ class ShiftRepoImpl extends ShiftRepo { override def selectByIds(shiftids: Array[ShiftId]): ZStream[ZConnection, Throwable, ShiftRow] = { sql"""select "shiftid", "name", "starttime"::text, "endtime"::text, "modifieddate"::text from humanresources.shift where "shiftid" = ANY(${Segment.paramSegment(shiftids)(ShiftId.arraySetter)})""".query(using ShiftRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, Option[ShiftRow]]] = { + selectByIds(shiftids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilder("humanresources.shift", ShiftFields.structure, ShiftRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala index eecdaf4ff2..5a287a7703 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoMock.scala @@ -78,6 +78,12 @@ class ShiftRepoMock(toRow: Function1[ShiftRowUnsaved, ShiftRow], override def selectByIds(shiftids: Array[ShiftId]): ZStream[ZConnection, Throwable, ShiftRow] = { ZStream.fromIterable(shiftids.flatMap(map.get)) } + override def selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, Option[ShiftRow]]] = { + selectByIds(shiftids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shiftid, x)).toMap + shiftids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { UpdateBuilderMock(UpdateParams.empty, ShiftFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala index 3eddab8396..d873dfbc80 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepo.scala @@ -28,6 +28,7 @@ trait AddressRepo { def selectAll: ZStream[ZConnection, Throwable, AddressRow] def selectById(addressid: AddressId): ZIO[ZConnection, Throwable, Option[AddressRow]] def selectByIds(addressids: Array[AddressId]): ZStream[ZConnection, Throwable, AddressRow] + def selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, Option[AddressRow]]] def update: UpdateBuilder[AddressFields, AddressRow] def update(row: AddressRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: AddressRow): ZIO[ZConnection, Throwable, UpdateResult[AddressRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala index 6396eec27f..78e29ca0e0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala @@ -95,6 +95,12 @@ class AddressRepoImpl extends AddressRepo { override def selectByIds(addressids: Array[AddressId]): ZStream[ZConnection, Throwable, AddressRow] = { sql"""select "addressid", "addressline1", "addressline2", "city", "stateprovinceid", "postalcode", "spatiallocation", "rowguid", "modifieddate"::text from person.address where "addressid" = ANY(${Segment.paramSegment(addressids)(AddressId.arraySetter)})""".query(using AddressRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, Option[AddressRow]]] = { + selectByIds(addressids).runCollect.map { rows => + val byId = rows.view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilder("person.address", AddressFields.structure, AddressRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala index de94f6136e..90e7d116b7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/address/AddressRepoMock.scala @@ -78,6 +78,12 @@ class AddressRepoMock(toRow: Function1[AddressRowUnsaved, AddressRow], override def selectByIds(addressids: Array[AddressId]): ZStream[ZConnection, Throwable, AddressRow] = { ZStream.fromIterable(addressids.flatMap(map.get)) } + override def selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, Option[AddressRow]]] = { + selectByIds(addressids).runCollect.map { rows => + val byId = rows.view.map(x => (x.addressid, x)).toMap + addressids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilderMock(UpdateParams.empty, AddressFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala index 0d93ce836e..1f457960d8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepo.scala @@ -28,6 +28,7 @@ trait AddresstypeRepo { def selectAll: ZStream[ZConnection, Throwable, AddresstypeRow] def selectById(addresstypeid: AddresstypeId): ZIO[ZConnection, Throwable, Option[AddresstypeRow]] def selectByIds(addresstypeids: Array[AddresstypeId]): ZStream[ZConnection, Throwable, AddresstypeRow] + def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, Option[AddresstypeRow]]] def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] def update(row: AddresstypeRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: AddresstypeRow): ZIO[ZConnection, Throwable, UpdateResult[AddresstypeRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala index 17fe2ed566..c7b896eb47 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala @@ -88,6 +88,12 @@ class AddresstypeRepoImpl extends AddresstypeRepo { override def selectByIds(addresstypeids: Array[AddresstypeId]): ZStream[ZConnection, Throwable, AddresstypeRow] = { sql"""select "addresstypeid", "name", "rowguid", "modifieddate"::text from person.addresstype where "addresstypeid" = ANY(${Segment.paramSegment(addresstypeids)(AddresstypeId.arraySetter)})""".query(using AddresstypeRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, Option[AddresstypeRow]]] = { + selectByIds(addresstypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilder("person.addresstype", AddresstypeFields.structure, AddresstypeRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala index 9968021ca9..2279bc3303 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoMock.scala @@ -78,6 +78,12 @@ class AddresstypeRepoMock(toRow: Function1[AddresstypeRowUnsaved, AddresstypeRow override def selectByIds(addresstypeids: Array[AddresstypeId]): ZStream[ZConnection, Throwable, AddresstypeRow] = { ZStream.fromIterable(addresstypeids.flatMap(map.get)) } + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, Option[AddresstypeRow]]] = { + selectByIds(addresstypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.addresstypeid, x)).toMap + addresstypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { UpdateBuilderMock(UpdateParams.empty, AddresstypeFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala index ef1960cb7a..0679944afc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepo.scala @@ -28,6 +28,7 @@ trait BusinessentityRepo { def selectAll: ZStream[ZConnection, Throwable, BusinessentityRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[BusinessentityRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, BusinessentityRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[BusinessentityRow]]] def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] def update(row: BusinessentityRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: BusinessentityRow): ZIO[ZConnection, Throwable, UpdateResult[BusinessentityRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala index 7bad1c9f72..ac14f72e17 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala @@ -86,6 +86,12 @@ class BusinessentityRepoImpl extends BusinessentityRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, BusinessentityRow] = { sql"""select "businessentityid", "rowguid", "modifieddate"::text from person.businessentity where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using BusinessentityRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[BusinessentityRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilder("person.businessentity", BusinessentityFields.structure, BusinessentityRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala index dfa433352d..e5c24bf0d3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoMock.scala @@ -78,6 +78,12 @@ class BusinessentityRepoMock(toRow: Function1[BusinessentityRowUnsaved, Business override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, BusinessentityRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[BusinessentityRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala index 5e82470e21..77d59b30fb 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepo.scala @@ -28,6 +28,7 @@ trait BusinessentityaddressRepo { def selectAll: ZStream[ZConnection, Throwable, BusinessentityaddressRow] def selectById(compositeId: BusinessentityaddressId): ZIO[ZConnection, Throwable, Option[BusinessentityaddressRow]] def selectByIds(compositeIds: Array[BusinessentityaddressId]): ZStream[ZConnection, Throwable, BusinessentityaddressRow] + def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] def update(row: BusinessentityaddressRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: BusinessentityaddressRow): ZIO[ZConnection, Throwable, UpdateResult[BusinessentityaddressRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala index 6cda5593c3..4b4da22848 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala @@ -104,6 +104,12 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.query(using BusinessentityaddressRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilder("person.businessentityaddress", BusinessentityaddressFields.structure, BusinessentityaddressRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala index 65a9ede3b6..5c7be584b7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoMock.scala @@ -78,6 +78,12 @@ class BusinessentityaddressRepoMock(toRow: Function1[BusinessentityaddressRowUns override def selectByIds(compositeIds: Array[BusinessentityaddressId]): ZStream[ZConnection, Throwable, BusinessentityaddressRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentityaddressFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala index 61eea12fb2..451effcc64 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepo.scala @@ -28,6 +28,7 @@ trait BusinessentitycontactRepo { def selectAll: ZStream[ZConnection, Throwable, BusinessentitycontactRow] def selectById(compositeId: BusinessentitycontactId): ZIO[ZConnection, Throwable, Option[BusinessentitycontactRow]] def selectByIds(compositeIds: Array[BusinessentitycontactId]): ZStream[ZConnection, Throwable, BusinessentitycontactRow] + def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] def update(row: BusinessentitycontactRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: BusinessentitycontactRow): ZIO[ZConnection, Throwable, UpdateResult[BusinessentitycontactRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala index d6efa47c4c..9eef04dcb5 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala @@ -103,6 +103,12 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.query(using BusinessentitycontactRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilder("person.businessentitycontact", BusinessentitycontactFields.structure, BusinessentitycontactRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala index 32a7aeae3f..783aba9d43 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoMock.scala @@ -78,6 +78,12 @@ class BusinessentitycontactRepoMock(toRow: Function1[BusinessentitycontactRowUns override def selectByIds(compositeIds: Array[BusinessentitycontactId]): ZStream[ZConnection, Throwable, BusinessentitycontactRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { UpdateBuilderMock(UpdateParams.empty, BusinessentitycontactFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala index 8d6f65aa90..b9929205ac 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepo.scala @@ -28,6 +28,7 @@ trait ContacttypeRepo { def selectAll: ZStream[ZConnection, Throwable, ContacttypeRow] def selectById(contacttypeid: ContacttypeId): ZIO[ZConnection, Throwable, Option[ContacttypeRow]] def selectByIds(contacttypeids: Array[ContacttypeId]): ZStream[ZConnection, Throwable, ContacttypeRow] + def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, Option[ContacttypeRow]]] def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] def update(row: ContacttypeRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ContacttypeRow): ZIO[ZConnection, Throwable, UpdateResult[ContacttypeRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala index 6a0d1bb683..53046e19d6 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala @@ -83,6 +83,12 @@ class ContacttypeRepoImpl extends ContacttypeRepo { override def selectByIds(contacttypeids: Array[ContacttypeId]): ZStream[ZConnection, Throwable, ContacttypeRow] = { sql"""select "contacttypeid", "name", "modifieddate"::text from person.contacttype where "contacttypeid" = ANY(${Segment.paramSegment(contacttypeids)(ContacttypeId.arraySetter)})""".query(using ContacttypeRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, Option[ContacttypeRow]]] = { + selectByIds(contacttypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilder("person.contacttype", ContacttypeFields.structure, ContacttypeRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala index 3d48b776b4..a38ca516aa 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoMock.scala @@ -78,6 +78,12 @@ class ContacttypeRepoMock(toRow: Function1[ContacttypeRowUnsaved, ContacttypeRow override def selectByIds(contacttypeids: Array[ContacttypeId]): ZStream[ZConnection, Throwable, ContacttypeRow] = { ZStream.fromIterable(contacttypeids.flatMap(map.get)) } + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, Option[ContacttypeRow]]] = { + selectByIds(contacttypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.contacttypeid, x)).toMap + contacttypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { UpdateBuilderMock(UpdateParams.empty, ContacttypeFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala index 3a8d9ebdda..e9b16153f3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepo.scala @@ -28,6 +28,7 @@ trait CountryregionRepo { def selectAll: ZStream[ZConnection, Throwable, CountryregionRow] def selectById(countryregioncode: CountryregionId): ZIO[ZConnection, Throwable, Option[CountryregionRow]] def selectByIds(countryregioncodes: Array[CountryregionId]): ZStream[ZConnection, Throwable, CountryregionRow] + def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, Option[CountryregionRow]]] def update: UpdateBuilder[CountryregionFields, CountryregionRow] def update(row: CountryregionRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CountryregionRow): ZIO[ZConnection, Throwable, UpdateResult[CountryregionRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala index d5c88e8f3f..e58be98652 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala @@ -80,6 +80,12 @@ class CountryregionRepoImpl extends CountryregionRepo { override def selectByIds(countryregioncodes: Array[CountryregionId]): ZStream[ZConnection, Throwable, CountryregionRow] = { sql"""select "countryregioncode", "name", "modifieddate"::text from person.countryregion where "countryregioncode" = ANY(${Segment.paramSegment(countryregioncodes)(CountryregionId.arraySetter)})""".query(using CountryregionRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, Option[CountryregionRow]]] = { + selectByIds(countryregioncodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilder("person.countryregion", CountryregionFields.structure, CountryregionRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala index e65b1980db..009346540f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoMock.scala @@ -78,6 +78,12 @@ class CountryregionRepoMock(toRow: Function1[CountryregionRowUnsaved, Countryreg override def selectByIds(countryregioncodes: Array[CountryregionId]): ZStream[ZConnection, Throwable, CountryregionRow] = { ZStream.fromIterable(countryregioncodes.flatMap(map.get)) } + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, Option[CountryregionRow]]] = { + selectByIds(countryregioncodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.countryregioncode, x)).toMap + countryregioncodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregionFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala index de6dac8263..500fe23415 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepo.scala @@ -28,6 +28,7 @@ trait EmailaddressRepo { def selectAll: ZStream[ZConnection, Throwable, EmailaddressRow] def selectById(compositeId: EmailaddressId): ZIO[ZConnection, Throwable, Option[EmailaddressRow]] def selectByIds(compositeIds: Array[EmailaddressId]): ZStream[ZConnection, Throwable, EmailaddressRow] + def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, Option[EmailaddressRow]]] def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] def update(row: EmailaddressRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: EmailaddressRow): ZIO[ZConnection, Throwable, UpdateResult[EmailaddressRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala index d5557f4e1d..2ecaa86aba 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala @@ -104,6 +104,12 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.query(using EmailaddressRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, Option[EmailaddressRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilder("person.emailaddress", EmailaddressFields.structure, EmailaddressRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala index 27c30c96ab..3f5e1c16ca 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoMock.scala @@ -78,6 +78,12 @@ class EmailaddressRepoMock(toRow: Function1[EmailaddressRowUnsaved, Emailaddress override def selectByIds(compositeIds: Array[EmailaddressId]): ZStream[ZConnection, Throwable, EmailaddressRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, Option[EmailaddressRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { UpdateBuilderMock(UpdateParams.empty, EmailaddressFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala index 042f0ee784..07c0dcd6ea 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepo.scala @@ -29,6 +29,7 @@ trait PasswordRepo { def selectAll: ZStream[ZConnection, Throwable, PasswordRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[PasswordRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PasswordRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PasswordRow]]] def update: UpdateBuilder[PasswordFields, PasswordRow] def update(row: PasswordRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PasswordRow): ZIO[ZConnection, Throwable, UpdateResult[PasswordRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala index 253fe328bb..6077ac8874 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala @@ -87,6 +87,12 @@ class PasswordRepoImpl extends PasswordRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PasswordRow] = { sql"""select "businessentityid", "passwordhash", "passwordsalt", "rowguid", "modifieddate"::text from person.password where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using PasswordRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PasswordRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilder("person.password", PasswordFields.structure, PasswordRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala index 30dd2eefb2..a380cc72a4 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/password/PasswordRepoMock.scala @@ -79,6 +79,12 @@ class PasswordRepoMock(toRow: Function1[PasswordRowUnsaved, PasswordRow], override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PasswordRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PasswordRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { UpdateBuilderMock(UpdateParams.empty, PasswordFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala index 6ac92e43f9..6067867abc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepo.scala @@ -29,6 +29,7 @@ trait PersonRepo { def selectAll: ZStream[ZConnection, Throwable, PersonRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[PersonRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PersonRow]]] def update: UpdateBuilder[PersonFields, PersonRow] def update(row: PersonRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PersonRow): ZIO[ZConnection, Throwable, UpdateResult[PersonRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala index 1bbaf98e83..e3c312690f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala @@ -105,6 +105,12 @@ class PersonRepoImpl extends PersonRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PersonRow] = { sql"""select "businessentityid", "persontype", "namestyle", "title", "firstname", "middlename", "lastname", "suffix", "emailpromotion", "additionalcontactinfo", "demographics", "rowguid", "modifieddate"::text from person.person where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using PersonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PersonRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilder("person.person", PersonFields.structure, PersonRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala index e680fb821e..011abe6307 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/person/PersonRepoMock.scala @@ -79,6 +79,12 @@ class PersonRepoMock(toRow: Function1[PersonRowUnsaved, PersonRow], override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, PersonRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[PersonRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonFields, PersonRow] = { UpdateBuilderMock(UpdateParams.empty, PersonFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala index ed07a93e60..84d2a9fc06 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepo.scala @@ -28,6 +28,7 @@ trait PersonphoneRepo { def selectAll: ZStream[ZConnection, Throwable, PersonphoneRow] def selectById(compositeId: PersonphoneId): ZIO[ZConnection, Throwable, Option[PersonphoneRow]] def selectByIds(compositeIds: Array[PersonphoneId]): ZStream[ZConnection, Throwable, PersonphoneRow] + def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, Option[PersonphoneRow]]] def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] def update(row: PersonphoneRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PersonphoneRow): ZIO[ZConnection, Throwable, UpdateResult[PersonphoneRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala index 7e6a257bd5..f4faa05416 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala @@ -99,6 +99,12 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.query(using PersonphoneRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, Option[PersonphoneRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilder("person.personphone", PersonphoneFields.structure, PersonphoneRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala index b4c2538bbd..c5ebed9c52 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoMock.scala @@ -78,6 +78,12 @@ class PersonphoneRepoMock(toRow: Function1[PersonphoneRowUnsaved, PersonphoneRow override def selectByIds(compositeIds: Array[PersonphoneId]): ZStream[ZConnection, Throwable, PersonphoneRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, Option[PersonphoneRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { UpdateBuilderMock(UpdateParams.empty, PersonphoneFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala index cb72a7db00..2817804cd1 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepo.scala @@ -28,6 +28,7 @@ trait PhonenumbertypeRepo { def selectAll: ZStream[ZConnection, Throwable, PhonenumbertypeRow] def selectById(phonenumbertypeid: PhonenumbertypeId): ZIO[ZConnection, Throwable, Option[PhonenumbertypeRow]] def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): ZStream[ZConnection, Throwable, PhonenumbertypeRow] + def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] def update(row: PhonenumbertypeRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PhonenumbertypeRow): ZIO[ZConnection, Throwable, UpdateResult[PhonenumbertypeRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala index 83aab239a7..44d6240ffa 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala @@ -83,6 +83,12 @@ class PhonenumbertypeRepoImpl extends PhonenumbertypeRepo { override def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): ZStream[ZConnection, Throwable, PhonenumbertypeRow] = { sql"""select "phonenumbertypeid", "name", "modifieddate"::text from person.phonenumbertype where "phonenumbertypeid" = ANY(${Segment.paramSegment(phonenumbertypeids)(PhonenumbertypeId.arraySetter)})""".query(using PhonenumbertypeRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] = { + selectByIds(phonenumbertypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilder("person.phonenumbertype", PhonenumbertypeFields.structure, PhonenumbertypeRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala index 0158e80719..2ee8f2705b 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoMock.scala @@ -78,6 +78,12 @@ class PhonenumbertypeRepoMock(toRow: Function1[PhonenumbertypeRowUnsaved, Phonen override def selectByIds(phonenumbertypeids: Array[PhonenumbertypeId]): ZStream[ZConnection, Throwable, PhonenumbertypeRow] = { ZStream.fromIterable(phonenumbertypeids.flatMap(map.get)) } + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, Option[PhonenumbertypeRow]]] = { + selectByIds(phonenumbertypeids).runCollect.map { rows => + val byId = rows.view.map(x => (x.phonenumbertypeid, x)).toMap + phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { UpdateBuilderMock(UpdateParams.empty, PhonenumbertypeFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala index aeae9e8e28..4d25b2c273 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepo.scala @@ -28,6 +28,7 @@ trait StateprovinceRepo { def selectAll: ZStream[ZConnection, Throwable, StateprovinceRow] def selectById(stateprovinceid: StateprovinceId): ZIO[ZConnection, Throwable, Option[StateprovinceRow]] def selectByIds(stateprovinceids: Array[StateprovinceId]): ZStream[ZConnection, Throwable, StateprovinceRow] + def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, Option[StateprovinceRow]]] def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] def update(row: StateprovinceRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: StateprovinceRow): ZIO[ZConnection, Throwable, UpdateResult[StateprovinceRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala index 6804b47456..ec7c0cca25 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala @@ -99,6 +99,12 @@ class StateprovinceRepoImpl extends StateprovinceRepo { override def selectByIds(stateprovinceids: Array[StateprovinceId]): ZStream[ZConnection, Throwable, StateprovinceRow] = { sql"""select "stateprovinceid", "stateprovincecode", "countryregioncode", "isonlystateprovinceflag", "name", "territoryid", "rowguid", "modifieddate"::text from person.stateprovince where "stateprovinceid" = ANY(${Segment.paramSegment(stateprovinceids)(StateprovinceId.arraySetter)})""".query(using StateprovinceRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, Option[StateprovinceRow]]] = { + selectByIds(stateprovinceids).runCollect.map { rows => + val byId = rows.view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilder("person.stateprovince", StateprovinceFields.structure, StateprovinceRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala index 790dd82248..4ce261e772 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoMock.scala @@ -78,6 +78,12 @@ class StateprovinceRepoMock(toRow: Function1[StateprovinceRowUnsaved, Stateprovi override def selectByIds(stateprovinceids: Array[StateprovinceId]): ZStream[ZConnection, Throwable, StateprovinceRow] = { ZStream.fromIterable(stateprovinceids.flatMap(map.get)) } + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, Option[StateprovinceRow]]] = { + selectByIds(stateprovinceids).runCollect.map { rows => + val byId = rows.view.map(x => (x.stateprovinceid, x)).toMap + stateprovinceids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { UpdateBuilderMock(UpdateParams.empty, StateprovinceFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala index 9d8ebb7fee..9733457825 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepo.scala @@ -28,6 +28,7 @@ trait BillofmaterialsRepo { def selectAll: ZStream[ZConnection, Throwable, BillofmaterialsRow] def selectById(billofmaterialsid: Int): ZIO[ZConnection, Throwable, Option[BillofmaterialsRow]] def selectByIds(billofmaterialsids: Array[Int]): ZStream[ZConnection, Throwable, BillofmaterialsRow] + def selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, Option[BillofmaterialsRow]]] def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] def update(row: BillofmaterialsRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: BillofmaterialsRow): ZIO[ZConnection, Throwable, UpdateResult[BillofmaterialsRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala index 43b4e4752f..3e8397abe7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala @@ -98,6 +98,12 @@ class BillofmaterialsRepoImpl extends BillofmaterialsRepo { override def selectByIds(billofmaterialsids: Array[Int]): ZStream[ZConnection, Throwable, BillofmaterialsRow] = { sql"""select "billofmaterialsid", "productassemblyid", "componentid", "startdate"::text, "enddate"::text, "unitmeasurecode", "bomlevel", "perassemblyqty", "modifieddate"::text from production.billofmaterials where "billofmaterialsid" = ANY(${Segment.paramSegment(billofmaterialsids)(adventureworks.IntArraySetter)})""".query(using BillofmaterialsRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, Option[BillofmaterialsRow]]] = { + selectByIds(billofmaterialsids).runCollect.map { rows => + val byId = rows.view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilder("production.billofmaterials", BillofmaterialsFields.structure, BillofmaterialsRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala index 83cfeac6ba..ae2863354a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoMock.scala @@ -78,6 +78,12 @@ class BillofmaterialsRepoMock(toRow: Function1[BillofmaterialsRowUnsaved, Billof override def selectByIds(billofmaterialsids: Array[Int]): ZStream[ZConnection, Throwable, BillofmaterialsRow] = { ZStream.fromIterable(billofmaterialsids.flatMap(map.get)) } + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, Option[BillofmaterialsRow]]] = { + selectByIds(billofmaterialsids).runCollect.map { rows => + val byId = rows.view.map(x => (x.billofmaterialsid, x)).toMap + billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { UpdateBuilderMock(UpdateParams.empty, BillofmaterialsFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala index 82e5749a9b..7a522009b0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepo.scala @@ -28,6 +28,7 @@ trait CultureRepo { def selectAll: ZStream[ZConnection, Throwable, CultureRow] def selectById(cultureid: CultureId): ZIO[ZConnection, Throwable, Option[CultureRow]] def selectByIds(cultureids: Array[CultureId]): ZStream[ZConnection, Throwable, CultureRow] + def selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, Option[CultureRow]]] def update: UpdateBuilder[CultureFields, CultureRow] def update(row: CultureRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CultureRow): ZIO[ZConnection, Throwable, UpdateResult[CultureRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala index 43988234a8..93c2fc4241 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala @@ -80,6 +80,12 @@ class CultureRepoImpl extends CultureRepo { override def selectByIds(cultureids: Array[CultureId]): ZStream[ZConnection, Throwable, CultureRow] = { sql"""select "cultureid", "name", "modifieddate"::text from production.culture where "cultureid" = ANY(${Segment.paramSegment(cultureids)(CultureId.arraySetter)})""".query(using CultureRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, Option[CultureRow]]] = { + selectByIds(cultureids).runCollect.map { rows => + val byId = rows.view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilder("production.culture", CultureFields.structure, CultureRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala index 7412fd6558..9f6e1b69ab 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/culture/CultureRepoMock.scala @@ -78,6 +78,12 @@ class CultureRepoMock(toRow: Function1[CultureRowUnsaved, CultureRow], override def selectByIds(cultureids: Array[CultureId]): ZStream[ZConnection, Throwable, CultureRow] = { ZStream.fromIterable(cultureids.flatMap(map.get)) } + override def selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, Option[CultureRow]]] = { + selectByIds(cultureids).runCollect.map { rows => + val byId = rows.view.map(x => (x.cultureid, x)).toMap + cultureids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CultureFields, CultureRow] = { UpdateBuilderMock(UpdateParams.empty, CultureFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala index bb1a74ddb9..29fe9420fa 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepo.scala @@ -29,6 +29,7 @@ trait DocumentRepo { def selectAll: ZStream[ZConnection, Throwable, DocumentRow] def selectById(documentnode: DocumentId): ZIO[ZConnection, Throwable, Option[DocumentRow]] def selectByIds(documentnodes: Array[DocumentId]): ZStream[ZConnection, Throwable, DocumentRow] + def selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, Option[DocumentRow]]] def selectByUniqueRowguid(rowguid: TypoUUID): ZIO[ZConnection, Throwable, Option[DocumentRow]] def update: UpdateBuilder[DocumentFields, DocumentRow] def update(row: DocumentRow): ZIO[ZConnection, Throwable, Boolean] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala index 1fd583fc22..9fe95fdfd7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala @@ -107,6 +107,12 @@ class DocumentRepoImpl extends DocumentRepo { override def selectByIds(documentnodes: Array[DocumentId]): ZStream[ZConnection, Throwable, DocumentRow] = { sql"""select "title", "owner", "folderflag", "filename", "fileextension", "revision", "changenumber", "status", "documentsummary", "document", "rowguid", "modifieddate"::text, "documentnode" from production.document where "documentnode" = ANY(${Segment.paramSegment(documentnodes)(DocumentId.arraySetter)})""".query(using DocumentRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, Option[DocumentRow]]] = { + selectByIds(documentnodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueRowguid(rowguid: TypoUUID): ZIO[ZConnection, Throwable, Option[DocumentRow]] = { sql"""select "title", "owner", "folderflag", "filename", "fileextension", "revision", "changenumber", "status", "documentsummary", "document", "rowguid", "modifieddate"::text, "documentnode" from production.document diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala index 815bf1726a..38cccf40bc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/document/DocumentRepoMock.scala @@ -79,6 +79,12 @@ class DocumentRepoMock(toRow: Function1[DocumentRowUnsaved, DocumentRow], override def selectByIds(documentnodes: Array[DocumentId]): ZStream[ZConnection, Throwable, DocumentRow] = { ZStream.fromIterable(documentnodes.flatMap(map.get)) } + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, Option[DocumentRow]]] = { + selectByIds(documentnodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.documentnode, x)).toMap + documentnodes.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueRowguid(rowguid: TypoUUID): ZIO[ZConnection, Throwable, Option[DocumentRow]] = { ZIO.succeed(map.values.find(v => rowguid == v.rowguid)) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala index d826d33020..dc13b83176 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepo.scala @@ -28,6 +28,7 @@ trait IllustrationRepo { def selectAll: ZStream[ZConnection, Throwable, IllustrationRow] def selectById(illustrationid: IllustrationId): ZIO[ZConnection, Throwable, Option[IllustrationRow]] def selectByIds(illustrationids: Array[IllustrationId]): ZStream[ZConnection, Throwable, IllustrationRow] + def selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, Option[IllustrationRow]]] def update: UpdateBuilder[IllustrationFields, IllustrationRow] def update(row: IllustrationRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: IllustrationRow): ZIO[ZConnection, Throwable, UpdateResult[IllustrationRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala index a5968c38eb..18eb55eb9a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala @@ -84,6 +84,12 @@ class IllustrationRepoImpl extends IllustrationRepo { override def selectByIds(illustrationids: Array[IllustrationId]): ZStream[ZConnection, Throwable, IllustrationRow] = { sql"""select "illustrationid", "diagram", "modifieddate"::text from production.illustration where "illustrationid" = ANY(${Segment.paramSegment(illustrationids)(IllustrationId.arraySetter)})""".query(using IllustrationRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, Option[IllustrationRow]]] = { + selectByIds(illustrationids).runCollect.map { rows => + val byId = rows.view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilder("production.illustration", IllustrationFields.structure, IllustrationRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala index d927c5f274..ce8b42a9fa 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoMock.scala @@ -78,6 +78,12 @@ class IllustrationRepoMock(toRow: Function1[IllustrationRowUnsaved, Illustration override def selectByIds(illustrationids: Array[IllustrationId]): ZStream[ZConnection, Throwable, IllustrationRow] = { ZStream.fromIterable(illustrationids.flatMap(map.get)) } + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, Option[IllustrationRow]]] = { + selectByIds(illustrationids).runCollect.map { rows => + val byId = rows.view.map(x => (x.illustrationid, x)).toMap + illustrationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { UpdateBuilderMock(UpdateParams.empty, IllustrationFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala index ed7e240b17..a01aedf02b 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepo.scala @@ -28,6 +28,7 @@ trait LocationRepo { def selectAll: ZStream[ZConnection, Throwable, LocationRow] def selectById(locationid: LocationId): ZIO[ZConnection, Throwable, Option[LocationRow]] def selectByIds(locationids: Array[LocationId]): ZStream[ZConnection, Throwable, LocationRow] + def selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, Option[LocationRow]]] def update: UpdateBuilder[LocationFields, LocationRow] def update(row: LocationRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: LocationRow): ZIO[ZConnection, Throwable, UpdateResult[LocationRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala index eed1e8fec3..ac69452a35 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala @@ -92,6 +92,12 @@ class LocationRepoImpl extends LocationRepo { override def selectByIds(locationids: Array[LocationId]): ZStream[ZConnection, Throwable, LocationRow] = { sql"""select "locationid", "name", "costrate", "availability", "modifieddate"::text from production.location where "locationid" = ANY(${Segment.paramSegment(locationids)(LocationId.arraySetter)})""".query(using LocationRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, Option[LocationRow]]] = { + selectByIds(locationids).runCollect.map { rows => + val byId = rows.view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilder("production.location", LocationFields.structure, LocationRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala index 5388488d29..685cfb0020 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/location/LocationRepoMock.scala @@ -78,6 +78,12 @@ class LocationRepoMock(toRow: Function1[LocationRowUnsaved, LocationRow], override def selectByIds(locationids: Array[LocationId]): ZStream[ZConnection, Throwable, LocationRow] = { ZStream.fromIterable(locationids.flatMap(map.get)) } + override def selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, Option[LocationRow]]] = { + selectByIds(locationids).runCollect.map { rows => + val byId = rows.view.map(x => (x.locationid, x)).toMap + locationids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[LocationFields, LocationRow] = { UpdateBuilderMock(UpdateParams.empty, LocationFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala index 4ee51072a2..9fa4b3d086 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepo.scala @@ -28,6 +28,7 @@ trait ProductRepo { def selectAll: ZStream[ZConnection, Throwable, ProductRow] def selectById(productid: ProductId): ZIO[ZConnection, Throwable, Option[ProductRow]] def selectByIds(productids: Array[ProductId]): ZStream[ZConnection, Throwable, ProductRow] + def selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, Option[ProductRow]]] def update: UpdateBuilder[ProductFields, ProductRow] def update(row: ProductRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductRow): ZIO[ZConnection, Throwable, UpdateResult[ProductRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala index 2221d4cb64..edc92116b9 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala @@ -121,6 +121,12 @@ class ProductRepoImpl extends ProductRepo { override def selectByIds(productids: Array[ProductId]): ZStream[ZConnection, Throwable, ProductRow] = { sql"""select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product where "productid" = ANY(${Segment.paramSegment(productids)(ProductId.arraySetter)})""".query(using ProductRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, Option[ProductRow]]] = { + selectByIds(productids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilder("production.product", ProductFields.structure, ProductRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala index 75693d6789..d2acedf89b 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/product/ProductRepoMock.scala @@ -78,6 +78,12 @@ class ProductRepoMock(toRow: Function1[ProductRowUnsaved, ProductRow], override def selectByIds(productids: Array[ProductId]): ZStream[ZConnection, Throwable, ProductRow] = { ZStream.fromIterable(productids.flatMap(map.get)) } + override def selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, Option[ProductRow]]] = { + selectByIds(productids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productid, x)).toMap + productids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductFields, ProductRow] = { UpdateBuilderMock(UpdateParams.empty, ProductFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala index 42b13f9945..63de50f206 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepo.scala @@ -28,6 +28,7 @@ trait ProductcategoryRepo { def selectAll: ZStream[ZConnection, Throwable, ProductcategoryRow] def selectById(productcategoryid: ProductcategoryId): ZIO[ZConnection, Throwable, Option[ProductcategoryRow]] def selectByIds(productcategoryids: Array[ProductcategoryId]): ZStream[ZConnection, Throwable, ProductcategoryRow] + def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, Option[ProductcategoryRow]]] def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] def update(row: ProductcategoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductcategoryRow): ZIO[ZConnection, Throwable, UpdateResult[ProductcategoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala index bd7130a6b2..e1178bda45 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala @@ -88,6 +88,12 @@ class ProductcategoryRepoImpl extends ProductcategoryRepo { override def selectByIds(productcategoryids: Array[ProductcategoryId]): ZStream[ZConnection, Throwable, ProductcategoryRow] = { sql"""select "productcategoryid", "name", "rowguid", "modifieddate"::text from production.productcategory where "productcategoryid" = ANY(${Segment.paramSegment(productcategoryids)(ProductcategoryId.arraySetter)})""".query(using ProductcategoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, Option[ProductcategoryRow]]] = { + selectByIds(productcategoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilder("production.productcategory", ProductcategoryFields.structure, ProductcategoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala index 140bd0335c..493b11d585 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoMock.scala @@ -78,6 +78,12 @@ class ProductcategoryRepoMock(toRow: Function1[ProductcategoryRowUnsaved, Produc override def selectByIds(productcategoryids: Array[ProductcategoryId]): ZStream[ZConnection, Throwable, ProductcategoryRow] = { ZStream.fromIterable(productcategoryids.flatMap(map.get)) } + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, Option[ProductcategoryRow]]] = { + selectByIds(productcategoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productcategoryid, x)).toMap + productcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcategoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala index 9a73b8ad71..75ecb0541e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepo.scala @@ -28,6 +28,7 @@ trait ProductcosthistoryRepo { def selectAll: ZStream[ZConnection, Throwable, ProductcosthistoryRow] def selectById(compositeId: ProductcosthistoryId): ZIO[ZConnection, Throwable, Option[ProductcosthistoryRow]] def selectByIds(compositeIds: Array[ProductcosthistoryId]): ZStream[ZConnection, Throwable, ProductcosthistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] def update(row: ProductcosthistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductcosthistoryRow): ZIO[ZConnection, Throwable, UpdateResult[ProductcosthistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala index 4211b802d1..2ba603e742 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala @@ -97,6 +97,12 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.query(using ProductcosthistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilder("production.productcosthistory", ProductcosthistoryFields.structure, ProductcosthistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala index 29aebc7839..cc57a4f746 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoMock.scala @@ -78,6 +78,12 @@ class ProductcosthistoryRepoMock(toRow: Function1[ProductcosthistoryRowUnsaved, override def selectByIds(compositeIds: Array[ProductcosthistoryId]): ZStream[ZConnection, Throwable, ProductcosthistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductcosthistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala index f025cbec4b..ae6e7f59d0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepo.scala @@ -28,6 +28,7 @@ trait ProductdescriptionRepo { def selectAll: ZStream[ZConnection, Throwable, ProductdescriptionRow] def selectById(productdescriptionid: ProductdescriptionId): ZIO[ZConnection, Throwable, Option[ProductdescriptionRow]] def selectByIds(productdescriptionids: Array[ProductdescriptionId]): ZStream[ZConnection, Throwable, ProductdescriptionRow] + def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, Option[ProductdescriptionRow]]] def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] def update(row: ProductdescriptionRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductdescriptionRow): ZIO[ZConnection, Throwable, UpdateResult[ProductdescriptionRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala index b1a96c5cdd..d9fa6e1fb8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala @@ -88,6 +88,12 @@ class ProductdescriptionRepoImpl extends ProductdescriptionRepo { override def selectByIds(productdescriptionids: Array[ProductdescriptionId]): ZStream[ZConnection, Throwable, ProductdescriptionRow] = { sql"""select "productdescriptionid", "description", "rowguid", "modifieddate"::text from production.productdescription where "productdescriptionid" = ANY(${Segment.paramSegment(productdescriptionids)(ProductdescriptionId.arraySetter)})""".query(using ProductdescriptionRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, Option[ProductdescriptionRow]]] = { + selectByIds(productdescriptionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilder("production.productdescription", ProductdescriptionFields.structure, ProductdescriptionRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala index 70457f0437..602fb1df11 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoMock.scala @@ -78,6 +78,12 @@ class ProductdescriptionRepoMock(toRow: Function1[ProductdescriptionRowUnsaved, override def selectByIds(productdescriptionids: Array[ProductdescriptionId]): ZStream[ZConnection, Throwable, ProductdescriptionRow] = { ZStream.fromIterable(productdescriptionids.flatMap(map.get)) } + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, Option[ProductdescriptionRow]]] = { + selectByIds(productdescriptionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productdescriptionid, x)).toMap + productdescriptionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdescriptionFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala index a68c1e320d..9066d9c7b1 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepo.scala @@ -28,6 +28,7 @@ trait ProductdocumentRepo { def selectAll: ZStream[ZConnection, Throwable, ProductdocumentRow] def selectById(compositeId: ProductdocumentId): ZIO[ZConnection, Throwable, Option[ProductdocumentRow]] def selectByIds(compositeIds: Array[ProductdocumentId]): ZStream[ZConnection, Throwable, ProductdocumentRow] + def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, Option[ProductdocumentRow]]] def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] def update(row: ProductdocumentRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductdocumentRow): ZIO[ZConnection, Throwable, UpdateResult[ProductdocumentRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala index ef9e6f2348..bda24bb9ff 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala @@ -98,6 +98,12 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.query(using ProductdocumentRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilder("production.productdocument", ProductdocumentFields.structure, ProductdocumentRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala index 83b0158b07..78fcfd5d39 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoMock.scala @@ -78,6 +78,12 @@ class ProductdocumentRepoMock(toRow: Function1[ProductdocumentRowUnsaved, Produc override def selectByIds(compositeIds: Array[ProductdocumentId]): ZStream[ZConnection, Throwable, ProductdocumentRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { UpdateBuilderMock(UpdateParams.empty, ProductdocumentFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala index f22447989f..da05bc68e6 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepo.scala @@ -28,6 +28,7 @@ trait ProductinventoryRepo { def selectAll: ZStream[ZConnection, Throwable, ProductinventoryRow] def selectById(compositeId: ProductinventoryId): ZIO[ZConnection, Throwable, Option[ProductinventoryRow]] def selectByIds(compositeIds: Array[ProductinventoryId]): ZStream[ZConnection, Throwable, ProductinventoryRow] + def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, Option[ProductinventoryRow]]] def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] def update(row: ProductinventoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductinventoryRow): ZIO[ZConnection, Throwable, UpdateResult[ProductinventoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala index 4b64846a30..9ae952b6e6 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala @@ -108,6 +108,12 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.query(using ProductinventoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilder("production.productinventory", ProductinventoryFields.structure, ProductinventoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala index 182854771f..e79d70759f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoMock.scala @@ -78,6 +78,12 @@ class ProductinventoryRepoMock(toRow: Function1[ProductinventoryRowUnsaved, Prod override def selectByIds(compositeIds: Array[ProductinventoryId]): ZStream[ZConnection, Throwable, ProductinventoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductinventoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala index 669f3c7d70..4b51ba555a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepo.scala @@ -28,6 +28,7 @@ trait ProductlistpricehistoryRepo { def selectAll: ZStream[ZConnection, Throwable, ProductlistpricehistoryRow] def selectById(compositeId: ProductlistpricehistoryId): ZIO[ZConnection, Throwable, Option[ProductlistpricehistoryRow]] def selectByIds(compositeIds: Array[ProductlistpricehistoryId]): ZStream[ZConnection, Throwable, ProductlistpricehistoryRow] + def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] def update(row: ProductlistpricehistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductlistpricehistoryRow): ZIO[ZConnection, Throwable, UpdateResult[ProductlistpricehistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala index 7d4705df09..917f836efb 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala @@ -97,6 +97,12 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.query(using ProductlistpricehistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilder("production.productlistpricehistory", ProductlistpricehistoryFields.structure, ProductlistpricehistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala index 13d5200470..ba8500541a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoMock.scala @@ -78,6 +78,12 @@ class ProductlistpricehistoryRepoMock(toRow: Function1[ProductlistpricehistoryRo override def selectByIds(compositeIds: Array[ProductlistpricehistoryId]): ZStream[ZConnection, Throwable, ProductlistpricehistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductlistpricehistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala index f4ed76f41c..bfb32938d1 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepo.scala @@ -28,6 +28,7 @@ trait ProductmodelRepo { def selectAll: ZStream[ZConnection, Throwable, ProductmodelRow] def selectById(productmodelid: ProductmodelId): ZIO[ZConnection, Throwable, Option[ProductmodelRow]] def selectByIds(productmodelids: Array[ProductmodelId]): ZStream[ZConnection, Throwable, ProductmodelRow] + def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, Option[ProductmodelRow]]] def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] def update(row: ProductmodelRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductmodelRow): ZIO[ZConnection, Throwable, UpdateResult[ProductmodelRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala index 9e9684de1b..46e5198494 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala @@ -92,6 +92,12 @@ class ProductmodelRepoImpl extends ProductmodelRepo { override def selectByIds(productmodelids: Array[ProductmodelId]): ZStream[ZConnection, Throwable, ProductmodelRow] = { sql"""select "productmodelid", "name", "catalogdescription", "instructions", "rowguid", "modifieddate"::text from production.productmodel where "productmodelid" = ANY(${Segment.paramSegment(productmodelids)(ProductmodelId.arraySetter)})""".query(using ProductmodelRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, Option[ProductmodelRow]]] = { + selectByIds(productmodelids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilder("production.productmodel", ProductmodelFields.structure, ProductmodelRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala index 4a5eeb33c1..bf768e5fdc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoMock.scala @@ -78,6 +78,12 @@ class ProductmodelRepoMock(toRow: Function1[ProductmodelRowUnsaved, Productmodel override def selectByIds(productmodelids: Array[ProductmodelId]): ZStream[ZConnection, Throwable, ProductmodelRow] = { ZStream.fromIterable(productmodelids.flatMap(map.get)) } + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, Option[ProductmodelRow]]] = { + selectByIds(productmodelids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productmodelid, x)).toMap + productmodelids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala index 724bfd1589..174d656954 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepo.scala @@ -28,6 +28,7 @@ trait ProductmodelillustrationRepo { def selectAll: ZStream[ZConnection, Throwable, ProductmodelillustrationRow] def selectById(compositeId: ProductmodelillustrationId): ZIO[ZConnection, Throwable, Option[ProductmodelillustrationRow]] def selectByIds(compositeIds: Array[ProductmodelillustrationId]): ZStream[ZConnection, Throwable, ProductmodelillustrationRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] def update(row: ProductmodelillustrationRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductmodelillustrationRow): ZIO[ZConnection, Throwable, UpdateResult[ProductmodelillustrationRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala index 72b1cfcf65..454511e38d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala @@ -95,6 +95,12 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.query(using ProductmodelillustrationRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilder("production.productmodelillustration", ProductmodelillustrationFields.structure, ProductmodelillustrationRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala index 6e6db4594c..2b12fa02fd 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoMock.scala @@ -78,6 +78,12 @@ class ProductmodelillustrationRepoMock(toRow: Function1[Productmodelillustration override def selectByIds(compositeIds: Array[ProductmodelillustrationId]): ZStream[ZConnection, Throwable, ProductmodelillustrationRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelillustrationFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala index 00105fcfd9..5eda036a42 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepo.scala @@ -28,6 +28,7 @@ trait ProductmodelproductdescriptioncultureRepo { def selectAll: ZStream[ZConnection, Throwable, ProductmodelproductdescriptioncultureRow] def selectById(compositeId: ProductmodelproductdescriptioncultureId): ZIO[ZConnection, Throwable, Option[ProductmodelproductdescriptioncultureRow]] def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZStream[ZConnection, Throwable, ProductmodelproductdescriptioncultureRow] + def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] def update(row: ProductmodelproductdescriptioncultureRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductmodelproductdescriptioncultureRow): ZIO[ZConnection, Throwable, UpdateResult[ProductmodelproductdescriptioncultureRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala index a6a53207d2..24ebb3bfb9 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala @@ -99,6 +99,12 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.query(using ProductmodelproductdescriptioncultureRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilder("production.productmodelproductdescriptionculture", ProductmodelproductdescriptioncultureFields.structure, ProductmodelproductdescriptioncultureRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala index 347712e2dc..9cf84437bc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoMock.scala @@ -78,6 +78,12 @@ class ProductmodelproductdescriptioncultureRepoMock(toRow: Function1[Productmode override def selectByIds(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZStream[ZConnection, Throwable, ProductmodelproductdescriptioncultureRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { UpdateBuilderMock(UpdateParams.empty, ProductmodelproductdescriptioncultureFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala index ea42be4b5b..955b9d5b94 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepo.scala @@ -28,6 +28,7 @@ trait ProductphotoRepo { def selectAll: ZStream[ZConnection, Throwable, ProductphotoRow] def selectById(productphotoid: ProductphotoId): ZIO[ZConnection, Throwable, Option[ProductphotoRow]] def selectByIds(productphotoids: Array[ProductphotoId]): ZStream[ZConnection, Throwable, ProductphotoRow] + def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, Option[ProductphotoRow]]] def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] def update(row: ProductphotoRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductphotoRow): ZIO[ZConnection, Throwable, UpdateResult[ProductphotoRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala index b23233495c..9fd234d38e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala @@ -87,6 +87,12 @@ class ProductphotoRepoImpl extends ProductphotoRepo { override def selectByIds(productphotoids: Array[ProductphotoId]): ZStream[ZConnection, Throwable, ProductphotoRow] = { sql"""select "productphotoid", "thumbnailphoto", "thumbnailphotofilename", "largephoto", "largephotofilename", "modifieddate"::text from production.productphoto where "productphotoid" = ANY(${Segment.paramSegment(productphotoids)(ProductphotoId.arraySetter)})""".query(using ProductphotoRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, Option[ProductphotoRow]]] = { + selectByIds(productphotoids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilder("production.productphoto", ProductphotoFields.structure, ProductphotoRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala index 2665d7ffd3..c6b1db1bf7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoMock.scala @@ -78,6 +78,12 @@ class ProductphotoRepoMock(toRow: Function1[ProductphotoRowUnsaved, Productphoto override def selectByIds(productphotoids: Array[ProductphotoId]): ZStream[ZConnection, Throwable, ProductphotoRow] = { ZStream.fromIterable(productphotoids.flatMap(map.get)) } + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, Option[ProductphotoRow]]] = { + selectByIds(productphotoids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productphotoid, x)).toMap + productphotoids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductphotoFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala index 8c720ecec8..180bff769d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepo.scala @@ -28,6 +28,7 @@ trait ProductproductphotoRepo { def selectAll: ZStream[ZConnection, Throwable, ProductproductphotoRow] def selectById(compositeId: ProductproductphotoId): ZIO[ZConnection, Throwable, Option[ProductproductphotoRow]] def selectByIds(compositeIds: Array[ProductproductphotoId]): ZStream[ZConnection, Throwable, ProductproductphotoRow] + def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, Option[ProductproductphotoRow]]] def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] def update(row: ProductproductphotoRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductproductphotoRow): ZIO[ZConnection, Throwable, UpdateResult[ProductproductphotoRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala index dd8e647986..9269814d61 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala @@ -100,6 +100,12 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.query(using ProductproductphotoRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilder("production.productproductphoto", ProductproductphotoFields.structure, ProductproductphotoRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala index b109238374..d745ec8651 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoMock.scala @@ -78,6 +78,12 @@ class ProductproductphotoRepoMock(toRow: Function1[ProductproductphotoRowUnsaved override def selectByIds(compositeIds: Array[ProductproductphotoId]): ZStream[ZConnection, Throwable, ProductproductphotoRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { UpdateBuilderMock(UpdateParams.empty, ProductproductphotoFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala index 6ee2062ea4..b95faf6609 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepo.scala @@ -28,6 +28,7 @@ trait ProductreviewRepo { def selectAll: ZStream[ZConnection, Throwable, ProductreviewRow] def selectById(productreviewid: ProductreviewId): ZIO[ZConnection, Throwable, Option[ProductreviewRow]] def selectByIds(productreviewids: Array[ProductreviewId]): ZStream[ZConnection, Throwable, ProductreviewRow] + def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, Option[ProductreviewRow]]] def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] def update(row: ProductreviewRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductreviewRow): ZIO[ZConnection, Throwable, UpdateResult[ProductreviewRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala index 98ef12323d..051f94205a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala @@ -93,6 +93,12 @@ class ProductreviewRepoImpl extends ProductreviewRepo { override def selectByIds(productreviewids: Array[ProductreviewId]): ZStream[ZConnection, Throwable, ProductreviewRow] = { sql"""select "productreviewid", "productid", "reviewername", "reviewdate"::text, "emailaddress", "rating", "comments", "modifieddate"::text from production.productreview where "productreviewid" = ANY(${Segment.paramSegment(productreviewids)(ProductreviewId.arraySetter)})""".query(using ProductreviewRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, Option[ProductreviewRow]]] = { + selectByIds(productreviewids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilder("production.productreview", ProductreviewFields.structure, ProductreviewRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala index 538fce6f25..a36ac3a4bf 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoMock.scala @@ -78,6 +78,12 @@ class ProductreviewRepoMock(toRow: Function1[ProductreviewRowUnsaved, Productrev override def selectByIds(productreviewids: Array[ProductreviewId]): ZStream[ZConnection, Throwable, ProductreviewRow] = { ZStream.fromIterable(productreviewids.flatMap(map.get)) } + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, Option[ProductreviewRow]]] = { + selectByIds(productreviewids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productreviewid, x)).toMap + productreviewids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { UpdateBuilderMock(UpdateParams.empty, ProductreviewFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala index b11f8ef0ae..c833bc094d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepo.scala @@ -28,6 +28,7 @@ trait ProductsubcategoryRepo { def selectAll: ZStream[ZConnection, Throwable, ProductsubcategoryRow] def selectById(productsubcategoryid: ProductsubcategoryId): ZIO[ZConnection, Throwable, Option[ProductsubcategoryRow]] def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): ZStream[ZConnection, Throwable, ProductsubcategoryRow] + def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] def update(row: ProductsubcategoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductsubcategoryRow): ZIO[ZConnection, Throwable, UpdateResult[ProductsubcategoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala index b7a8b35977..851c7405cf 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala @@ -90,6 +90,12 @@ class ProductsubcategoryRepoImpl extends ProductsubcategoryRepo { override def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): ZStream[ZConnection, Throwable, ProductsubcategoryRow] = { sql"""select "productsubcategoryid", "productcategoryid", "name", "rowguid", "modifieddate"::text from production.productsubcategory where "productsubcategoryid" = ANY(${Segment.paramSegment(productsubcategoryids)(ProductsubcategoryId.arraySetter)})""".query(using ProductsubcategoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] = { + selectByIds(productsubcategoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilder("production.productsubcategory", ProductsubcategoryFields.structure, ProductsubcategoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala index 9a501e33d6..ebdaf5bc9a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoMock.scala @@ -78,6 +78,12 @@ class ProductsubcategoryRepoMock(toRow: Function1[ProductsubcategoryRowUnsaved, override def selectByIds(productsubcategoryids: Array[ProductsubcategoryId]): ZStream[ZConnection, Throwable, ProductsubcategoryRow] = { ZStream.fromIterable(productsubcategoryids.flatMap(map.get)) } + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, Option[ProductsubcategoryRow]]] = { + selectByIds(productsubcategoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.productsubcategoryid, x)).toMap + productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { UpdateBuilderMock(UpdateParams.empty, ProductsubcategoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala index 40a41da1af..d494f0d338 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepo.scala @@ -28,6 +28,7 @@ trait ScrapreasonRepo { def selectAll: ZStream[ZConnection, Throwable, ScrapreasonRow] def selectById(scrapreasonid: ScrapreasonId): ZIO[ZConnection, Throwable, Option[ScrapreasonRow]] def selectByIds(scrapreasonids: Array[ScrapreasonId]): ZStream[ZConnection, Throwable, ScrapreasonRow] + def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, Option[ScrapreasonRow]]] def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] def update(row: ScrapreasonRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ScrapreasonRow): ZIO[ZConnection, Throwable, UpdateResult[ScrapreasonRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala index cc67a01150..f5bc20741d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala @@ -83,6 +83,12 @@ class ScrapreasonRepoImpl extends ScrapreasonRepo { override def selectByIds(scrapreasonids: Array[ScrapreasonId]): ZStream[ZConnection, Throwable, ScrapreasonRow] = { sql"""select "scrapreasonid", "name", "modifieddate"::text from production.scrapreason where "scrapreasonid" = ANY(${Segment.paramSegment(scrapreasonids)(ScrapreasonId.arraySetter)})""".query(using ScrapreasonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, Option[ScrapreasonRow]]] = { + selectByIds(scrapreasonids).runCollect.map { rows => + val byId = rows.view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilder("production.scrapreason", ScrapreasonFields.structure, ScrapreasonRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala index 20d78d386b..c54920558d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoMock.scala @@ -78,6 +78,12 @@ class ScrapreasonRepoMock(toRow: Function1[ScrapreasonRowUnsaved, ScrapreasonRow override def selectByIds(scrapreasonids: Array[ScrapreasonId]): ZStream[ZConnection, Throwable, ScrapreasonRow] = { ZStream.fromIterable(scrapreasonids.flatMap(map.get)) } + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, Option[ScrapreasonRow]]] = { + selectByIds(scrapreasonids).runCollect.map { rows => + val byId = rows.view.map(x => (x.scrapreasonid, x)).toMap + scrapreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { UpdateBuilderMock(UpdateParams.empty, ScrapreasonFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala index 5258f4d60f..4902416281 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepo.scala @@ -28,6 +28,7 @@ trait TransactionhistoryRepo { def selectAll: ZStream[ZConnection, Throwable, TransactionhistoryRow] def selectById(transactionid: TransactionhistoryId): ZIO[ZConnection, Throwable, Option[TransactionhistoryRow]] def selectByIds(transactionids: Array[TransactionhistoryId]): ZStream[ZConnection, Throwable, TransactionhistoryRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, Option[TransactionhistoryRow]]] def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] def update(row: TransactionhistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: TransactionhistoryRow): ZIO[ZConnection, Throwable, UpdateResult[TransactionhistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala index 78af188371..ebd3f657c7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala @@ -96,6 +96,12 @@ class TransactionhistoryRepoImpl extends TransactionhistoryRepo { override def selectByIds(transactionids: Array[TransactionhistoryId]): ZStream[ZConnection, Throwable, TransactionhistoryRow] = { sql"""select "transactionid", "productid", "referenceorderid", "referenceorderlineid", "transactiondate"::text, "transactiontype", "quantity", "actualcost", "modifieddate"::text from production.transactionhistory where "transactionid" = ANY(${Segment.paramSegment(transactionids)(TransactionhistoryId.arraySetter)})""".query(using TransactionhistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, Option[TransactionhistoryRow]]] = { + selectByIds(transactionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilder("production.transactionhistory", TransactionhistoryFields.structure, TransactionhistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala index 27b76e1173..fd9c15e53f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoMock.scala @@ -78,6 +78,12 @@ class TransactionhistoryRepoMock(toRow: Function1[TransactionhistoryRowUnsaved, override def selectByIds(transactionids: Array[TransactionhistoryId]): ZStream[ZConnection, Throwable, TransactionhistoryRow] = { ZStream.fromIterable(transactionids.flatMap(map.get)) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, Option[TransactionhistoryRow]]] = { + selectByIds(transactionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala index 73f1984fc7..0666643a05 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepo.scala @@ -28,6 +28,7 @@ trait TransactionhistoryarchiveRepo { def selectAll: ZStream[ZConnection, Throwable, TransactionhistoryarchiveRow] def selectById(transactionid: TransactionhistoryarchiveId): ZIO[ZConnection, Throwable, Option[TransactionhistoryarchiveRow]] def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): ZStream[ZConnection, Throwable, TransactionhistoryarchiveRow] + def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] def update(row: TransactionhistoryarchiveRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: TransactionhistoryarchiveRow): ZIO[ZConnection, Throwable, UpdateResult[TransactionhistoryarchiveRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala index c3a6bb74d8..a14a4cfb13 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala @@ -92,6 +92,12 @@ class TransactionhistoryarchiveRepoImpl extends TransactionhistoryarchiveRepo { override def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): ZStream[ZConnection, Throwable, TransactionhistoryarchiveRow] = { sql"""select "transactionid", "productid", "referenceorderid", "referenceorderlineid", "transactiondate"::text, "transactiontype", "quantity", "actualcost", "modifieddate"::text from production.transactionhistoryarchive where "transactionid" = ANY(${Segment.paramSegment(transactionids)(TransactionhistoryarchiveId.arraySetter)})""".query(using TransactionhistoryarchiveRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] = { + selectByIds(transactionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilder("production.transactionhistoryarchive", TransactionhistoryarchiveFields.structure, TransactionhistoryarchiveRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala index 921d44b087..7e1a1f9050 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoMock.scala @@ -78,6 +78,12 @@ class TransactionhistoryarchiveRepoMock(toRow: Function1[Transactionhistoryarchi override def selectByIds(transactionids: Array[TransactionhistoryarchiveId]): ZStream[ZConnection, Throwable, TransactionhistoryarchiveRow] = { ZStream.fromIterable(transactionids.flatMap(map.get)) } + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]]] = { + selectByIds(transactionids).runCollect.map { rows => + val byId = rows.view.map(x => (x.transactionid, x)).toMap + transactionids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { UpdateBuilderMock(UpdateParams.empty, TransactionhistoryarchiveFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala index 95ecaedad6..7c741d8c50 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepo.scala @@ -28,6 +28,7 @@ trait UnitmeasureRepo { def selectAll: ZStream[ZConnection, Throwable, UnitmeasureRow] def selectById(unitmeasurecode: UnitmeasureId): ZIO[ZConnection, Throwable, Option[UnitmeasureRow]] def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): ZStream[ZConnection, Throwable, UnitmeasureRow] + def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, Option[UnitmeasureRow]]] def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] def update(row: UnitmeasureRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: UnitmeasureRow): ZIO[ZConnection, Throwable, UpdateResult[UnitmeasureRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala index 74cbf9f5ea..dc2dbfa197 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala @@ -80,6 +80,12 @@ class UnitmeasureRepoImpl extends UnitmeasureRepo { override def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): ZStream[ZConnection, Throwable, UnitmeasureRow] = { sql"""select "unitmeasurecode", "name", "modifieddate"::text from production.unitmeasure where "unitmeasurecode" = ANY(${Segment.paramSegment(unitmeasurecodes)(UnitmeasureId.arraySetter)})""".query(using UnitmeasureRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, Option[UnitmeasureRow]]] = { + selectByIds(unitmeasurecodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilder("production.unitmeasure", UnitmeasureFields.structure, UnitmeasureRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala index 023c4d0e39..927b1bf643 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoMock.scala @@ -78,6 +78,12 @@ class UnitmeasureRepoMock(toRow: Function1[UnitmeasureRowUnsaved, UnitmeasureRow override def selectByIds(unitmeasurecodes: Array[UnitmeasureId]): ZStream[ZConnection, Throwable, UnitmeasureRow] = { ZStream.fromIterable(unitmeasurecodes.flatMap(map.get)) } + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, Option[UnitmeasureRow]]] = { + selectByIds(unitmeasurecodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.unitmeasurecode, x)).toMap + unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { UpdateBuilderMock(UpdateParams.empty, UnitmeasureFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala index 3df66f59a7..dc29c7112a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepo.scala @@ -28,6 +28,7 @@ trait WorkorderRepo { def selectAll: ZStream[ZConnection, Throwable, WorkorderRow] def selectById(workorderid: WorkorderId): ZIO[ZConnection, Throwable, Option[WorkorderRow]] def selectByIds(workorderids: Array[WorkorderId]): ZStream[ZConnection, Throwable, WorkorderRow] + def selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, Option[WorkorderRow]]] def update: UpdateBuilder[WorkorderFields, WorkorderRow] def update(row: WorkorderRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: WorkorderRow): ZIO[ZConnection, Throwable, UpdateResult[WorkorderRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala index d2227e777b..19a12afae8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala @@ -92,6 +92,12 @@ class WorkorderRepoImpl extends WorkorderRepo { override def selectByIds(workorderids: Array[WorkorderId]): ZStream[ZConnection, Throwable, WorkorderRow] = { sql"""select "workorderid", "productid", "orderqty", "scrappedqty", "startdate"::text, "enddate"::text, "duedate"::text, "scrapreasonid", "modifieddate"::text from production.workorder where "workorderid" = ANY(${Segment.paramSegment(workorderids)(WorkorderId.arraySetter)})""".query(using WorkorderRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, Option[WorkorderRow]]] = { + selectByIds(workorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilder("production.workorder", WorkorderFields.structure, WorkorderRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala index 75977a3041..8e5bcd3db3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoMock.scala @@ -78,6 +78,12 @@ class WorkorderRepoMock(toRow: Function1[WorkorderRowUnsaved, WorkorderRow], override def selectByIds(workorderids: Array[WorkorderId]): ZStream[ZConnection, Throwable, WorkorderRow] = { ZStream.fromIterable(workorderids.flatMap(map.get)) } + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, Option[WorkorderRow]]] = { + selectByIds(workorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.workorderid, x)).toMap + workorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala index 70179c5472..349757abc6 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepo.scala @@ -28,6 +28,7 @@ trait WorkorderroutingRepo { def selectAll: ZStream[ZConnection, Throwable, WorkorderroutingRow] def selectById(compositeId: WorkorderroutingId): ZIO[ZConnection, Throwable, Option[WorkorderroutingRow]] def selectByIds(compositeIds: Array[WorkorderroutingId]): ZStream[ZConnection, Throwable, WorkorderroutingRow] + def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, Option[WorkorderroutingRow]]] def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] def update(row: WorkorderroutingRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: WorkorderroutingRow): ZIO[ZConnection, Throwable, UpdateResult[WorkorderroutingRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala index e91f2f8497..7dac04a47f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala @@ -108,6 +108,12 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.query(using WorkorderroutingRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilder("production.workorderrouting", WorkorderroutingFields.structure, WorkorderroutingRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala index abb2cf6c84..ac5ee6d25e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoMock.scala @@ -78,6 +78,12 @@ class WorkorderroutingRepoMock(toRow: Function1[WorkorderroutingRowUnsaved, Work override def selectByIds(compositeIds: Array[WorkorderroutingId]): ZStream[ZConnection, Throwable, WorkorderroutingRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { UpdateBuilderMock(UpdateParams.empty, WorkorderroutingFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala index f8cc405a71..4291e5c4d7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepo.scala @@ -25,6 +25,7 @@ trait FlaffRepo { def selectAll: ZStream[ZConnection, Throwable, FlaffRow] def selectById(compositeId: FlaffId): ZIO[ZConnection, Throwable, Option[FlaffRow]] def selectByIds(compositeIds: Array[FlaffId]): ZStream[ZConnection, Throwable, FlaffRow] + def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, Option[FlaffRow]]] def update: UpdateBuilder[FlaffFields, FlaffRow] def update(row: FlaffRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: FlaffRow): ZIO[ZConnection, Throwable, UpdateResult[FlaffRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala index 78c761a7c5..1f04d37aee 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoImpl.scala @@ -70,6 +70,12 @@ class FlaffRepoImpl extends FlaffRepo { """.query(using FlaffRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, Option[FlaffRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilder("public.flaff", FlaffFields.structure, FlaffRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala index 8c5738977e..84237a43f0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/flaff/FlaffRepoMock.scala @@ -64,6 +64,12 @@ class FlaffRepoMock(map: scala.collection.mutable.Map[FlaffId, FlaffRow] = scala override def selectByIds(compositeIds: Array[FlaffId]): ZStream[ZConnection, Throwable, FlaffRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, Option[FlaffRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { UpdateBuilderMock(UpdateParams.empty, FlaffFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala index 8b501eaa15..732e17249d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepo.scala @@ -28,6 +28,7 @@ trait IdentityTestRepo { def selectAll: ZStream[ZConnection, Throwable, IdentityTestRow] def selectById(name: IdentityTestId): ZIO[ZConnection, Throwable, Option[IdentityTestRow]] def selectByIds(names: Array[IdentityTestId]): ZStream[ZConnection, Throwable, IdentityTestRow] + def selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, Option[IdentityTestRow]]] def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] def update(row: IdentityTestRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: IdentityTestRow): ZIO[ZConnection, Throwable, UpdateResult[IdentityTestRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala index 715961de34..470c1e0608 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala @@ -78,6 +78,12 @@ class IdentityTestRepoImpl extends IdentityTestRepo { override def selectByIds(names: Array[IdentityTestId]): ZStream[ZConnection, Throwable, IdentityTestRow] = { sql"""select "always_generated", "default_generated", "name" from public.identity-test where "name" = ANY(${Segment.paramSegment(names)(IdentityTestId.arraySetter)})""".query(using IdentityTestRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, Option[IdentityTestRow]]] = { + selectByIds(names).runCollect.map { rows => + val byId = rows.view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilder("public.identity-test", IdentityTestFields.structure, IdentityTestRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala index da54fab18b..7f14a03544 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoMock.scala @@ -78,6 +78,12 @@ class IdentityTestRepoMock(toRow: Function1[IdentityTestRowUnsaved, IdentityTest override def selectByIds(names: Array[IdentityTestId]): ZStream[ZConnection, Throwable, IdentityTestRow] = { ZStream.fromIterable(names.flatMap(map.get)) } + override def selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, Option[IdentityTestRow]]] = { + selectByIds(names).runCollect.map { rows => + val byId = rows.view.map(x => (x.name, x)).toMap + names.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { UpdateBuilderMock(UpdateParams.empty, IdentityTestFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala index ff8352e121..7c78d0d09e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepo.scala @@ -29,6 +29,7 @@ trait UsersRepo { def selectAll: ZStream[ZConnection, Throwable, UsersRow] def selectById(userId: UsersId): ZIO[ZConnection, Throwable, Option[UsersRow]] def selectByIds(userIds: Array[UsersId]): ZStream[ZConnection, Throwable, UsersRow] + def selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, Option[UsersRow]]] def selectByUniqueEmail(email: TypoUnknownCitext): ZIO[ZConnection, Throwable, Option[UsersRow]] def update: UpdateBuilder[UsersFields, UsersRow] def update(row: UsersRow): ZIO[ZConnection, Throwable, Boolean] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala index 68e15a1838..65350b2d1e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala @@ -85,6 +85,12 @@ class UsersRepoImpl extends UsersRepo { override def selectByIds(userIds: Array[UsersId]): ZStream[ZConnection, Throwable, UsersRow] = { sql"""select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.users where "user_id" = ANY(${Segment.paramSegment(userIds)(UsersId.arraySetter)})""".query(using UsersRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, Option[UsersRow]]] = { + selectByIds(userIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueEmail(email: TypoUnknownCitext): ZIO[ZConnection, Throwable, Option[UsersRow]] = { sql"""select "user_id", "name", "last_name", "email"::text, "password", "created_at"::text, "verified_on"::text from public.users diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala index 3c07626b1a..14acb18a47 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/public/users/UsersRepoMock.scala @@ -79,6 +79,12 @@ class UsersRepoMock(toRow: Function1[UsersRowUnsaved, UsersRow], override def selectByIds(userIds: Array[UsersId]): ZStream[ZConnection, Throwable, UsersRow] = { ZStream.fromIterable(userIds.flatMap(map.get)) } + override def selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, Option[UsersRow]]] = { + selectByIds(userIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.userId, x)).toMap + userIds.view.map(id => (id, byId.get(id))).toMap + } + } override def selectByUniqueEmail(email: TypoUnknownCitext): ZIO[ZConnection, Throwable, Option[UsersRow]] = { ZIO.succeed(map.values.find(v => email == v.email)) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala index 649eba8e7c..b3ff72030e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepo.scala @@ -28,6 +28,7 @@ trait ProductvendorRepo { def selectAll: ZStream[ZConnection, Throwable, ProductvendorRow] def selectById(compositeId: ProductvendorId): ZIO[ZConnection, Throwable, Option[ProductvendorRow]] def selectByIds(compositeIds: Array[ProductvendorId]): ZStream[ZConnection, Throwable, ProductvendorRow] + def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, Option[ProductvendorRow]]] def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] def update(row: ProductvendorRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ProductvendorRow): ZIO[ZConnection, Throwable, UpdateResult[ProductvendorRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala index c79f091979..452f8df9b0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala @@ -105,6 +105,12 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.query(using ProductvendorRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, Option[ProductvendorRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilder("purchasing.productvendor", ProductvendorFields.structure, ProductvendorRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala index d9b3550ba8..cce0b23821 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoMock.scala @@ -78,6 +78,12 @@ class ProductvendorRepoMock(toRow: Function1[ProductvendorRowUnsaved, Productven override def selectByIds(compositeIds: Array[ProductvendorId]): ZStream[ZConnection, Throwable, ProductvendorRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, Option[ProductvendorRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { UpdateBuilderMock(UpdateParams.empty, ProductvendorFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala index 633e1b687c..00ace125f5 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepo.scala @@ -17,4 +17,5 @@ trait PurchaseorderdetailRepo { def selectAll: ZStream[ZConnection, Throwable, PurchaseorderdetailRow] def selectById(compositeId: PurchaseorderdetailId): ZIO[ZConnection, Throwable, Option[PurchaseorderdetailRow]] def selectByIds(compositeIds: Array[PurchaseorderdetailId]): ZStream[ZConnection, Throwable, PurchaseorderdetailRow] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ZIO[ZConnection, Throwable, Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala index 4f9a84db2d..b7d129f14f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderdetail/PurchaseorderdetailRepoImpl.scala @@ -37,4 +37,10 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.query(using PurchaseorderdetailRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ZIO[ZConnection, Throwable, Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala index e510208d41..b5e471d780 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepo.scala @@ -28,6 +28,7 @@ trait PurchaseorderheaderRepo { def selectAll: ZStream[ZConnection, Throwable, PurchaseorderheaderRow] def selectById(purchaseorderid: PurchaseorderheaderId): ZIO[ZConnection, Throwable, Option[PurchaseorderheaderRow]] def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): ZStream[ZConnection, Throwable, PurchaseorderheaderRow] + def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] def update(row: PurchaseorderheaderRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PurchaseorderheaderRow): ZIO[ZConnection, Throwable, UpdateResult[PurchaseorderheaderRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala index 5a4afe8e57..21104b02b7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala @@ -113,6 +113,12 @@ class PurchaseorderheaderRepoImpl extends PurchaseorderheaderRepo { override def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): ZStream[ZConnection, Throwable, PurchaseorderheaderRow] = { sql"""select "purchaseorderid", "revisionnumber", "status", "employeeid", "vendorid", "shipmethodid", "orderdate"::text, "shipdate"::text, "subtotal", "taxamt", "freight", "modifieddate"::text from purchasing.purchaseorderheader where "purchaseorderid" = ANY(${Segment.paramSegment(purchaseorderids)(PurchaseorderheaderId.arraySetter)})""".query(using PurchaseorderheaderRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] = { + selectByIds(purchaseorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilder("purchasing.purchaseorderheader", PurchaseorderheaderFields.structure, PurchaseorderheaderRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala index 21b8822c2d..ed029a13ce 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoMock.scala @@ -78,6 +78,12 @@ class PurchaseorderheaderRepoMock(toRow: Function1[PurchaseorderheaderRowUnsaved override def selectByIds(purchaseorderids: Array[PurchaseorderheaderId]): ZStream[ZConnection, Throwable, PurchaseorderheaderRow] = { ZStream.fromIterable(purchaseorderids.flatMap(map.get)) } + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]]] = { + selectByIds(purchaseorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.purchaseorderid, x)).toMap + purchaseorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, PurchaseorderheaderFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala index 4c040c60ba..a0e26fd7db 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepo.scala @@ -28,6 +28,7 @@ trait ShipmethodRepo { def selectAll: ZStream[ZConnection, Throwable, ShipmethodRow] def selectById(shipmethodid: ShipmethodId): ZIO[ZConnection, Throwable, Option[ShipmethodRow]] def selectByIds(shipmethodids: Array[ShipmethodId]): ZStream[ZConnection, Throwable, ShipmethodRow] + def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, Option[ShipmethodRow]]] def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] def update(row: ShipmethodRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ShipmethodRow): ZIO[ZConnection, Throwable, UpdateResult[ShipmethodRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala index 492e3ac068..83e3a79c75 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala @@ -97,6 +97,12 @@ class ShipmethodRepoImpl extends ShipmethodRepo { override def selectByIds(shipmethodids: Array[ShipmethodId]): ZStream[ZConnection, Throwable, ShipmethodRow] = { sql"""select "shipmethodid", "name", "shipbase", "shiprate", "rowguid", "modifieddate"::text from purchasing.shipmethod where "shipmethodid" = ANY(${Segment.paramSegment(shipmethodids)(ShipmethodId.arraySetter)})""".query(using ShipmethodRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, Option[ShipmethodRow]]] = { + selectByIds(shipmethodids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilder("purchasing.shipmethod", ShipmethodFields.structure, ShipmethodRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala index 44dd555ba2..929d935143 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoMock.scala @@ -78,6 +78,12 @@ class ShipmethodRepoMock(toRow: Function1[ShipmethodRowUnsaved, ShipmethodRow], override def selectByIds(shipmethodids: Array[ShipmethodId]): ZStream[ZConnection, Throwable, ShipmethodRow] = { ZStream.fromIterable(shipmethodids.flatMap(map.get)) } + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, Option[ShipmethodRow]]] = { + selectByIds(shipmethodids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shipmethodid, x)).toMap + shipmethodids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { UpdateBuilderMock(UpdateParams.empty, ShipmethodFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala index ad5c460d6a..a065c13d92 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepo.scala @@ -29,6 +29,7 @@ trait VendorRepo { def selectAll: ZStream[ZConnection, Throwable, VendorRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[VendorRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, VendorRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[VendorRow]]] def update: UpdateBuilder[VendorFields, VendorRow] def update(row: VendorRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: VendorRow): ZIO[ZConnection, Throwable, UpdateResult[VendorRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala index a23246f00a..c5432de570 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala @@ -96,6 +96,12 @@ class VendorRepoImpl extends VendorRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, VendorRow] = { sql"""select "businessentityid", "accountnumber", "name", "creditrating", "preferredvendorstatus", "activeflag", "purchasingwebserviceurl", "modifieddate"::text from purchasing.vendor where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using VendorRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[VendorRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilder("purchasing.vendor", VendorFields.structure, VendorRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala index 366f89ce20..4caf42110f 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoMock.scala @@ -79,6 +79,12 @@ class VendorRepoMock(toRow: Function1[VendorRowUnsaved, VendorRow], override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, VendorRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[VendorRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[VendorFields, VendorRow] = { UpdateBuilderMock(UpdateParams.empty, VendorFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala index 3251cffc26..75270c6e5c 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepo.scala @@ -28,6 +28,7 @@ trait CountryregioncurrencyRepo { def selectAll: ZStream[ZConnection, Throwable, CountryregioncurrencyRow] def selectById(compositeId: CountryregioncurrencyId): ZIO[ZConnection, Throwable, Option[CountryregioncurrencyRow]] def selectByIds(compositeIds: Array[CountryregioncurrencyId]): ZStream[ZConnection, Throwable, CountryregioncurrencyRow] + def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] def update(row: CountryregioncurrencyRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CountryregioncurrencyRow): ZIO[ZConnection, Throwable, UpdateResult[CountryregioncurrencyRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala index ab81d436fd..f16310bb67 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala @@ -95,6 +95,12 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.query(using CountryregioncurrencyRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilder("sales.countryregioncurrency", CountryregioncurrencyFields.structure, CountryregioncurrencyRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala index cad1fca691..06406ee2e8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoMock.scala @@ -78,6 +78,12 @@ class CountryregioncurrencyRepoMock(toRow: Function1[CountryregioncurrencyRowUns override def selectByIds(compositeIds: Array[CountryregioncurrencyId]): ZStream[ZConnection, Throwable, CountryregioncurrencyRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CountryregioncurrencyFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala index 23a0955327..205ba0f3a9 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepo.scala @@ -30,6 +30,7 @@ trait CreditcardRepo { def selectAll: ZStream[ZConnection, Throwable, CreditcardRow] def selectById(creditcardid: /* user-picked */ CustomCreditcardId): ZIO[ZConnection, Throwable, Option[CreditcardRow]] def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZStream[ZConnection, Throwable, CreditcardRow] + def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] def update: UpdateBuilder[CreditcardFields, CreditcardRow] def update(row: CreditcardRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CreditcardRow): ZIO[ZConnection, Throwable, UpdateResult[CreditcardRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala index 700f8d7b25..a722d58155 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala @@ -89,6 +89,12 @@ class CreditcardRepoImpl extends CreditcardRepo { override def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZStream[ZConnection, Throwable, CreditcardRow] = { sql"""select "creditcardid", "cardtype", "cardnumber", "expmonth", "expyear", "modifieddate"::text from sales.creditcard where "creditcardid" = ANY(${Segment.paramSegment(creditcardids)(CustomCreditcardId.arraySetter)})""".query(using CreditcardRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] = { + selectByIds(creditcardids).runCollect.map { rows => + val byId = rows.view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilder("sales.creditcard", CreditcardFields.structure, CreditcardRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala index 4995a3ef31..d3885800e8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoMock.scala @@ -80,6 +80,12 @@ class CreditcardRepoMock(toRow: Function1[CreditcardRowUnsaved, CreditcardRow], override def selectByIds(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZStream[ZConnection, Throwable, CreditcardRow] = { ZStream.fromIterable(creditcardids.flatMap(map.get)) } + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, Option[CreditcardRow]]] = { + selectByIds(creditcardids).runCollect.map { rows => + val byId = rows.view.map(x => (x.creditcardid, x)).toMap + creditcardids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, CreditcardFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala index 0f074c569d..300e2d2a25 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepo.scala @@ -28,6 +28,7 @@ trait CurrencyRepo { def selectAll: ZStream[ZConnection, Throwable, CurrencyRow] def selectById(currencycode: CurrencyId): ZIO[ZConnection, Throwable, Option[CurrencyRow]] def selectByIds(currencycodes: Array[CurrencyId]): ZStream[ZConnection, Throwable, CurrencyRow] + def selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, Option[CurrencyRow]]] def update: UpdateBuilder[CurrencyFields, CurrencyRow] def update(row: CurrencyRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CurrencyRow): ZIO[ZConnection, Throwable, UpdateResult[CurrencyRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala index 05d8cf3624..078e301d79 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala @@ -80,6 +80,12 @@ class CurrencyRepoImpl extends CurrencyRepo { override def selectByIds(currencycodes: Array[CurrencyId]): ZStream[ZConnection, Throwable, CurrencyRow] = { sql"""select "currencycode", "name", "modifieddate"::text from sales.currency where "currencycode" = ANY(${Segment.paramSegment(currencycodes)(CurrencyId.arraySetter)})""".query(using CurrencyRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, Option[CurrencyRow]]] = { + selectByIds(currencycodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilder("sales.currency", CurrencyFields.structure, CurrencyRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala index 1c32324402..6ab6363766 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoMock.scala @@ -78,6 +78,12 @@ class CurrencyRepoMock(toRow: Function1[CurrencyRowUnsaved, CurrencyRow], override def selectByIds(currencycodes: Array[CurrencyId]): ZStream[ZConnection, Throwable, CurrencyRow] = { ZStream.fromIterable(currencycodes.flatMap(map.get)) } + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, Option[CurrencyRow]]] = { + selectByIds(currencycodes).runCollect.map { rows => + val byId = rows.view.map(x => (x.currencycode, x)).toMap + currencycodes.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala index 67571a6d79..48529f8ed0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepo.scala @@ -28,6 +28,7 @@ trait CurrencyrateRepo { def selectAll: ZStream[ZConnection, Throwable, CurrencyrateRow] def selectById(currencyrateid: CurrencyrateId): ZIO[ZConnection, Throwable, Option[CurrencyrateRow]] def selectByIds(currencyrateids: Array[CurrencyrateId]): ZStream[ZConnection, Throwable, CurrencyrateRow] + def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, Option[CurrencyrateRow]]] def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] def update(row: CurrencyrateRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CurrencyrateRow): ZIO[ZConnection, Throwable, UpdateResult[CurrencyrateRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala index 5500845a01..559e87ceea 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala @@ -88,6 +88,12 @@ class CurrencyrateRepoImpl extends CurrencyrateRepo { override def selectByIds(currencyrateids: Array[CurrencyrateId]): ZStream[ZConnection, Throwable, CurrencyrateRow] = { sql"""select "currencyrateid", "currencyratedate"::text, "fromcurrencycode", "tocurrencycode", "averagerate", "endofdayrate", "modifieddate"::text from sales.currencyrate where "currencyrateid" = ANY(${Segment.paramSegment(currencyrateids)(CurrencyrateId.arraySetter)})""".query(using CurrencyrateRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, Option[CurrencyrateRow]]] = { + selectByIds(currencyrateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilder("sales.currencyrate", CurrencyrateFields.structure, CurrencyrateRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala index 39b83f7e11..ca58d814ba 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoMock.scala @@ -78,6 +78,12 @@ class CurrencyrateRepoMock(toRow: Function1[CurrencyrateRowUnsaved, Currencyrate override def selectByIds(currencyrateids: Array[CurrencyrateId]): ZStream[ZConnection, Throwable, CurrencyrateRow] = { ZStream.fromIterable(currencyrateids.flatMap(map.get)) } + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, Option[CurrencyrateRow]]] = { + selectByIds(currencyrateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.currencyrateid, x)).toMap + currencyrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { UpdateBuilderMock(UpdateParams.empty, CurrencyrateFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala index aff74b7dab..5fc5ce1806 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepo.scala @@ -28,6 +28,7 @@ trait CustomerRepo { def selectAll: ZStream[ZConnection, Throwable, CustomerRow] def selectById(customerid: CustomerId): ZIO[ZConnection, Throwable, Option[CustomerRow]] def selectByIds(customerids: Array[CustomerId]): ZStream[ZConnection, Throwable, CustomerRow] + def selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, Option[CustomerRow]]] def update: UpdateBuilder[CustomerFields, CustomerRow] def update(row: CustomerRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: CustomerRow): ZIO[ZConnection, Throwable, UpdateResult[CustomerRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala index 6865a9cd6a..f0b910943c 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala @@ -92,6 +92,12 @@ class CustomerRepoImpl extends CustomerRepo { override def selectByIds(customerids: Array[CustomerId]): ZStream[ZConnection, Throwable, CustomerRow] = { sql"""select "customerid", "personid", "storeid", "territoryid", "rowguid", "modifieddate"::text from sales.customer where "customerid" = ANY(${Segment.paramSegment(customerids)(CustomerId.arraySetter)})""".query(using CustomerRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, Option[CustomerRow]]] = { + selectByIds(customerids).runCollect.map { rows => + val byId = rows.view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilder("sales.customer", CustomerFields.structure, CustomerRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala index 3410c18eeb..90a96e5d25 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoMock.scala @@ -78,6 +78,12 @@ class CustomerRepoMock(toRow: Function1[CustomerRowUnsaved, CustomerRow], override def selectByIds(customerids: Array[CustomerId]): ZStream[ZConnection, Throwable, CustomerRow] = { ZStream.fromIterable(customerids.flatMap(map.get)) } + override def selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, Option[CustomerRow]]] = { + selectByIds(customerids).runCollect.map { rows => + val byId = rows.view.map(x => (x.customerid, x)).toMap + customerids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { UpdateBuilderMock(UpdateParams.empty, CustomerFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala index b39d5a51fd..e3970bc4e0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepo.scala @@ -30,6 +30,7 @@ trait PersoncreditcardRepo { def selectAll: ZStream[ZConnection, Throwable, PersoncreditcardRow] def selectById(compositeId: PersoncreditcardId): ZIO[ZConnection, Throwable, Option[PersoncreditcardRow]] def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZStream[ZConnection, Throwable, PersoncreditcardRow] + def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, Option[PersoncreditcardRow]]] def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] def update(row: PersoncreditcardRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: PersoncreditcardRow): ZIO[ZConnection, Throwable, UpdateResult[PersoncreditcardRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala index 29e13066ec..3aa3a2122d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala @@ -96,6 +96,12 @@ class PersoncreditcardRepoImpl extends PersoncreditcardRepo { """.query(using PersoncreditcardRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, Option[PersoncreditcardRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilder("sales.personcreditcard", PersoncreditcardFields.structure, PersoncreditcardRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala index 0d29b5dd1b..794326403a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoMock.scala @@ -80,6 +80,12 @@ class PersoncreditcardRepoMock(toRow: Function1[PersoncreditcardRowUnsaved, Pers override def selectByIds(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZStream[ZConnection, Throwable, PersoncreditcardRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, Option[PersoncreditcardRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { UpdateBuilderMock(UpdateParams.empty, PersoncreditcardFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala index ac7367be62..f547d70257 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepo.scala @@ -28,6 +28,7 @@ trait SalesorderdetailRepo { def selectAll: ZStream[ZConnection, Throwable, SalesorderdetailRow] def selectById(compositeId: SalesorderdetailId): ZIO[ZConnection, Throwable, Option[SalesorderdetailRow]] def selectByIds(compositeIds: Array[SalesorderdetailId]): ZStream[ZConnection, Throwable, SalesorderdetailRow] + def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, Option[SalesorderdetailRow]]] def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] def update(row: SalesorderdetailRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesorderdetailRow): ZIO[ZConnection, Throwable, UpdateResult[SalesorderdetailRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala index 300d251d0a..f4a5c3a3b9 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala @@ -115,6 +115,12 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.query(using SalesorderdetailRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilder("sales.salesorderdetail", SalesorderdetailFields.structure, SalesorderdetailRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala index e665c6d4a8..d2db148d5d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoMock.scala @@ -78,6 +78,12 @@ class SalesorderdetailRepoMock(toRow: Function1[SalesorderdetailRowUnsaved, Sale override def selectByIds(compositeIds: Array[SalesorderdetailId]): ZStream[ZConnection, Throwable, SalesorderdetailRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderdetailFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala index 3ec46f4a56..dbdf5bd61b 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepo.scala @@ -28,6 +28,7 @@ trait SalesorderheaderRepo { def selectAll: ZStream[ZConnection, Throwable, SalesorderheaderRow] def selectById(salesorderid: SalesorderheaderId): ZIO[ZConnection, Throwable, Option[SalesorderheaderRow]] def selectByIds(salesorderids: Array[SalesorderheaderId]): ZStream[ZConnection, Throwable, SalesorderheaderRow] + def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, Option[SalesorderheaderRow]]] def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] def update(row: SalesorderheaderRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesorderheaderRow): ZIO[ZConnection, Throwable, UpdateResult[SalesorderheaderRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala index 8e9b8b14cd..e0a8c8363e 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala @@ -141,6 +141,12 @@ class SalesorderheaderRepoImpl extends SalesorderheaderRepo { override def selectByIds(salesorderids: Array[SalesorderheaderId]): ZStream[ZConnection, Throwable, SalesorderheaderRow] = { sql"""select "salesorderid", "revisionnumber", "orderdate"::text, "duedate"::text, "shipdate"::text, "status", "onlineorderflag", "purchaseordernumber", "accountnumber", "customerid", "salespersonid", "territoryid", "billtoaddressid", "shiptoaddressid", "shipmethodid", "creditcardid", "creditcardapprovalcode", "currencyrateid", "subtotal", "taxamt", "freight", "totaldue", "comment", "rowguid", "modifieddate"::text from sales.salesorderheader where "salesorderid" = ANY(${Segment.paramSegment(salesorderids)(SalesorderheaderId.arraySetter)})""".query(using SalesorderheaderRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, Option[SalesorderheaderRow]]] = { + selectByIds(salesorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilder("sales.salesorderheader", SalesorderheaderFields.structure, SalesorderheaderRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala index e2484dd6f2..97788f28f1 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoMock.scala @@ -78,6 +78,12 @@ class SalesorderheaderRepoMock(toRow: Function1[SalesorderheaderRowUnsaved, Sale override def selectByIds(salesorderids: Array[SalesorderheaderId]): ZStream[ZConnection, Throwable, SalesorderheaderRow] = { ZStream.fromIterable(salesorderids.flatMap(map.get)) } + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, Option[SalesorderheaderRow]]] = { + selectByIds(salesorderids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salesorderid, x)).toMap + salesorderids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheaderFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala index 37744a2b8f..6fd76d41aa 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepo.scala @@ -28,6 +28,7 @@ trait SalesorderheadersalesreasonRepo { def selectAll: ZStream[ZConnection, Throwable, SalesorderheadersalesreasonRow] def selectById(compositeId: SalesorderheadersalesreasonId): ZIO[ZConnection, Throwable, Option[SalesorderheadersalesreasonRow]] def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId]): ZStream[ZConnection, Throwable, SalesorderheadersalesreasonRow] + def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] def update(row: SalesorderheadersalesreasonRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesorderheadersalesreasonRow): ZIO[ZConnection, Throwable, UpdateResult[SalesorderheadersalesreasonRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala index d16b06cb2c..5782ad6ae3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala @@ -95,6 +95,12 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.query(using SalesorderheadersalesreasonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilder("sales.salesorderheadersalesreason", SalesorderheadersalesreasonFields.structure, SalesorderheadersalesreasonRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala index e3d246f8f8..7b2ae48855 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoMock.scala @@ -78,6 +78,12 @@ class SalesorderheadersalesreasonRepoMock(toRow: Function1[Salesorderheadersales override def selectByIds(compositeIds: Array[SalesorderheadersalesreasonId]): ZStream[ZConnection, Throwable, SalesorderheadersalesreasonRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesorderheadersalesreasonFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala index 381f319dd5..1980909ae8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepo.scala @@ -29,6 +29,7 @@ trait SalespersonRepo { def selectAll: ZStream[ZConnection, Throwable, SalespersonRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[SalespersonRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, SalespersonRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[SalespersonRow]]] def update: UpdateBuilder[SalespersonFields, SalespersonRow] def update(row: SalespersonRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalespersonRow): ZIO[ZConnection, Throwable, UpdateResult[SalespersonRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala index e010ef225e..130a7890c8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala @@ -104,6 +104,12 @@ class SalespersonRepoImpl extends SalespersonRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, SalespersonRow] = { sql"""select "businessentityid", "territoryid", "salesquota", "bonus", "commissionpct", "salesytd", "saleslastyear", "rowguid", "modifieddate"::text from sales.salesperson where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using SalespersonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[SalespersonRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilder("sales.salesperson", SalespersonFields.structure, SalespersonRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala index 2e8c24c2de..e06c200d99 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoMock.scala @@ -79,6 +79,12 @@ class SalespersonRepoMock(toRow: Function1[SalespersonRowUnsaved, SalespersonRow override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, SalespersonRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[SalespersonRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala index 16843f8d74..e711cb0d21 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepo.scala @@ -28,6 +28,7 @@ trait SalespersonquotahistoryRepo { def selectAll: ZStream[ZConnection, Throwable, SalespersonquotahistoryRow] def selectById(compositeId: SalespersonquotahistoryId): ZIO[ZConnection, Throwable, Option[SalespersonquotahistoryRow]] def selectByIds(compositeIds: Array[SalespersonquotahistoryId]): ZStream[ZConnection, Throwable, SalespersonquotahistoryRow] + def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] def update(row: SalespersonquotahistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalespersonquotahistoryRow): ZIO[ZConnection, Throwable, UpdateResult[SalespersonquotahistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala index 945351b2f0..5f02734c51 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala @@ -101,6 +101,12 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.query(using SalespersonquotahistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilder("sales.salespersonquotahistory", SalespersonquotahistoryFields.structure, SalespersonquotahistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala index 56f39b12a4..14413ec737 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoMock.scala @@ -78,6 +78,12 @@ class SalespersonquotahistoryRepoMock(toRow: Function1[SalespersonquotahistoryRo override def selectByIds(compositeIds: Array[SalespersonquotahistoryId]): ZStream[ZConnection, Throwable, SalespersonquotahistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalespersonquotahistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala index ba560776a9..a5700c4cc2 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepo.scala @@ -28,6 +28,7 @@ trait SalesreasonRepo { def selectAll: ZStream[ZConnection, Throwable, SalesreasonRow] def selectById(salesreasonid: SalesreasonId): ZIO[ZConnection, Throwable, Option[SalesreasonRow]] def selectByIds(salesreasonids: Array[SalesreasonId]): ZStream[ZConnection, Throwable, SalesreasonRow] + def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, Option[SalesreasonRow]]] def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] def update(row: SalesreasonRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesreasonRow): ZIO[ZConnection, Throwable, UpdateResult[SalesreasonRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala index 0210b34358..68bd6f0cbc 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala @@ -84,6 +84,12 @@ class SalesreasonRepoImpl extends SalesreasonRepo { override def selectByIds(salesreasonids: Array[SalesreasonId]): ZStream[ZConnection, Throwable, SalesreasonRow] = { sql"""select "salesreasonid", "name", "reasontype", "modifieddate"::text from sales.salesreason where "salesreasonid" = ANY(${Segment.paramSegment(salesreasonids)(SalesreasonId.arraySetter)})""".query(using SalesreasonRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, Option[SalesreasonRow]]] = { + selectByIds(salesreasonids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilder("sales.salesreason", SalesreasonFields.structure, SalesreasonRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala index d4e9b7056c..9f590eab32 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoMock.scala @@ -78,6 +78,12 @@ class SalesreasonRepoMock(toRow: Function1[SalesreasonRowUnsaved, SalesreasonRow override def selectByIds(salesreasonids: Array[SalesreasonId]): ZStream[ZConnection, Throwable, SalesreasonRow] = { ZStream.fromIterable(salesreasonids.flatMap(map.get)) } + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, Option[SalesreasonRow]]] = { + selectByIds(salesreasonids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salesreasonid, x)).toMap + salesreasonids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { UpdateBuilderMock(UpdateParams.empty, SalesreasonFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala index b1bdd22b88..05d5b81379 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepo.scala @@ -28,6 +28,7 @@ trait SalestaxrateRepo { def selectAll: ZStream[ZConnection, Throwable, SalestaxrateRow] def selectById(salestaxrateid: SalestaxrateId): ZIO[ZConnection, Throwable, Option[SalestaxrateRow]] def selectByIds(salestaxrateids: Array[SalestaxrateId]): ZStream[ZConnection, Throwable, SalestaxrateRow] + def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, Option[SalestaxrateRow]]] def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] def update(row: SalestaxrateRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalestaxrateRow): ZIO[ZConnection, Throwable, UpdateResult[SalestaxrateRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala index fd65819275..13d35870c8 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala @@ -97,6 +97,12 @@ class SalestaxrateRepoImpl extends SalestaxrateRepo { override def selectByIds(salestaxrateids: Array[SalestaxrateId]): ZStream[ZConnection, Throwable, SalestaxrateRow] = { sql"""select "salestaxrateid", "stateprovinceid", "taxtype", "taxrate", "name", "rowguid", "modifieddate"::text from sales.salestaxrate where "salestaxrateid" = ANY(${Segment.paramSegment(salestaxrateids)(SalestaxrateId.arraySetter)})""".query(using SalestaxrateRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, Option[SalestaxrateRow]]] = { + selectByIds(salestaxrateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilder("sales.salestaxrate", SalestaxrateFields.structure, SalestaxrateRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala index 7dd64141e7..53621d728d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoMock.scala @@ -78,6 +78,12 @@ class SalestaxrateRepoMock(toRow: Function1[SalestaxrateRowUnsaved, Salestaxrate override def selectByIds(salestaxrateids: Array[SalestaxrateId]): ZStream[ZConnection, Throwable, SalestaxrateRow] = { ZStream.fromIterable(salestaxrateids.flatMap(map.get)) } + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, Option[SalestaxrateRow]]] = { + selectByIds(salestaxrateids).runCollect.map { rows => + val byId = rows.view.map(x => (x.salestaxrateid, x)).toMap + salestaxrateids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { UpdateBuilderMock(UpdateParams.empty, SalestaxrateFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala index 01cd2fa5b4..adb749709c 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepo.scala @@ -28,6 +28,7 @@ trait SalesterritoryRepo { def selectAll: ZStream[ZConnection, Throwable, SalesterritoryRow] def selectById(territoryid: SalesterritoryId): ZIO[ZConnection, Throwable, Option[SalesterritoryRow]] def selectByIds(territoryids: Array[SalesterritoryId]): ZStream[ZConnection, Throwable, SalesterritoryRow] + def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, Option[SalesterritoryRow]]] def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] def update(row: SalesterritoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesterritoryRow): ZIO[ZConnection, Throwable, UpdateResult[SalesterritoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala index 508c691e92..bc0351feb3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala @@ -108,6 +108,12 @@ class SalesterritoryRepoImpl extends SalesterritoryRepo { override def selectByIds(territoryids: Array[SalesterritoryId]): ZStream[ZConnection, Throwable, SalesterritoryRow] = { sql"""select "territoryid", "name", "countryregioncode", "group", "salesytd", "saleslastyear", "costytd", "costlastyear", "rowguid", "modifieddate"::text from sales.salesterritory where "territoryid" = ANY(${Segment.paramSegment(territoryids)(SalesterritoryId.arraySetter)})""".query(using SalesterritoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, Option[SalesterritoryRow]]] = { + selectByIds(territoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilder("sales.salesterritory", SalesterritoryFields.structure, SalesterritoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala index d18a1ba803..94a186bba0 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoMock.scala @@ -78,6 +78,12 @@ class SalesterritoryRepoMock(toRow: Function1[SalesterritoryRowUnsaved, Salester override def selectByIds(territoryids: Array[SalesterritoryId]): ZStream[ZConnection, Throwable, SalesterritoryRow] = { ZStream.fromIterable(territoryids.flatMap(map.get)) } + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, Option[SalesterritoryRow]]] = { + selectByIds(territoryids).runCollect.map { rows => + val byId = rows.view.map(x => (x.territoryid, x)).toMap + territoryids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala index 87ce2b768e..8c73f00f21 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepo.scala @@ -28,6 +28,7 @@ trait SalesterritoryhistoryRepo { def selectAll: ZStream[ZConnection, Throwable, SalesterritoryhistoryRow] def selectById(compositeId: SalesterritoryhistoryId): ZIO[ZConnection, Throwable, Option[SalesterritoryhistoryRow]] def selectByIds(compositeIds: Array[SalesterritoryhistoryId]): ZStream[ZConnection, Throwable, SalesterritoryhistoryRow] + def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] def update(row: SalesterritoryhistoryRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SalesterritoryhistoryRow): ZIO[ZConnection, Throwable, UpdateResult[SalesterritoryhistoryRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala index 50e5a99c19..ed4708437d 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala @@ -105,6 +105,12 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.query(using SalesterritoryhistoryRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilder("sales.salesterritoryhistory", SalesterritoryhistoryFields.structure, SalesterritoryhistoryRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala index 9debc2a881..679e23d176 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoMock.scala @@ -78,6 +78,12 @@ class SalesterritoryhistoryRepoMock(toRow: Function1[SalesterritoryhistoryRowUns override def selectByIds(compositeIds: Array[SalesterritoryhistoryId]): ZStream[ZConnection, Throwable, SalesterritoryhistoryRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { UpdateBuilderMock(UpdateParams.empty, SalesterritoryhistoryFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala index ebdc33a8de..9dfa5b228c 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepo.scala @@ -28,6 +28,7 @@ trait ShoppingcartitemRepo { def selectAll: ZStream[ZConnection, Throwable, ShoppingcartitemRow] def selectById(shoppingcartitemid: ShoppingcartitemId): ZIO[ZConnection, Throwable, Option[ShoppingcartitemRow]] def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): ZStream[ZConnection, Throwable, ShoppingcartitemRow] + def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] def update(row: ShoppingcartitemRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: ShoppingcartitemRow): ZIO[ZConnection, Throwable, UpdateResult[ShoppingcartitemRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala index 9d406eaa9a..38d01f37d2 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala @@ -93,6 +93,12 @@ class ShoppingcartitemRepoImpl extends ShoppingcartitemRepo { override def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): ZStream[ZConnection, Throwable, ShoppingcartitemRow] = { sql"""select "shoppingcartitemid", "shoppingcartid", "quantity", "productid", "datecreated"::text, "modifieddate"::text from sales.shoppingcartitem where "shoppingcartitemid" = ANY(${Segment.paramSegment(shoppingcartitemids)(ShoppingcartitemId.arraySetter)})""".query(using ShoppingcartitemRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] = { + selectByIds(shoppingcartitemids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilder("sales.shoppingcartitem", ShoppingcartitemFields.structure, ShoppingcartitemRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala index 2ff71fcd20..fa0090956a 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoMock.scala @@ -78,6 +78,12 @@ class ShoppingcartitemRepoMock(toRow: Function1[ShoppingcartitemRowUnsaved, Shop override def selectByIds(shoppingcartitemids: Array[ShoppingcartitemId]): ZStream[ZConnection, Throwable, ShoppingcartitemRow] = { ZStream.fromIterable(shoppingcartitemids.flatMap(map.get)) } + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, Option[ShoppingcartitemRow]]] = { + selectByIds(shoppingcartitemids).runCollect.map { rows => + val byId = rows.view.map(x => (x.shoppingcartitemid, x)).toMap + shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { UpdateBuilderMock(UpdateParams.empty, ShoppingcartitemFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala index f9a04241d8..caae2a83c3 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepo.scala @@ -28,6 +28,7 @@ trait SpecialofferRepo { def selectAll: ZStream[ZConnection, Throwable, SpecialofferRow] def selectById(specialofferid: SpecialofferId): ZIO[ZConnection, Throwable, Option[SpecialofferRow]] def selectByIds(specialofferids: Array[SpecialofferId]): ZStream[ZConnection, Throwable, SpecialofferRow] + def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, Option[SpecialofferRow]]] def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] def update(row: SpecialofferRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SpecialofferRow): ZIO[ZConnection, Throwable, UpdateResult[SpecialofferRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala index e19f2f7e63..165c856bf7 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala @@ -101,6 +101,12 @@ class SpecialofferRepoImpl extends SpecialofferRepo { override def selectByIds(specialofferids: Array[SpecialofferId]): ZStream[ZConnection, Throwable, SpecialofferRow] = { sql"""select "specialofferid", "description", "discountpct", "type", "category", "startdate"::text, "enddate"::text, "minqty", "maxqty", "rowguid", "modifieddate"::text from sales.specialoffer where "specialofferid" = ANY(${Segment.paramSegment(specialofferids)(SpecialofferId.arraySetter)})""".query(using SpecialofferRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, Option[SpecialofferRow]]] = { + selectByIds(specialofferids).runCollect.map { rows => + val byId = rows.view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilder("sales.specialoffer", SpecialofferFields.structure, SpecialofferRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala index 8ab87464cc..a8c18f8633 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoMock.scala @@ -78,6 +78,12 @@ class SpecialofferRepoMock(toRow: Function1[SpecialofferRowUnsaved, Specialoffer override def selectByIds(specialofferids: Array[SpecialofferId]): ZStream[ZConnection, Throwable, SpecialofferRow] = { ZStream.fromIterable(specialofferids.flatMap(map.get)) } + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, Option[SpecialofferRow]]] = { + selectByIds(specialofferids).runCollect.map { rows => + val byId = rows.view.map(x => (x.specialofferid, x)).toMap + specialofferids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala index d8427ca3cf..8c53f098af 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepo.scala @@ -28,6 +28,7 @@ trait SpecialofferproductRepo { def selectAll: ZStream[ZConnection, Throwable, SpecialofferproductRow] def selectById(compositeId: SpecialofferproductId): ZIO[ZConnection, Throwable, Option[SpecialofferproductRow]] def selectByIds(compositeIds: Array[SpecialofferproductId]): ZStream[ZConnection, Throwable, SpecialofferproductRow] + def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, Option[SpecialofferproductRow]]] def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] def update(row: SpecialofferproductRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: SpecialofferproductRow): ZIO[ZConnection, Throwable, UpdateResult[SpecialofferproductRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala index 7662c70bd6..3b09df00b2 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala @@ -100,6 +100,12 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.query(using SpecialofferproductRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilder("sales.specialofferproduct", SpecialofferproductFields.structure, SpecialofferproductRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala index c336ff998c..b9691ff831 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoMock.scala @@ -78,6 +78,12 @@ class SpecialofferproductRepoMock(toRow: Function1[SpecialofferproductRowUnsaved override def selectByIds(compositeIds: Array[SpecialofferproductId]): ZStream[ZConnection, Throwable, SpecialofferproductRow] = { ZStream.fromIterable(compositeIds.flatMap(map.get)) } + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + selectByIds(compositeIds).runCollect.map { rows => + val byId = rows.view.map(x => (x.compositeId, x)).toMap + compositeIds.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { UpdateBuilderMock(UpdateParams.empty, SpecialofferproductFields.structure.fields, map) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala index 1fedff271e..77ce64e215 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepo.scala @@ -29,6 +29,7 @@ trait StoreRepo { def selectAll: ZStream[ZConnection, Throwable, StoreRow] def selectById(businessentityid: BusinessentityId): ZIO[ZConnection, Throwable, Option[StoreRow]] def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, StoreRow] + def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[StoreRow]]] def update: UpdateBuilder[StoreFields, StoreRow] def update(row: StoreRow): ZIO[ZConnection, Throwable, Boolean] def upsert(unsaved: StoreRow): ZIO[ZConnection, Throwable, UpdateResult[StoreRow]] diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala index dbc14fb6f1..27e4a216df 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala @@ -90,6 +90,12 @@ class StoreRepoImpl extends StoreRepo { override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, StoreRow] = { sql"""select "businessentityid", "name", "salespersonid", "demographics", "rowguid", "modifieddate"::text from sales.store where "businessentityid" = ANY(${Segment.paramSegment(businessentityids)(BusinessentityId.arraySetter)})""".query(using StoreRow.jdbcDecoder).selectStream() } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[StoreRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilder("sales.store", StoreFields.structure, StoreRow.jdbcDecoder) } diff --git a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala index 546a680ef7..0694287157 100644 --- a/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala +++ b/typo-tester-zio-jdbc/generated-and-checked-in/adventureworks/sales/store/StoreRepoMock.scala @@ -79,6 +79,12 @@ class StoreRepoMock(toRow: Function1[StoreRowUnsaved, StoreRow], override def selectByIds(businessentityids: Array[BusinessentityId]): ZStream[ZConnection, Throwable, StoreRow] = { ZStream.fromIterable(businessentityids.flatMap(map.get)) } + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, Option[StoreRow]]] = { + selectByIds(businessentityids).runCollect.map { rows => + val byId = rows.view.map(x => (x.businessentityid, x)).toMap + businessentityids.view.map(id => (id, byId.get(id))).toMap + } + } override def update: UpdateBuilder[StoreFields, StoreRow] = { UpdateBuilderMock(UpdateParams.empty, StoreFields.structure.fields, map) } diff --git a/typo/src/scala/typo/internal/ComputedTable.scala b/typo/src/scala/typo/internal/ComputedTable.scala index 51dc5d6ad6..9a7354d2e2 100644 --- a/typo/src/scala/typo/internal/ComputedTable.scala +++ b/typo/src/scala/typo/internal/ComputedTable.scala @@ -149,12 +149,15 @@ case class ComputedTable( val unsavedParam = sc.Param(sc.Ident("unsaved"), names.RowName, None) RepoMethod.Upsert(dbTable.name, cols, id, unsavedParam, names.RowName) }, - maybeId.collect { - case unary: IdComputed.Unary => - RepoMethod.SelectByIds(dbTable.name, cols, unary, sc.Param(unary.paramName.appended("s"), sc.Type.ArrayOf(unary.tpe), None), names.RowName) - case x: IdComputed.Composite if x.cols.forall(col => col.dbCol.nullability == Nullability.NoNulls) => - RepoMethod.SelectByIds(dbTable.name, cols, x, sc.Param(x.paramName.appended("s"), sc.Type.ArrayOf(x.tpe), None), names.RowName) - }, + maybeId + .collect { + case unary: IdComputed.Unary => + RepoMethod.SelectByIds(dbTable.name, cols, unary, sc.Param(unary.paramName.appended("s"), sc.Type.ArrayOf(unary.tpe), None), names.RowName) + case x: IdComputed.Composite if x.cols.forall(col => col.dbCol.nullability == Nullability.NoNulls) => + RepoMethod.SelectByIds(dbTable.name, cols, x, sc.Param(x.paramName.appended("s"), sc.Type.ArrayOf(x.tpe), None), names.RowName) + } + .toList + .flatMap { x => List(x, RepoMethod.SelectByIdsTracked(x)) }, for { name <- names.FieldOrIdValueName fieldValueName <- names.FieldValueName diff --git a/typo/src/scala/typo/internal/RepoMethod.scala b/typo/src/scala/typo/internal/RepoMethod.scala index a66a80da33..39288119f8 100644 --- a/typo/src/scala/typo/internal/RepoMethod.scala +++ b/typo/src/scala/typo/internal/RepoMethod.scala @@ -31,11 +31,15 @@ object RepoMethod { case class SelectByIds( relName: db.RelationName, cols: NonEmptyList[ComputedColumn], - unaryId: IdComputed, + idComputed: IdComputed, idsParam: sc.Param, rowType: sc.Type ) extends Selector("selectByIds") + case class SelectByIdsTracked( + selectByIds: SelectByIds + ) extends Selector("selectByIdsTracked") + case class SelectByUnique( relName: db.RelationName, keyColumns: NonEmptyList[ComputedColumn], diff --git a/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala b/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala index 3451cb20d6..1dda50be05 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala @@ -171,6 +171,10 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa val usedDefineds = idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"toStatement$i"), ToStatement.of(sc.Type.ArrayOf(col.tpe)), None) } val params = sc.Param(sc.Ident("c"), TypesJava.Connection, None) :: usedDefineds code"def $name($idsParam)(implicit ${params.map(_.code).mkCode(", ")}): ${TypesScala.List.of(rowType)}" + case RepoMethod.SelectByIdsTracked(x) => + val usedDefineds = x.idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"toStatement$i"), ToStatement.of(sc.Type.ArrayOf(col.tpe)), None) } + val params = sc.Param(sc.Ident("c"), TypesJava.Connection, None) :: usedDefineds + code"def $name(${x.idsParam})(implicit ${params.map(_.code).mkCode(", ")}): ${TypesScala.Map.of(x.idComputed.tpe, TypesScala.Option.of(x.rowType))}" case RepoMethod.SelectByUnique(_, keyColumns, _, rowType) => code"def $name(${keyColumns.map(_.param.code).mkCode(", ")})(implicit c: ${TypesJava.Connection}): ${TypesScala.Option.of(rowType)}" case RepoMethod.SelectByFieldValues(_, _, _, fieldValueOrIdsParam, rowType) => @@ -257,6 +261,9 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa code"""|$sql.as(${rowParserFor(rowType)}.*) |""".stripMargin } + case RepoMethod.SelectByIdsTracked(x) => + code"""|val byId = ${x.methodName}(${x.idsParam.name}).view.map(x => (x.${x.idComputed.paramName}, x)).toMap + |${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap""".stripMargin case RepoMethod.UpdateBuilder(relName, fieldsType, rowType) => code"${sc.Type.dsl.UpdateBuilder}(${sc.StrLit(relName.value)}, $fieldsType.structure, $rowType.rowParser)" @@ -514,6 +521,9 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa code"map.get(${id.paramName})" case RepoMethod.SelectByIds(_, _, _, idsParam, _) => code"${idsParam.name}.flatMap(map.get).toList" + case RepoMethod.SelectByIdsTracked(x) => + code"""|val byId = ${x.methodName}(${x.idsParam.name}).view.map(x => (x.${x.idComputed.paramName}, x)).toMap + |${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap""".stripMargin case RepoMethod.SelectByUnique(_, keyColumns, _, _) => code"map.values.find(v => ${keyColumns.map(c => code"${c.name} == v.${c.name}").mkCode(" && ")})" diff --git a/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala b/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala index 6b6e0a925f..74beb82c34 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala @@ -70,15 +70,23 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef case RepoMethod.SelectById(_, _, id, rowType) => code"def $name(${id.param}): ${ConnectionIO.of(TypesScala.Option.of(rowType))}" case RepoMethod.SelectByIds(_, _, idComputed, idsParam, rowType) => - val usedDefineds = - idComputed.userDefinedCols.zipWithIndex - .map { case (col, i) => sc.Param(sc.Ident(s"puts$i"), Put.of(sc.Type.ArrayOf(col.tpe)), None) } + val usedDefineds = idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"puts$i"), Put.of(sc.Type.ArrayOf(col.tpe)), None) } usedDefineds match { case Nil => code"def $name($idsParam): ${fs2Stream.of(ConnectionIO, rowType)}" case nonEmpty => code"def $name($idsParam)(implicit ${nonEmpty.map(_.code).mkCode(", ")}): ${fs2Stream.of(ConnectionIO, rowType)}" } + case RepoMethod.SelectByIdsTracked(x) => + val usedDefineds = x.idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"puts$i"), Put.of(sc.Type.ArrayOf(col.tpe)), None) } + val returnType = ConnectionIO.of(TypesScala.Map.of(x.idComputed.tpe, TypesScala.Option.of(x.rowType))) + usedDefineds match { + case Nil => + code"def $name(${x.idsParam}): $returnType" + case nonEmpty => + code"def $name(${x.idsParam})(implicit ${nonEmpty.map(_.code).mkCode(", ")}): $returnType" + } + case RepoMethod.SelectByUnique(_, keyColumns, _, rowType) => code"def $name(${keyColumns.map(_.param.code).mkCode(", ")}): ${ConnectionIO.of(TypesScala.Option.of(rowType))}" case RepoMethod.SelectByFieldValues(_, _, _, fieldValueOrIdsParam, rowType) => @@ -167,6 +175,11 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef ) code"""${query(sql, rowType)}.stream""" } + case RepoMethod.SelectByIdsTracked(x) => + code"""|${x.methodName}(${x.idsParam.name}).compile.toList.map { rows => + | val byId = rows.view.map(x => (x.${x.idComputed.paramName}, x)).toMap + | ${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap + |}""".stripMargin case RepoMethod.SelectByUnique(relName, keyColumns, allColumns, rowType) => val sql = SQL { @@ -387,6 +400,11 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef code"$delayCIO(map.get(${id.paramName}))" case RepoMethod.SelectByIds(_, _, _, idsParam, _) => code"$fs2Stream.emits(${idsParam.name}.flatMap(map.get).toList)" + case RepoMethod.SelectByIdsTracked(x) => + code"""|${x.methodName}(${x.idsParam.name}).compile.toList.map { rows => + | val byId = rows.view.map(x => (x.${x.idComputed.paramName}, x)).toMap + | ${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap + |}""".stripMargin case RepoMethod.SelectByUnique(_, keyColumns, _, _) => code"${delayCIO}(map.values.find(v => ${keyColumns.map(c => code"${c.name} == v.${c.name}").mkCode(" && ")}))" diff --git a/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala b/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala index af434b65aa..0ce7a59b18 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala @@ -189,8 +189,7 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean case RepoMethod.SelectById(_, _, id, rowType) => code"def $name(${id.param}): ${ZIO.of(ZConnection, Throwable, TypesScala.Option.of(rowType))}" case RepoMethod.SelectByIds(_, _, idComputed, idsParam, rowType) => - val usedDefineds = idComputed.userDefinedCols.zipWithIndex - .map { case (col, i) => sc.Param(sc.Ident(s"encoder$i"), JdbcEncoder.of(sc.Type.ArrayOf(col.tpe)), None) } + val usedDefineds = idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"encoder$i"), JdbcEncoder.of(sc.Type.ArrayOf(col.tpe)), None) } usedDefineds match { case Nil => @@ -198,6 +197,16 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean case nonEmpty => code"def $name($idsParam)(implicit ${nonEmpty.map(_.code).mkCode(", ")}): ${ZStream.of(ZConnection, Throwable, rowType)}" } + case RepoMethod.SelectByIdsTracked(x) => + val usedDefineds = x.idComputed.userDefinedCols.zipWithIndex.map { case (col, i) => sc.Param(sc.Ident(s"encoder$i"), JdbcEncoder.of(sc.Type.ArrayOf(col.tpe)), None) } + val returnType = ZIO.of(ZConnection, Throwable, TypesScala.Map.of(x.idComputed.tpe, TypesScala.Option.of(x.rowType))) + usedDefineds match { + case Nil => + code"def $name(${x.idsParam}): $returnType" + case nonEmpty => + code"def $name(${x.idsParam})(implicit ${nonEmpty.map(_.code).mkCode(", ")}): $returnType" + } + case RepoMethod.SelectByUnique(_, keyColumns, _, rowType) => code"def $name(${keyColumns.map(_.param.code).mkCode(", ")}): ${ZIO.of(ZConnection, Throwable, TypesScala.Option.of(rowType))}" case RepoMethod.SelectByFieldValues(_, _, _, fieldValueOrIdsParam, rowType) => @@ -284,6 +293,11 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean ) code"""$sql.query(using ${lookupJdbcDecoder(rowType)}).selectStream()""" } + case RepoMethod.SelectByIdsTracked(x) => + code"""|${x.methodName}(${x.idsParam.name}).runCollect.map { rows => + | val byId = rows.view.map(x => (x.${x.idComputed.paramName}, x)).toMap + | ${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap + |}""".stripMargin case RepoMethod.SelectByUnique(relName, keyColumns, allCols, rowType) => val sql = SQL { @@ -503,6 +517,11 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean code"$ZIO.succeed(map.get(${id.paramName}))" case RepoMethod.SelectByIds(_, _, _, idsParam, _) => code"$ZStream.fromIterable(${idsParam.name}.flatMap(map.get))" + case RepoMethod.SelectByIdsTracked(x) => + code"""|${x.methodName}(${x.idsParam.name}).runCollect.map { rows => + | val byId = rows.view.map(x => (x.${x.idComputed.paramName}, x)).toMap + | ${x.idsParam.name}.view.map(id => (id, byId.get(id))).toMap + |}""".stripMargin case RepoMethod.SelectByUnique(_, keyColumns, _, _) => code"$ZIO.succeed(map.values.find(v => ${keyColumns.map(c => code"${c.name} == v.${c.name}").mkCode(" && ")}))"