From 1ec90952724e8c44f1a80c71692ddcb055264fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Raddum=20Berg?= Date: Sat, 4 May 2024 00:19:25 +0200 Subject: [PATCH] selectByIdsTracked had wrong interface, no need to wrap values in `Option` here. Breaking change --- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- .../hardcoded/myschema/football_club/FootballClubRepo.scala | 2 +- .../myschema/football_club/FootballClubRepoImpl.scala | 4 ++-- .../myschema/football_club/FootballClubRepoMock.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepo.scala | 2 +- .../myschema/marital_status/MaritalStatusRepoImpl.scala | 4 ++-- .../myschema/marital_status/MaritalStatusRepoMock.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepo.scala | 2 +- .../testdb/hardcoded/myschema/person/PersonRepoImpl.scala | 4 ++-- .../testdb/hardcoded/myschema/person/PersonRepoMock.scala | 4 ++-- site-in/other-features/testing-with-stubs.md | 4 ++-- site/package-lock.json | 2 +- .../humanresources/department/DepartmentRepo.scala | 2 +- .../humanresources/department/DepartmentRepoImpl.scala | 4 ++-- .../humanresources/department/DepartmentRepoMock.scala | 4 ++-- .../humanresources/employee/EmployeeRepo.scala | 2 +- .../humanresources/employee/EmployeeRepoImpl.scala | 4 ++-- .../humanresources/employee/EmployeeRepoMock.scala | 4 ++-- .../EmployeedepartmenthistoryRepo.scala | 2 +- .../EmployeedepartmenthistoryRepoImpl.scala | 4 ++-- .../EmployeedepartmenthistoryRepoMock.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepo.scala | 2 +- .../employeepayhistory/EmployeepayhistoryRepoImpl.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepoMock.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepo.scala | 2 +- .../humanresources/jobcandidate/JobcandidateRepoImpl.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepoMock.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepo.scala | 2 +- .../adventureworks/humanresources/shift/ShiftRepoImpl.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepoMock.scala | 4 ++-- .../adventureworks/person/address/AddressRepo.scala | 2 +- .../adventureworks/person/address/AddressRepoImpl.scala | 4 ++-- .../adventureworks/person/address/AddressRepoMock.scala | 4 ++-- .../adventureworks/person/addresstype/AddresstypeRepo.scala | 2 +- .../person/addresstype/AddresstypeRepoImpl.scala | 4 ++-- .../person/addresstype/AddresstypeRepoMock.scala | 4 ++-- .../person/businessentity/BusinessentityRepo.scala | 2 +- .../person/businessentity/BusinessentityRepoImpl.scala | 4 ++-- .../person/businessentity/BusinessentityRepoMock.scala | 4 ++-- .../businessentityaddress/BusinessentityaddressRepo.scala | 2 +- .../BusinessentityaddressRepoImpl.scala | 4 ++-- .../BusinessentityaddressRepoMock.scala | 4 ++-- .../businessentitycontact/BusinessentitycontactRepo.scala | 2 +- .../BusinessentitycontactRepoImpl.scala | 4 ++-- .../BusinessentitycontactRepoMock.scala | 4 ++-- .../adventureworks/person/contacttype/ContacttypeRepo.scala | 2 +- .../person/contacttype/ContacttypeRepoImpl.scala | 4 ++-- .../person/contacttype/ContacttypeRepoMock.scala | 4 ++-- .../person/countryregion/CountryregionRepo.scala | 2 +- .../person/countryregion/CountryregionRepoImpl.scala | 4 ++-- .../person/countryregion/CountryregionRepoMock.scala | 4 ++-- .../person/emailaddress/EmailaddressRepo.scala | 2 +- .../person/emailaddress/EmailaddressRepoImpl.scala | 4 ++-- .../person/emailaddress/EmailaddressRepoMock.scala | 4 ++-- .../adventureworks/person/password/PasswordRepo.scala | 2 +- .../adventureworks/person/password/PasswordRepoImpl.scala | 4 ++-- .../adventureworks/person/password/PasswordRepoMock.scala | 4 ++-- .../adventureworks/person/person/PersonRepo.scala | 2 +- .../adventureworks/person/person/PersonRepoImpl.scala | 4 ++-- .../adventureworks/person/person/PersonRepoMock.scala | 4 ++-- .../adventureworks/person/personphone/PersonphoneRepo.scala | 2 +- .../person/personphone/PersonphoneRepoImpl.scala | 4 ++-- .../person/personphone/PersonphoneRepoMock.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepo.scala | 2 +- .../person/phonenumbertype/PhonenumbertypeRepoImpl.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepoMock.scala | 4 ++-- .../person/stateprovince/StateprovinceRepo.scala | 2 +- .../person/stateprovince/StateprovinceRepoImpl.scala | 4 ++-- .../person/stateprovince/StateprovinceRepoMock.scala | 4 ++-- .../production/billofmaterials/BillofmaterialsRepo.scala | 2 +- .../billofmaterials/BillofmaterialsRepoImpl.scala | 4 ++-- .../billofmaterials/BillofmaterialsRepoMock.scala | 4 ++-- .../adventureworks/production/culture/CultureRepo.scala | 2 +- .../adventureworks/production/culture/CultureRepoImpl.scala | 4 ++-- .../adventureworks/production/culture/CultureRepoMock.scala | 4 ++-- .../adventureworks/production/document/DocumentRepo.scala | 2 +- .../production/document/DocumentRepoImpl.scala | 4 ++-- .../production/document/DocumentRepoMock.scala | 4 ++-- .../production/illustration/IllustrationRepo.scala | 2 +- .../production/illustration/IllustrationRepoImpl.scala | 4 ++-- .../production/illustration/IllustrationRepoMock.scala | 4 ++-- .../adventureworks/production/location/LocationRepo.scala | 2 +- .../production/location/LocationRepoImpl.scala | 4 ++-- .../production/location/LocationRepoMock.scala | 4 ++-- .../adventureworks/production/product/ProductRepo.scala | 2 +- .../adventureworks/production/product/ProductRepoImpl.scala | 4 ++-- .../adventureworks/production/product/ProductRepoMock.scala | 4 ++-- .../production/productcategory/ProductcategoryRepo.scala | 2 +- .../productcategory/ProductcategoryRepoImpl.scala | 4 ++-- .../productcategory/ProductcategoryRepoMock.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepo.scala | 2 +- .../productcosthistory/ProductcosthistoryRepoImpl.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepoMock.scala | 4 ++-- .../productdescription/ProductdescriptionRepo.scala | 2 +- .../productdescription/ProductdescriptionRepoImpl.scala | 4 ++-- .../productdescription/ProductdescriptionRepoMock.scala | 4 ++-- .../production/productdocument/ProductdocumentRepo.scala | 2 +- .../productdocument/ProductdocumentRepoImpl.scala | 4 ++-- .../productdocument/ProductdocumentRepoMock.scala | 4 ++-- .../production/productinventory/ProductinventoryRepo.scala | 2 +- .../productinventory/ProductinventoryRepoImpl.scala | 4 ++-- .../productinventory/ProductinventoryRepoMock.scala | 4 ++-- .../ProductlistpricehistoryRepo.scala | 2 +- .../ProductlistpricehistoryRepoImpl.scala | 4 ++-- .../ProductlistpricehistoryRepoMock.scala | 4 ++-- .../production/productmodel/ProductmodelRepo.scala | 2 +- .../production/productmodel/ProductmodelRepoImpl.scala | 4 ++-- .../production/productmodel/ProductmodelRepoMock.scala | 4 ++-- .../ProductmodelillustrationRepo.scala | 2 +- .../ProductmodelillustrationRepoImpl.scala | 4 ++-- .../ProductmodelillustrationRepoMock.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepo.scala | 2 +- .../ProductmodelproductdescriptioncultureRepoImpl.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepoMock.scala | 4 ++-- .../production/productphoto/ProductphotoRepo.scala | 2 +- .../production/productphoto/ProductphotoRepoImpl.scala | 4 ++-- .../production/productphoto/ProductphotoRepoMock.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepo.scala | 2 +- .../productproductphoto/ProductproductphotoRepoImpl.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepoMock.scala | 4 ++-- .../production/productreview/ProductreviewRepo.scala | 2 +- .../production/productreview/ProductreviewRepoImpl.scala | 4 ++-- .../production/productreview/ProductreviewRepoMock.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepo.scala | 2 +- .../productsubcategory/ProductsubcategoryRepoImpl.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepoMock.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepo.scala | 2 +- .../production/scrapreason/ScrapreasonRepoImpl.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepoMock.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepo.scala | 2 +- .../transactionhistory/TransactionhistoryRepoImpl.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepoMock.scala | 4 ++-- .../TransactionhistoryarchiveRepo.scala | 2 +- .../TransactionhistoryarchiveRepoImpl.scala | 4 ++-- .../TransactionhistoryarchiveRepoMock.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepo.scala | 2 +- .../production/unitmeasure/UnitmeasureRepoImpl.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepoMock.scala | 4 ++-- .../adventureworks/production/workorder/WorkorderRepo.scala | 2 +- .../production/workorder/WorkorderRepoImpl.scala | 4 ++-- .../production/workorder/WorkorderRepoMock.scala | 4 ++-- .../production/workorderrouting/WorkorderroutingRepo.scala | 2 +- .../workorderrouting/WorkorderroutingRepoImpl.scala | 4 ++-- .../workorderrouting/WorkorderroutingRepoMock.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepo.scala | 2 +- .../adventureworks/public/flaff/FlaffRepoImpl.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepoMock.scala | 4 ++-- .../public/identity_test/IdentityTestRepo.scala | 2 +- .../public/identity_test/IdentityTestRepoImpl.scala | 4 ++-- .../public/identity_test/IdentityTestRepoMock.scala | 4 ++-- .../adventureworks/public/users/UsersRepo.scala | 2 +- .../adventureworks/public/users/UsersRepoImpl.scala | 4 ++-- .../adventureworks/public/users/UsersRepoMock.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepo.scala | 2 +- .../purchasing/productvendor/ProductvendorRepoImpl.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepoMock.scala | 4 ++-- .../purchaseorderdetail/PurchaseorderdetailRepo.scala | 2 +- .../purchaseorderdetail/PurchaseorderdetailRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepo.scala | 2 +- .../purchaseorderheader/PurchaseorderheaderRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepoMock.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepo.scala | 2 +- .../purchasing/shipmethod/ShipmethodRepoImpl.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepoMock.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepo.scala | 2 +- .../adventureworks/purchasing/vendor/VendorRepoImpl.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepoMock.scala | 4 ++-- .../countryregioncurrency/CountryregioncurrencyRepo.scala | 2 +- .../CountryregioncurrencyRepoImpl.scala | 4 ++-- .../CountryregioncurrencyRepoMock.scala | 4 ++-- .../adventureworks/sales/creditcard/CreditcardRepo.scala | 2 +- .../sales/creditcard/CreditcardRepoImpl.scala | 4 ++-- .../sales/creditcard/CreditcardRepoMock.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepo.scala | 2 +- .../adventureworks/sales/currency/CurrencyRepoImpl.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepoMock.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepo.scala | 2 +- .../sales/currencyrate/CurrencyrateRepoImpl.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepoMock.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepo.scala | 2 +- .../adventureworks/sales/customer/CustomerRepoImpl.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepoMock.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepo.scala | 2 +- .../sales/personcreditcard/PersoncreditcardRepoImpl.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepoMock.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepo.scala | 2 +- .../sales/salesorderdetail/SalesorderdetailRepoImpl.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepoMock.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepo.scala | 2 +- .../sales/salesorderheader/SalesorderheaderRepoImpl.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepoMock.scala | 4 ++-- .../SalesorderheadersalesreasonRepo.scala | 2 +- .../SalesorderheadersalesreasonRepoImpl.scala | 4 ++-- .../SalesorderheadersalesreasonRepoMock.scala | 4 ++-- .../adventureworks/sales/salesperson/SalespersonRepo.scala | 2 +- .../sales/salesperson/SalespersonRepoImpl.scala | 4 ++-- .../sales/salesperson/SalespersonRepoMock.scala | 4 ++-- .../SalespersonquotahistoryRepo.scala | 2 +- .../SalespersonquotahistoryRepoImpl.scala | 4 ++-- .../SalespersonquotahistoryRepoMock.scala | 4 ++-- .../adventureworks/sales/salesreason/SalesreasonRepo.scala | 2 +- .../sales/salesreason/SalesreasonRepoImpl.scala | 4 ++-- .../sales/salesreason/SalesreasonRepoMock.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepo.scala | 2 +- .../sales/salestaxrate/SalestaxrateRepoImpl.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepoMock.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepo.scala | 2 +- .../sales/salesterritory/SalesterritoryRepoImpl.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepoMock.scala | 4 ++-- .../salesterritoryhistory/SalesterritoryhistoryRepo.scala | 2 +- .../SalesterritoryhistoryRepoImpl.scala | 4 ++-- .../SalesterritoryhistoryRepoMock.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepo.scala | 2 +- .../sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepoMock.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepo.scala | 2 +- .../sales/specialoffer/SpecialofferRepoImpl.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepoMock.scala | 4 ++-- .../sales/specialofferproduct/SpecialofferproductRepo.scala | 2 +- .../specialofferproduct/SpecialofferproductRepoImpl.scala | 4 ++-- .../specialofferproduct/SpecialofferproductRepoMock.scala | 4 ++-- .../adventureworks/sales/store/StoreRepo.scala | 2 +- .../adventureworks/sales/store/StoreRepoImpl.scala | 4 ++-- .../adventureworks/sales/store/StoreRepoMock.scala | 4 ++-- .../humanresources/department/DepartmentRepo.scala | 2 +- .../humanresources/department/DepartmentRepoImpl.scala | 4 ++-- .../humanresources/department/DepartmentRepoMock.scala | 4 ++-- .../humanresources/employee/EmployeeRepo.scala | 2 +- .../humanresources/employee/EmployeeRepoImpl.scala | 4 ++-- .../humanresources/employee/EmployeeRepoMock.scala | 4 ++-- .../EmployeedepartmenthistoryRepo.scala | 2 +- .../EmployeedepartmenthistoryRepoImpl.scala | 4 ++-- .../EmployeedepartmenthistoryRepoMock.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepo.scala | 2 +- .../employeepayhistory/EmployeepayhistoryRepoImpl.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepoMock.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepo.scala | 2 +- .../humanresources/jobcandidate/JobcandidateRepoImpl.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepoMock.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepo.scala | 2 +- .../adventureworks/humanresources/shift/ShiftRepoImpl.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepoMock.scala | 4 ++-- .../adventureworks/person/address/AddressRepo.scala | 2 +- .../adventureworks/person/address/AddressRepoImpl.scala | 4 ++-- .../adventureworks/person/address/AddressRepoMock.scala | 4 ++-- .../adventureworks/person/addresstype/AddresstypeRepo.scala | 2 +- .../person/addresstype/AddresstypeRepoImpl.scala | 4 ++-- .../person/addresstype/AddresstypeRepoMock.scala | 4 ++-- .../person/businessentity/BusinessentityRepo.scala | 2 +- .../person/businessentity/BusinessentityRepoImpl.scala | 4 ++-- .../person/businessentity/BusinessentityRepoMock.scala | 4 ++-- .../businessentityaddress/BusinessentityaddressRepo.scala | 2 +- .../BusinessentityaddressRepoImpl.scala | 4 ++-- .../BusinessentityaddressRepoMock.scala | 4 ++-- .../businessentitycontact/BusinessentitycontactRepo.scala | 2 +- .../BusinessentitycontactRepoImpl.scala | 4 ++-- .../BusinessentitycontactRepoMock.scala | 4 ++-- .../adventureworks/person/contacttype/ContacttypeRepo.scala | 2 +- .../person/contacttype/ContacttypeRepoImpl.scala | 4 ++-- .../person/contacttype/ContacttypeRepoMock.scala | 4 ++-- .../person/countryregion/CountryregionRepo.scala | 2 +- .../person/countryregion/CountryregionRepoImpl.scala | 4 ++-- .../person/countryregion/CountryregionRepoMock.scala | 4 ++-- .../person/emailaddress/EmailaddressRepo.scala | 2 +- .../person/emailaddress/EmailaddressRepoImpl.scala | 4 ++-- .../person/emailaddress/EmailaddressRepoMock.scala | 4 ++-- .../adventureworks/person/password/PasswordRepo.scala | 2 +- .../adventureworks/person/password/PasswordRepoImpl.scala | 4 ++-- .../adventureworks/person/password/PasswordRepoMock.scala | 4 ++-- .../adventureworks/person/person/PersonRepo.scala | 2 +- .../adventureworks/person/person/PersonRepoImpl.scala | 4 ++-- .../adventureworks/person/person/PersonRepoMock.scala | 4 ++-- .../adventureworks/person/personphone/PersonphoneRepo.scala | 2 +- .../person/personphone/PersonphoneRepoImpl.scala | 4 ++-- .../person/personphone/PersonphoneRepoMock.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepo.scala | 2 +- .../person/phonenumbertype/PhonenumbertypeRepoImpl.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepoMock.scala | 4 ++-- .../person/stateprovince/StateprovinceRepo.scala | 2 +- .../person/stateprovince/StateprovinceRepoImpl.scala | 4 ++-- .../person/stateprovince/StateprovinceRepoMock.scala | 4 ++-- .../production/billofmaterials/BillofmaterialsRepo.scala | 2 +- .../billofmaterials/BillofmaterialsRepoImpl.scala | 4 ++-- .../billofmaterials/BillofmaterialsRepoMock.scala | 4 ++-- .../adventureworks/production/culture/CultureRepo.scala | 2 +- .../adventureworks/production/culture/CultureRepoImpl.scala | 4 ++-- .../adventureworks/production/culture/CultureRepoMock.scala | 4 ++-- .../adventureworks/production/document/DocumentRepo.scala | 2 +- .../production/document/DocumentRepoImpl.scala | 4 ++-- .../production/document/DocumentRepoMock.scala | 4 ++-- .../production/illustration/IllustrationRepo.scala | 2 +- .../production/illustration/IllustrationRepoImpl.scala | 4 ++-- .../production/illustration/IllustrationRepoMock.scala | 4 ++-- .../adventureworks/production/location/LocationRepo.scala | 2 +- .../production/location/LocationRepoImpl.scala | 4 ++-- .../production/location/LocationRepoMock.scala | 4 ++-- .../adventureworks/production/product/ProductRepo.scala | 2 +- .../adventureworks/production/product/ProductRepoImpl.scala | 4 ++-- .../adventureworks/production/product/ProductRepoMock.scala | 4 ++-- .../production/productcategory/ProductcategoryRepo.scala | 2 +- .../productcategory/ProductcategoryRepoImpl.scala | 4 ++-- .../productcategory/ProductcategoryRepoMock.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepo.scala | 2 +- .../productcosthistory/ProductcosthistoryRepoImpl.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepoMock.scala | 4 ++-- .../productdescription/ProductdescriptionRepo.scala | 2 +- .../productdescription/ProductdescriptionRepoImpl.scala | 4 ++-- .../productdescription/ProductdescriptionRepoMock.scala | 4 ++-- .../production/productdocument/ProductdocumentRepo.scala | 2 +- .../productdocument/ProductdocumentRepoImpl.scala | 4 ++-- .../productdocument/ProductdocumentRepoMock.scala | 4 ++-- .../production/productinventory/ProductinventoryRepo.scala | 2 +- .../productinventory/ProductinventoryRepoImpl.scala | 4 ++-- .../productinventory/ProductinventoryRepoMock.scala | 4 ++-- .../ProductlistpricehistoryRepo.scala | 2 +- .../ProductlistpricehistoryRepoImpl.scala | 4 ++-- .../ProductlistpricehistoryRepoMock.scala | 4 ++-- .../production/productmodel/ProductmodelRepo.scala | 2 +- .../production/productmodel/ProductmodelRepoImpl.scala | 4 ++-- .../production/productmodel/ProductmodelRepoMock.scala | 4 ++-- .../ProductmodelillustrationRepo.scala | 2 +- .../ProductmodelillustrationRepoImpl.scala | 4 ++-- .../ProductmodelillustrationRepoMock.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepo.scala | 2 +- .../ProductmodelproductdescriptioncultureRepoImpl.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepoMock.scala | 4 ++-- .../production/productphoto/ProductphotoRepo.scala | 2 +- .../production/productphoto/ProductphotoRepoImpl.scala | 4 ++-- .../production/productphoto/ProductphotoRepoMock.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepo.scala | 2 +- .../productproductphoto/ProductproductphotoRepoImpl.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepoMock.scala | 4 ++-- .../production/productreview/ProductreviewRepo.scala | 2 +- .../production/productreview/ProductreviewRepoImpl.scala | 4 ++-- .../production/productreview/ProductreviewRepoMock.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepo.scala | 2 +- .../productsubcategory/ProductsubcategoryRepoImpl.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepoMock.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepo.scala | 2 +- .../production/scrapreason/ScrapreasonRepoImpl.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepoMock.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepo.scala | 2 +- .../transactionhistory/TransactionhistoryRepoImpl.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepoMock.scala | 4 ++-- .../TransactionhistoryarchiveRepo.scala | 2 +- .../TransactionhistoryarchiveRepoImpl.scala | 4 ++-- .../TransactionhistoryarchiveRepoMock.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepo.scala | 2 +- .../production/unitmeasure/UnitmeasureRepoImpl.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepoMock.scala | 4 ++-- .../adventureworks/production/workorder/WorkorderRepo.scala | 2 +- .../production/workorder/WorkorderRepoImpl.scala | 4 ++-- .../production/workorder/WorkorderRepoMock.scala | 4 ++-- .../production/workorderrouting/WorkorderroutingRepo.scala | 2 +- .../workorderrouting/WorkorderroutingRepoImpl.scala | 4 ++-- .../workorderrouting/WorkorderroutingRepoMock.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepo.scala | 2 +- .../adventureworks/public/flaff/FlaffRepoImpl.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepoMock.scala | 4 ++-- .../public/identity_test/IdentityTestRepo.scala | 2 +- .../public/identity_test/IdentityTestRepoImpl.scala | 4 ++-- .../public/identity_test/IdentityTestRepoMock.scala | 4 ++-- .../adventureworks/public/users/UsersRepo.scala | 2 +- .../adventureworks/public/users/UsersRepoImpl.scala | 4 ++-- .../adventureworks/public/users/UsersRepoMock.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepo.scala | 2 +- .../purchasing/productvendor/ProductvendorRepoImpl.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepoMock.scala | 4 ++-- .../purchaseorderdetail/PurchaseorderdetailRepo.scala | 2 +- .../purchaseorderdetail/PurchaseorderdetailRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepo.scala | 2 +- .../purchaseorderheader/PurchaseorderheaderRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepoMock.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepo.scala | 2 +- .../purchasing/shipmethod/ShipmethodRepoImpl.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepoMock.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepo.scala | 2 +- .../adventureworks/purchasing/vendor/VendorRepoImpl.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepoMock.scala | 4 ++-- .../countryregioncurrency/CountryregioncurrencyRepo.scala | 2 +- .../CountryregioncurrencyRepoImpl.scala | 4 ++-- .../CountryregioncurrencyRepoMock.scala | 4 ++-- .../adventureworks/sales/creditcard/CreditcardRepo.scala | 2 +- .../sales/creditcard/CreditcardRepoImpl.scala | 4 ++-- .../sales/creditcard/CreditcardRepoMock.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepo.scala | 2 +- .../adventureworks/sales/currency/CurrencyRepoImpl.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepoMock.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepo.scala | 2 +- .../sales/currencyrate/CurrencyrateRepoImpl.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepoMock.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepo.scala | 2 +- .../adventureworks/sales/customer/CustomerRepoImpl.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepoMock.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepo.scala | 2 +- .../sales/personcreditcard/PersoncreditcardRepoImpl.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepoMock.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepo.scala | 2 +- .../sales/salesorderdetail/SalesorderdetailRepoImpl.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepoMock.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepo.scala | 2 +- .../sales/salesorderheader/SalesorderheaderRepoImpl.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepoMock.scala | 4 ++-- .../SalesorderheadersalesreasonRepo.scala | 2 +- .../SalesorderheadersalesreasonRepoImpl.scala | 4 ++-- .../SalesorderheadersalesreasonRepoMock.scala | 4 ++-- .../adventureworks/sales/salesperson/SalespersonRepo.scala | 2 +- .../sales/salesperson/SalespersonRepoImpl.scala | 4 ++-- .../sales/salesperson/SalespersonRepoMock.scala | 4 ++-- .../SalespersonquotahistoryRepo.scala | 2 +- .../SalespersonquotahistoryRepoImpl.scala | 4 ++-- .../SalespersonquotahistoryRepoMock.scala | 4 ++-- .../adventureworks/sales/salesreason/SalesreasonRepo.scala | 2 +- .../sales/salesreason/SalesreasonRepoImpl.scala | 4 ++-- .../sales/salesreason/SalesreasonRepoMock.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepo.scala | 2 +- .../sales/salestaxrate/SalestaxrateRepoImpl.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepoMock.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepo.scala | 2 +- .../sales/salesterritory/SalesterritoryRepoImpl.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepoMock.scala | 4 ++-- .../salesterritoryhistory/SalesterritoryhistoryRepo.scala | 2 +- .../SalesterritoryhistoryRepoImpl.scala | 4 ++-- .../SalesterritoryhistoryRepoMock.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepo.scala | 2 +- .../sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepoMock.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepo.scala | 2 +- .../sales/specialoffer/SpecialofferRepoImpl.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepoMock.scala | 4 ++-- .../sales/specialofferproduct/SpecialofferproductRepo.scala | 2 +- .../specialofferproduct/SpecialofferproductRepoImpl.scala | 4 ++-- .../specialofferproduct/SpecialofferproductRepoMock.scala | 4 ++-- .../adventureworks/sales/store/StoreRepo.scala | 2 +- .../adventureworks/sales/store/StoreRepoImpl.scala | 4 ++-- .../adventureworks/sales/store/StoreRepoMock.scala | 4 ++-- .../humanresources/department/DepartmentRepo.scala | 2 +- .../humanresources/department/DepartmentRepoImpl.scala | 4 ++-- .../humanresources/department/DepartmentRepoMock.scala | 4 ++-- .../humanresources/employee/EmployeeRepo.scala | 2 +- .../humanresources/employee/EmployeeRepoImpl.scala | 4 ++-- .../humanresources/employee/EmployeeRepoMock.scala | 4 ++-- .../EmployeedepartmenthistoryRepo.scala | 2 +- .../EmployeedepartmenthistoryRepoImpl.scala | 4 ++-- .../EmployeedepartmenthistoryRepoMock.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepo.scala | 2 +- .../employeepayhistory/EmployeepayhistoryRepoImpl.scala | 4 ++-- .../employeepayhistory/EmployeepayhistoryRepoMock.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepo.scala | 2 +- .../humanresources/jobcandidate/JobcandidateRepoImpl.scala | 4 ++-- .../humanresources/jobcandidate/JobcandidateRepoMock.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepo.scala | 2 +- .../adventureworks/humanresources/shift/ShiftRepoImpl.scala | 4 ++-- .../adventureworks/humanresources/shift/ShiftRepoMock.scala | 4 ++-- .../adventureworks/person/address/AddressRepo.scala | 2 +- .../adventureworks/person/address/AddressRepoImpl.scala | 4 ++-- .../adventureworks/person/address/AddressRepoMock.scala | 4 ++-- .../adventureworks/person/addresstype/AddresstypeRepo.scala | 2 +- .../person/addresstype/AddresstypeRepoImpl.scala | 4 ++-- .../person/addresstype/AddresstypeRepoMock.scala | 4 ++-- .../person/businessentity/BusinessentityRepo.scala | 2 +- .../person/businessentity/BusinessentityRepoImpl.scala | 4 ++-- .../person/businessentity/BusinessentityRepoMock.scala | 4 ++-- .../businessentityaddress/BusinessentityaddressRepo.scala | 2 +- .../BusinessentityaddressRepoImpl.scala | 4 ++-- .../BusinessentityaddressRepoMock.scala | 4 ++-- .../businessentitycontact/BusinessentitycontactRepo.scala | 2 +- .../BusinessentitycontactRepoImpl.scala | 4 ++-- .../BusinessentitycontactRepoMock.scala | 4 ++-- .../adventureworks/person/contacttype/ContacttypeRepo.scala | 2 +- .../person/contacttype/ContacttypeRepoImpl.scala | 4 ++-- .../person/contacttype/ContacttypeRepoMock.scala | 4 ++-- .../person/countryregion/CountryregionRepo.scala | 2 +- .../person/countryregion/CountryregionRepoImpl.scala | 4 ++-- .../person/countryregion/CountryregionRepoMock.scala | 4 ++-- .../person/emailaddress/EmailaddressRepo.scala | 2 +- .../person/emailaddress/EmailaddressRepoImpl.scala | 4 ++-- .../person/emailaddress/EmailaddressRepoMock.scala | 4 ++-- .../adventureworks/person/password/PasswordRepo.scala | 2 +- .../adventureworks/person/password/PasswordRepoImpl.scala | 4 ++-- .../adventureworks/person/password/PasswordRepoMock.scala | 4 ++-- .../adventureworks/person/person/PersonRepo.scala | 2 +- .../adventureworks/person/person/PersonRepoImpl.scala | 4 ++-- .../adventureworks/person/person/PersonRepoMock.scala | 4 ++-- .../adventureworks/person/personphone/PersonphoneRepo.scala | 2 +- .../person/personphone/PersonphoneRepoImpl.scala | 4 ++-- .../person/personphone/PersonphoneRepoMock.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepo.scala | 2 +- .../person/phonenumbertype/PhonenumbertypeRepoImpl.scala | 4 ++-- .../person/phonenumbertype/PhonenumbertypeRepoMock.scala | 4 ++-- .../person/stateprovince/StateprovinceRepo.scala | 2 +- .../person/stateprovince/StateprovinceRepoImpl.scala | 4 ++-- .../person/stateprovince/StateprovinceRepoMock.scala | 4 ++-- .../production/billofmaterials/BillofmaterialsRepo.scala | 2 +- .../billofmaterials/BillofmaterialsRepoImpl.scala | 4 ++-- .../billofmaterials/BillofmaterialsRepoMock.scala | 4 ++-- .../adventureworks/production/culture/CultureRepo.scala | 2 +- .../adventureworks/production/culture/CultureRepoImpl.scala | 4 ++-- .../adventureworks/production/culture/CultureRepoMock.scala | 4 ++-- .../adventureworks/production/document/DocumentRepo.scala | 2 +- .../production/document/DocumentRepoImpl.scala | 4 ++-- .../production/document/DocumentRepoMock.scala | 4 ++-- .../production/illustration/IllustrationRepo.scala | 2 +- .../production/illustration/IllustrationRepoImpl.scala | 4 ++-- .../production/illustration/IllustrationRepoMock.scala | 4 ++-- .../adventureworks/production/location/LocationRepo.scala | 2 +- .../production/location/LocationRepoImpl.scala | 4 ++-- .../production/location/LocationRepoMock.scala | 4 ++-- .../adventureworks/production/product/ProductRepo.scala | 2 +- .../adventureworks/production/product/ProductRepoImpl.scala | 4 ++-- .../adventureworks/production/product/ProductRepoMock.scala | 4 ++-- .../production/productcategory/ProductcategoryRepo.scala | 2 +- .../productcategory/ProductcategoryRepoImpl.scala | 4 ++-- .../productcategory/ProductcategoryRepoMock.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepo.scala | 2 +- .../productcosthistory/ProductcosthistoryRepoImpl.scala | 4 ++-- .../productcosthistory/ProductcosthistoryRepoMock.scala | 4 ++-- .../productdescription/ProductdescriptionRepo.scala | 2 +- .../productdescription/ProductdescriptionRepoImpl.scala | 4 ++-- .../productdescription/ProductdescriptionRepoMock.scala | 4 ++-- .../production/productdocument/ProductdocumentRepo.scala | 2 +- .../productdocument/ProductdocumentRepoImpl.scala | 4 ++-- .../productdocument/ProductdocumentRepoMock.scala | 4 ++-- .../production/productinventory/ProductinventoryRepo.scala | 2 +- .../productinventory/ProductinventoryRepoImpl.scala | 4 ++-- .../productinventory/ProductinventoryRepoMock.scala | 4 ++-- .../ProductlistpricehistoryRepo.scala | 2 +- .../ProductlistpricehistoryRepoImpl.scala | 4 ++-- .../ProductlistpricehistoryRepoMock.scala | 4 ++-- .../production/productmodel/ProductmodelRepo.scala | 2 +- .../production/productmodel/ProductmodelRepoImpl.scala | 4 ++-- .../production/productmodel/ProductmodelRepoMock.scala | 4 ++-- .../ProductmodelillustrationRepo.scala | 2 +- .../ProductmodelillustrationRepoImpl.scala | 4 ++-- .../ProductmodelillustrationRepoMock.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepo.scala | 2 +- .../ProductmodelproductdescriptioncultureRepoImpl.scala | 4 ++-- .../ProductmodelproductdescriptioncultureRepoMock.scala | 4 ++-- .../production/productphoto/ProductphotoRepo.scala | 2 +- .../production/productphoto/ProductphotoRepoImpl.scala | 4 ++-- .../production/productphoto/ProductphotoRepoMock.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepo.scala | 2 +- .../productproductphoto/ProductproductphotoRepoImpl.scala | 4 ++-- .../productproductphoto/ProductproductphotoRepoMock.scala | 4 ++-- .../production/productreview/ProductreviewRepo.scala | 2 +- .../production/productreview/ProductreviewRepoImpl.scala | 4 ++-- .../production/productreview/ProductreviewRepoMock.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepo.scala | 2 +- .../productsubcategory/ProductsubcategoryRepoImpl.scala | 4 ++-- .../productsubcategory/ProductsubcategoryRepoMock.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepo.scala | 2 +- .../production/scrapreason/ScrapreasonRepoImpl.scala | 4 ++-- .../production/scrapreason/ScrapreasonRepoMock.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepo.scala | 2 +- .../transactionhistory/TransactionhistoryRepoImpl.scala | 4 ++-- .../transactionhistory/TransactionhistoryRepoMock.scala | 4 ++-- .../TransactionhistoryarchiveRepo.scala | 2 +- .../TransactionhistoryarchiveRepoImpl.scala | 4 ++-- .../TransactionhistoryarchiveRepoMock.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepo.scala | 2 +- .../production/unitmeasure/UnitmeasureRepoImpl.scala | 4 ++-- .../production/unitmeasure/UnitmeasureRepoMock.scala | 4 ++-- .../adventureworks/production/workorder/WorkorderRepo.scala | 2 +- .../production/workorder/WorkorderRepoImpl.scala | 4 ++-- .../production/workorder/WorkorderRepoMock.scala | 4 ++-- .../production/workorderrouting/WorkorderroutingRepo.scala | 2 +- .../workorderrouting/WorkorderroutingRepoImpl.scala | 4 ++-- .../workorderrouting/WorkorderroutingRepoMock.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepo.scala | 2 +- .../adventureworks/public/flaff/FlaffRepoImpl.scala | 4 ++-- .../adventureworks/public/flaff/FlaffRepoMock.scala | 4 ++-- .../public/identity_test/IdentityTestRepo.scala | 2 +- .../public/identity_test/IdentityTestRepoImpl.scala | 4 ++-- .../public/identity_test/IdentityTestRepoMock.scala | 4 ++-- .../adventureworks/public/users/UsersRepo.scala | 2 +- .../adventureworks/public/users/UsersRepoImpl.scala | 4 ++-- .../adventureworks/public/users/UsersRepoMock.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepo.scala | 2 +- .../purchasing/productvendor/ProductvendorRepoImpl.scala | 4 ++-- .../purchasing/productvendor/ProductvendorRepoMock.scala | 4 ++-- .../purchaseorderdetail/PurchaseorderdetailRepo.scala | 2 +- .../purchaseorderdetail/PurchaseorderdetailRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepo.scala | 2 +- .../purchaseorderheader/PurchaseorderheaderRepoImpl.scala | 4 ++-- .../purchaseorderheader/PurchaseorderheaderRepoMock.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepo.scala | 2 +- .../purchasing/shipmethod/ShipmethodRepoImpl.scala | 4 ++-- .../purchasing/shipmethod/ShipmethodRepoMock.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepo.scala | 2 +- .../adventureworks/purchasing/vendor/VendorRepoImpl.scala | 4 ++-- .../adventureworks/purchasing/vendor/VendorRepoMock.scala | 4 ++-- .../countryregioncurrency/CountryregioncurrencyRepo.scala | 2 +- .../CountryregioncurrencyRepoImpl.scala | 4 ++-- .../CountryregioncurrencyRepoMock.scala | 4 ++-- .../adventureworks/sales/creditcard/CreditcardRepo.scala | 2 +- .../sales/creditcard/CreditcardRepoImpl.scala | 4 ++-- .../sales/creditcard/CreditcardRepoMock.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepo.scala | 2 +- .../adventureworks/sales/currency/CurrencyRepoImpl.scala | 4 ++-- .../adventureworks/sales/currency/CurrencyRepoMock.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepo.scala | 2 +- .../sales/currencyrate/CurrencyrateRepoImpl.scala | 4 ++-- .../sales/currencyrate/CurrencyrateRepoMock.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepo.scala | 2 +- .../adventureworks/sales/customer/CustomerRepoImpl.scala | 4 ++-- .../adventureworks/sales/customer/CustomerRepoMock.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepo.scala | 2 +- .../sales/personcreditcard/PersoncreditcardRepoImpl.scala | 4 ++-- .../sales/personcreditcard/PersoncreditcardRepoMock.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepo.scala | 2 +- .../sales/salesorderdetail/SalesorderdetailRepoImpl.scala | 4 ++-- .../sales/salesorderdetail/SalesorderdetailRepoMock.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepo.scala | 2 +- .../sales/salesorderheader/SalesorderheaderRepoImpl.scala | 4 ++-- .../sales/salesorderheader/SalesorderheaderRepoMock.scala | 4 ++-- .../SalesorderheadersalesreasonRepo.scala | 2 +- .../SalesorderheadersalesreasonRepoImpl.scala | 4 ++-- .../SalesorderheadersalesreasonRepoMock.scala | 4 ++-- .../adventureworks/sales/salesperson/SalespersonRepo.scala | 2 +- .../sales/salesperson/SalespersonRepoImpl.scala | 4 ++-- .../sales/salesperson/SalespersonRepoMock.scala | 4 ++-- .../SalespersonquotahistoryRepo.scala | 2 +- .../SalespersonquotahistoryRepoImpl.scala | 4 ++-- .../SalespersonquotahistoryRepoMock.scala | 4 ++-- .../adventureworks/sales/salesreason/SalesreasonRepo.scala | 2 +- .../sales/salesreason/SalesreasonRepoImpl.scala | 4 ++-- .../sales/salesreason/SalesreasonRepoMock.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepo.scala | 2 +- .../sales/salestaxrate/SalestaxrateRepoImpl.scala | 4 ++-- .../sales/salestaxrate/SalestaxrateRepoMock.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepo.scala | 2 +- .../sales/salesterritory/SalesterritoryRepoImpl.scala | 4 ++-- .../sales/salesterritory/SalesterritoryRepoMock.scala | 4 ++-- .../salesterritoryhistory/SalesterritoryhistoryRepo.scala | 2 +- .../SalesterritoryhistoryRepoImpl.scala | 4 ++-- .../SalesterritoryhistoryRepoMock.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepo.scala | 2 +- .../sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala | 4 ++-- .../sales/shoppingcartitem/ShoppingcartitemRepoMock.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepo.scala | 2 +- .../sales/specialoffer/SpecialofferRepoImpl.scala | 4 ++-- .../sales/specialoffer/SpecialofferRepoMock.scala | 4 ++-- .../sales/specialofferproduct/SpecialofferproductRepo.scala | 2 +- .../specialofferproduct/SpecialofferproductRepoImpl.scala | 4 ++-- .../specialofferproduct/SpecialofferproductRepoMock.scala | 4 ++-- .../adventureworks/sales/store/StoreRepo.scala | 2 +- .../adventureworks/sales/store/StoreRepoImpl.scala | 4 ++-- .../adventureworks/sales/store/StoreRepoMock.scala | 4 ++-- typo/src/scala/typo/internal/codegen/DbLibAnorm.scala | 6 +++--- typo/src/scala/typo/internal/codegen/DbLibDoobie.scala | 6 +++--- typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala | 6 +++--- 695 files changed, 1161 insertions(+), 1161 deletions(-) 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 5d6d42da73..0f0a9a4075 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, 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 50fd41258a..b07adfce89 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,9 +86,9 @@ class FootballClubRepoImpl extends FootballClubRepo { """.as(FootballClubRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, FootballClubRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 55736f2965..0502d1a0aa 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,9 +62,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, FootballClubRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 ee8b312ddb..cf8ea88c39 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, 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 3c9db03ee0..2f536a4b6f 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,9 +84,9 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { """.as(MaritalStatusRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, MaritalStatusRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 93f67d888a..21b398b2fa 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,9 +61,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, MaritalStatusRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 047510ce53..d3c6b5bd62 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,7 +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 selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, 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 65bcd75f18..3c67d56d91 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,9 +149,9 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, PersonRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2e8e02462c..60c7276528 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,9 +84,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, PersonRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 5d6d42da73..0f0a9a4075 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, 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 50fd41258a..b07adfce89 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,9 +86,9 @@ class FootballClubRepoImpl extends FootballClubRepo { """.as(FootballClubRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, Option[FootballClubRow]] = { + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, FootballClubRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 55736f2965..0502d1a0aa 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,9 +62,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[FootballClubId])(implicit c: Connection): Map[FootballClubId, FootballClubRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 ee8b312ddb..cf8ea88c39 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, 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 3c9db03ee0..2f536a4b6f 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,9 +84,9 @@ class MaritalStatusRepoImpl extends MaritalStatusRepo { """.as(MaritalStatusRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, Option[MaritalStatusRow]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, MaritalStatusRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 93f67d888a..21b398b2fa 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,9 +61,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId])(implicit c: Connection): Map[MaritalStatusId, MaritalStatusRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 047510ce53..d3c6b5bd62 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,7 +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 selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, 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 65bcd75f18..3c67d56d91 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,9 +149,9 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } - override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, Option[PersonRow]] = { + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, PersonRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2e8e02462c..60c7276528 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,9 +84,9 @@ 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]] = { + override def selectByIdsTracked(ids: Array[PersonId])(implicit c: Connection): Map[PersonId, PersonRow] = { val byId = selectByIds(ids).view.map(x => (x.id, x)).toMap - ids.view.map(id => (id, byId.get(id))).toMap + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9725f6aef3..34e5502bbd 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 62accbdb21..0c0b7adfc4 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,10 +63,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 ad33e9bfd3..4a491a8171 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,10 +72,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 18dc8662ce..29564dfea6 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 740deb6e8a..c2253807d2 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,10 +59,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 1b1db7fecc..939f9d4077 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,10 +71,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 c986183981..5e9fe04f97 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,7 +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 selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 9b7ed9a025..db4ba9bc00 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,10 +125,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 e633ae11c6..1383c30b82 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,10 +98,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 9725f6aef3..34e5502bbd 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 62accbdb21..0c0b7adfc4 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,10 +63,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 ad33e9bfd3..4a491a8171 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,10 +72,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ConnectionIO[Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 18dc8662ce..29564dfea6 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 740deb6e8a..c2253807d2 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,10 +59,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 1b1db7fecc..939f9d4077 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,10 +71,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ConnectionIO[Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 c986183981..5e9fe04f97 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,7 +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 selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 9b7ed9a025..db4ba9bc00 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,10 +125,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 e633ae11c6..1383c30b82 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,10 +98,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ConnectionIO[Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 0b126c4244..652845f0c7 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 ed0a43b042..406d0e5ad7 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,10 +67,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 ff690515b8..f9f05fedb6 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,10 +73,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 c5562cd052..a12b10174e 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 8ff036483c..7993547ed5 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,10 +64,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 0ddc2c9871..3e3ede33b4 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,10 +72,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 52afa48211..7eb24cee51 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,7 +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 selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 f13dd712bc..8586c11ac0 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,10 +126,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 d5b263071b..b80c9ff686 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 0b126c4244..652845f0c7 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,7 +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 selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 ed0a43b042..406d0e5ad7 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,10 +67,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 ff690515b8..f9f05fedb6 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,10 +73,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[FootballClubId]): ZIO[ZConnection, Throwable, Map[FootballClubId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FootballClubFields, FootballClubRow] = { 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 c5562cd052..a12b10174e 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,7 +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 selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 8ff036483c..7993547ed5 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,10 +64,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 0ddc2c9871..3e3ede33b4 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,10 +72,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[MaritalStatusId]): ZIO[ZConnection, Throwable, Map[MaritalStatusId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[MaritalStatusFields, MaritalStatusRow] = { 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 52afa48211..7eb24cee51 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,7 +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 selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 f13dd712bc..8586c11ac0 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,10 +126,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 d5b263071b..b80c9ff686 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(ids: Array[PersonId]): ZIO[ZConnection, Throwable, Map[PersonId, 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 + ids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { diff --git a/site-in/other-features/testing-with-stubs.md b/site-in/other-features/testing-with-stubs.md index 8b9b638ae1..16db6a05cf 100644 --- a/site-in/other-features/testing-with-stubs.md +++ b/site-in/other-features/testing-with-stubs.md @@ -87,9 +87,9 @@ 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]] = { + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, AddressRow] = { val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap - addressids.view.map(id => (id, byId.get(id))).toMap + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } override def update: UpdateBuilder[AddressFields, AddressRow] = { UpdateBuilderMock(UpdateParams.empty, AddressFields.structure.fields, map) diff --git a/site/package-lock.json b/site/package-lock.json index 39fc98c629..bbd7fbd577 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -22,7 +22,7 @@ "raw-loader": "^4.0.2" }, "engines": { - "node": ">=16.14" + "node": ">=18.0" } }, "node_modules/@algolia/autocomplete-core": { 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 984cd0a667..54d667ecb9 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,7 +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 selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, 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 2a187328a4..b15a21849f 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,9 +102,9 @@ class DepartmentRepoImpl extends DepartmentRepo { """.as(DepartmentRow.rowParser(1).*) } - override def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, Option[DepartmentRow]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, DepartmentRow] = { val byId = selectByIds(departmentids).view.map(x => (x.departmentid, x)).toMap - departmentids.view.map(id => (id, byId.get(id))).toMap + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 728cf01efc..b83d522bb7 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId])(implicit c: Connection): Map[DepartmentId, DepartmentRow] = { val byId = selectByIds(departmentids).view.map(x => (x.departmentid, x)).toMap - departmentids.view.map(id => (id, byId.get(id))).toMap + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 0f82102b63..70387571de 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 57c803bb0f..552884748f 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,9 +134,9 @@ class EmployeeRepoImpl extends EmployeeRepo { """.as(EmployeeRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[EmployeeRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, EmployeeRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 c3ae281de6..d51a19b763 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, EmployeeRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 fd5e982845..ebe64177b9 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, 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 f632798fa7..e76e71a14b 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,9 +115,9 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.as(EmployeedepartmenthistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, EmployeedepartmenthistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 edceba0943..f2f156a9aa 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId])(implicit c: Connection): Map[EmployeedepartmenthistoryId, EmployeedepartmenthistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 567a3b31ae..d3e9a2dc48 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, 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 b24842d984..e71ea3187e 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,9 +108,9 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.as(EmployeepayhistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, EmployeepayhistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 6865526e2f..49d8daf2e8 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId])(implicit c: Connection): Map[EmployeepayhistoryId, EmployeepayhistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 ce38af2601..bdb9369575 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,7 +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 selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, 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 3611249ed8..d8b6fe6af0 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,9 +104,9 @@ class JobcandidateRepoImpl extends JobcandidateRepo { """.as(JobcandidateRow.rowParser(1).*) } - override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, Option[JobcandidateRow]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, JobcandidateRow] = { val byId = selectByIds(jobcandidateids).view.map(x => (x.jobcandidateid, x)).toMap - jobcandidateids.view.map(id => (id, byId.get(id))).toMap + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 6a91feb315..846704eb98 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId])(implicit c: Connection): Map[JobcandidateId, JobcandidateRow] = { val byId = selectByIds(jobcandidateids).view.map(x => (x.jobcandidateid, x)).toMap - jobcandidateids.view.map(id => (id, byId.get(id))).toMap + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 21cc0c7d05..e3a5bb1ba8 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,7 +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 selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, 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 26c37262ae..99e074e8d1 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,9 +104,9 @@ class ShiftRepoImpl extends ShiftRepo { """.as(ShiftRow.rowParser(1).*) } - override def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, Option[ShiftRow]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, ShiftRow] = { val byId = selectByIds(shiftids).view.map(x => (x.shiftid, x)).toMap - shiftids.view.map(id => (id, byId.get(id))).toMap + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 77e7838881..543e8b5417 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId])(implicit c: Connection): Map[ShiftId, ShiftRow] = { val byId = selectByIds(shiftids).view.map(x => (x.shiftid, x)).toMap - shiftids.view.map(id => (id, byId.get(id))).toMap + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e7bb18eca7..d6a3f76afa 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,7 +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 selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, 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 357e999a78..3b0cb8a0a0 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,9 +114,9 @@ class AddressRepoImpl extends AddressRepo { """.as(AddressRow.rowParser(1).*) } - override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, Option[AddressRow]] = { + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, AddressRow] = { val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap - addressids.view.map(id => (id, byId.get(id))).toMap + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 68f48b4f91..3bf97dab03 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(addressids: Array[AddressId])(implicit c: Connection): Map[AddressId, AddressRow] = { val byId = selectByIds(addressids).view.map(x => (x.addressid, x)).toMap - addressids.view.map(id => (id, byId.get(id))).toMap + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 21d143e702..b2bd59f5c2 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,7 +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 selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, 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 ed2b9c94d3..d1b8bcd3a6 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,9 +106,9 @@ class AddresstypeRepoImpl extends AddresstypeRepo { """.as(AddresstypeRow.rowParser(1).*) } - override def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, Option[AddresstypeRow]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, AddresstypeRow] = { val byId = selectByIds(addresstypeids).view.map(x => (x.addresstypeid, x)).toMap - addresstypeids.view.map(id => (id, byId.get(id))).toMap + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 4b793d4bd0..e4234d409a 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId])(implicit c: Connection): Map[AddresstypeId, AddresstypeRow] = { val byId = selectByIds(addresstypeids).view.map(x => (x.addresstypeid, x)).toMap - addresstypeids.view.map(id => (id, byId.get(id))).toMap + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f7676501ac..655e8b3210 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 07cd1990d9..af74af5547 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,9 +104,9 @@ class BusinessentityRepoImpl extends BusinessentityRepo { """.as(BusinessentityRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[BusinessentityRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, BusinessentityRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 782747ee71..dbc2e579ba 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, BusinessentityRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 8dbc69cd44..85611f4d33 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, 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 4e7985626a..833dedbca3 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,9 +114,9 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.as(BusinessentityaddressRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, Option[BusinessentityaddressRow]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, BusinessentityaddressRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 46dd1e624c..5aac2d929a 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId])(implicit c: Connection): Map[BusinessentityaddressId, BusinessentityaddressRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2fe3c20f73..3d311c8717 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, 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 44cf0ec686..2ef16a4f26 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,9 +113,9 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.as(BusinessentitycontactRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, Option[BusinessentitycontactRow]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, BusinessentitycontactRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 b569b65f0a..f13e136469 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId])(implicit c: Connection): Map[BusinessentitycontactId, BusinessentitycontactRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1127d5c7d4..69c219b04e 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,7 +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 selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, 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 1d21bec12c..2433724c4d 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,9 +101,9 @@ class ContacttypeRepoImpl extends ContacttypeRepo { """.as(ContacttypeRow.rowParser(1).*) } - override def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, Option[ContacttypeRow]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, ContacttypeRow] = { val byId = selectByIds(contacttypeids).view.map(x => (x.contacttypeid, x)).toMap - contacttypeids.view.map(id => (id, byId.get(id))).toMap + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 dfe4d0c878..081ada2325 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId])(implicit c: Connection): Map[ContacttypeId, ContacttypeRow] = { val byId = selectByIds(contacttypeids).view.map(x => (x.contacttypeid, x)).toMap - contacttypeids.view.map(id => (id, byId.get(id))).toMap + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 30168fc07c..3d2aebce3a 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,7 +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 selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, 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 2b3b68c124..b663c72c68 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,9 +98,9 @@ class CountryregionRepoImpl extends CountryregionRepo { """.as(CountryregionRow.rowParser(1).*) } - override def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, Option[CountryregionRow]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, CountryregionRow] = { val byId = selectByIds(countryregioncodes).view.map(x => (x.countryregioncode, x)).toMap - countryregioncodes.view.map(id => (id, byId.get(id))).toMap + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 468f5a038f..637b1192bd 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId])(implicit c: Connection): Map[CountryregionId, CountryregionRow] = { val byId = selectByIds(countryregioncodes).view.map(x => (x.countryregioncode, x)).toMap - countryregioncodes.view.map(id => (id, byId.get(id))).toMap + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 4746d294e0..4c4282b63a 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,7 +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 selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, 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 c04328aca7..3b822c70be 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,9 +115,9 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.as(EmailaddressRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, Option[EmailaddressRow]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, EmailaddressRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d861fdd938..1028945d58 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId])(implicit c: Connection): Map[EmailaddressId, EmailaddressRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 85b02a2e2c..bedde72dc6 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 2024826a02..88f615b98f 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,9 +105,9 @@ class PasswordRepoImpl extends PasswordRepo { """.as(PasswordRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PasswordRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, PasswordRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f0884f92d5..a2521ac316 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, PasswordRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1ffb1808f6..9dbec66538 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 b1678d64bb..3c5719c8d0 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,9 +124,9 @@ class PersonRepoImpl extends PersonRepo { """.as(PersonRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[PersonRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, PersonRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 0bf134d152..1ea00c3ac7 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, PersonRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 98dce02c6c..e1ef04026b 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,7 +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 selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, 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 87461b09a5..bb74407787 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,9 +109,9 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.as(PersonphoneRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, Option[PersonphoneRow]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, PersonphoneRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 efc178648e..daa99d93c6 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId])(implicit c: Connection): Map[PersonphoneId, PersonphoneRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2ea72dceda..0be2c2c174 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,7 +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 selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, 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 4c61470d0d..abbf810d4c 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,9 +101,9 @@ class PhonenumbertypeRepoImpl extends PhonenumbertypeRepo { """.as(PhonenumbertypeRow.rowParser(1).*) } - override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, Option[PhonenumbertypeRow]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, PhonenumbertypeRow] = { val byId = selectByIds(phonenumbertypeids).view.map(x => (x.phonenumbertypeid, x)).toMap - phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 a4a519d6de..d3b3285afc 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId])(implicit c: Connection): Map[PhonenumbertypeId, PhonenumbertypeRow] = { val byId = selectByIds(phonenumbertypeids).view.map(x => (x.phonenumbertypeid, x)).toMap - phonenumbertypeids.view.map(id => (id, byId.get(id))).toMap + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 8c96662b3e..279c3c91af 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,7 +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 selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, 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 7b973cecdf..3893e89fd6 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,9 +117,9 @@ class StateprovinceRepoImpl extends StateprovinceRepo { """.as(StateprovinceRow.rowParser(1).*) } - override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, Option[StateprovinceRow]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, StateprovinceRow] = { val byId = selectByIds(stateprovinceids).view.map(x => (x.stateprovinceid, x)).toMap - stateprovinceids.view.map(id => (id, byId.get(id))).toMap + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 27a09401f2..a771065545 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId])(implicit c: Connection): Map[StateprovinceId, StateprovinceRow] = { val byId = selectByIds(stateprovinceids).view.map(x => (x.stateprovinceid, x)).toMap - stateprovinceids.view.map(id => (id, byId.get(id))).toMap + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 29f3318ff0..560fea6a75 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,7 +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 selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, 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 61019bbc91..9fda823ed9 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,9 +116,9 @@ class BillofmaterialsRepoImpl extends BillofmaterialsRepo { """.as(BillofmaterialsRow.rowParser(1).*) } - override def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, Option[BillofmaterialsRow]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, BillofmaterialsRow] = { val byId = selectByIds(billofmaterialsids).view.map(x => (x.billofmaterialsid, x)).toMap - billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e4573a80f2..a4c9bf00a9 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int])(implicit c: Connection): Map[Int, BillofmaterialsRow] = { val byId = selectByIds(billofmaterialsids).view.map(x => (x.billofmaterialsid, x)).toMap - billofmaterialsids.view.map(id => (id, byId.get(id))).toMap + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 03ed2ea32c..f1c7fcff17 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,7 +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 selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, 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 464be319fa..2126c33ca5 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,9 +98,9 @@ class CultureRepoImpl extends CultureRepo { """.as(CultureRow.rowParser(1).*) } - override def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, Option[CultureRow]] = { + override def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, CultureRow] = { val byId = selectByIds(cultureids).view.map(x => (x.cultureid, x)).toMap - cultureids.view.map(id => (id, byId.get(id))).toMap + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9f9d6906d8..45a6f15564 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(cultureids: Array[CultureId])(implicit c: Connection): Map[CultureId, CultureRow] = { val byId = selectByIds(cultureids).view.map(x => (x.cultureid, x)).toMap - cultureids.view.map(id => (id, byId.get(id))).toMap + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1572180742..e11b65000f 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,7 +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 selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, 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 a649489a11..9eb2db3489 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,9 +126,9 @@ class DocumentRepoImpl extends DocumentRepo { """.as(DocumentRow.rowParser(1).*) } - override def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, Option[DocumentRow]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, DocumentRow] = { val byId = selectByIds(documentnodes).view.map(x => (x.documentnode, x)).toMap - documentnodes.view.map(id => (id, byId.get(id))).toMap + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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" 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 d2402cc9e4..9a04868e46 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId])(implicit c: Connection): Map[DocumentId, DocumentRow] = { val byId = selectByIds(documentnodes).view.map(x => (x.documentnode, x)).toMap - documentnodes.view.map(id => (id, byId.get(id))).toMap + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f6585ae140..6c0210c763 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,7 +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 selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, 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 79c2a7f1c1..3e2a07ab4d 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,9 +102,9 @@ class IllustrationRepoImpl extends IllustrationRepo { """.as(IllustrationRow.rowParser(1).*) } - override def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, Option[IllustrationRow]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, IllustrationRow] = { val byId = selectByIds(illustrationids).view.map(x => (x.illustrationid, x)).toMap - illustrationids.view.map(id => (id, byId.get(id))).toMap + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 80b9d322cf..2702c4d1be 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId])(implicit c: Connection): Map[IllustrationId, IllustrationRow] = { val byId = selectByIds(illustrationids).view.map(x => (x.illustrationid, x)).toMap - illustrationids.view.map(id => (id, byId.get(id))).toMap + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f970260fa9..5a14375801 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,7 +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 selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, 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 b7373c136c..81443ea067 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,9 +110,9 @@ class LocationRepoImpl extends LocationRepo { """.as(LocationRow.rowParser(1).*) } - override def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, Option[LocationRow]] = { + override def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, LocationRow] = { val byId = selectByIds(locationids).view.map(x => (x.locationid, x)).toMap - locationids.view.map(id => (id, byId.get(id))).toMap + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9691e46b0f..248ff17b74 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(locationids: Array[LocationId])(implicit c: Connection): Map[LocationId, LocationRow] = { val byId = selectByIds(locationids).view.map(x => (x.locationid, x)).toMap - locationids.view.map(id => (id, byId.get(id))).toMap + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1eba50fce4..e077e4b2de 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,7 +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 selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, 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 e8ed053303..966f565747 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,9 +140,9 @@ class ProductRepoImpl extends ProductRepo { """.as(ProductRow.rowParser(1).*) } - override def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, Option[ProductRow]] = { + override def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, ProductRow] = { val byId = selectByIds(productids).view.map(x => (x.productid, x)).toMap - productids.view.map(id => (id, byId.get(id))).toMap + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 37568e49dd..1e51931acc 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productids: Array[ProductId])(implicit c: Connection): Map[ProductId, ProductRow] = { val byId = selectByIds(productids).view.map(x => (x.productid, x)).toMap - productids.view.map(id => (id, byId.get(id))).toMap + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d44ebb78cd..3715886c04 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,7 +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 selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, 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 be674367dd..37d36be8ab 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,9 +106,9 @@ class ProductcategoryRepoImpl extends ProductcategoryRepo { """.as(ProductcategoryRow.rowParser(1).*) } - override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, Option[ProductcategoryRow]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, ProductcategoryRow] = { val byId = selectByIds(productcategoryids).view.map(x => (x.productcategoryid, x)).toMap - productcategoryids.view.map(id => (id, byId.get(id))).toMap + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 a549165d48..b501a1b23a 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId])(implicit c: Connection): Map[ProductcategoryId, ProductcategoryRow] = { val byId = selectByIds(productcategoryids).view.map(x => (x.productcategoryid, x)).toMap - productcategoryids.view.map(id => (id, byId.get(id))).toMap + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 cffe969075..b1a1d6a0f7 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, 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 3d78027aa0..823e9711ae 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,9 +107,9 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.as(ProductcosthistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, Option[ProductcosthistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, ProductcosthistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 a70bec374a..9c66695029 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId])(implicit c: Connection): Map[ProductcosthistoryId, ProductcosthistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 510d1d92d1..56c66e1700 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,7 +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 selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, 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 13442c6536..b97cb3b6b0 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,9 +106,9 @@ class ProductdescriptionRepoImpl extends ProductdescriptionRepo { """.as(ProductdescriptionRow.rowParser(1).*) } - override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, Option[ProductdescriptionRow]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, ProductdescriptionRow] = { val byId = selectByIds(productdescriptionids).view.map(x => (x.productdescriptionid, x)).toMap - productdescriptionids.view.map(id => (id, byId.get(id))).toMap + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f7c6b7a23e..30310ae71b 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId])(implicit c: Connection): Map[ProductdescriptionId, ProductdescriptionRow] = { val byId = selectByIds(productdescriptionids).view.map(x => (x.productdescriptionid, x)).toMap - productdescriptionids.view.map(id => (id, byId.get(id))).toMap + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 dfad7c204f..2a78e52772 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, 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 d188df9fa8..77eb27ce26 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,9 +108,9 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.as(ProductdocumentRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, Option[ProductdocumentRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, ProductdocumentRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 82dc53f7fb..21b8ef3e5b 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId])(implicit c: Connection): Map[ProductdocumentId, ProductdocumentRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 45ccfe50bc..ed3a87eb90 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, 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 08b8ae0498..7dd5bcecb7 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,9 +118,9 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.as(ProductinventoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, Option[ProductinventoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, ProductinventoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 85e47b0946..7fbdd78cff 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId])(implicit c: Connection): Map[ProductinventoryId, ProductinventoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9dcc766f96..f2af790106 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, 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 cef4ad46e9..389023010a 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,9 +107,9 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.as(ProductlistpricehistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, ProductlistpricehistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 0a7edebf90..611fdbab1a 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId])(implicit c: Connection): Map[ProductlistpricehistoryId, ProductlistpricehistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 8ea093e3fe..091ac06c9d 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,7 +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 selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, 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 a26acb8b5d..a8b5cd1eb3 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,9 +110,9 @@ class ProductmodelRepoImpl extends ProductmodelRepo { """.as(ProductmodelRow.rowParser(1).*) } - override def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, Option[ProductmodelRow]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, ProductmodelRow] = { val byId = selectByIds(productmodelids).view.map(x => (x.productmodelid, x)).toMap - productmodelids.view.map(id => (id, byId.get(id))).toMap + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2471fde4b4..299fcb1ffd 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId])(implicit c: Connection): Map[ProductmodelId, ProductmodelRow] = { val byId = selectByIds(productmodelids).view.map(x => (x.productmodelid, x)).toMap - productmodelids.view.map(id => (id, byId.get(id))).toMap + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 80815efc46..31b7f19698 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, 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 72f9166354..497da6a168 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,9 +105,9 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.as(ProductmodelillustrationRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, ProductmodelillustrationRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 28c179d167..56cc0e2267 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId])(implicit c: Connection): Map[ProductmodelillustrationId, ProductmodelillustrationRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 6f86668a17..cbc87422c9 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, 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 9f131922f7..5a3dfa2292 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,9 +109,9 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.as(ProductmodelproductdescriptioncultureRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, ProductmodelproductdescriptioncultureRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 aa4af0d52d..b1535d21a1 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId])(implicit c: Connection): Map[ProductmodelproductdescriptioncultureId, ProductmodelproductdescriptioncultureRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 02cb133e67..e73a0c3124 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,7 +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 selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, 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 4cef91a3ef..38a9a4a062 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,9 +106,9 @@ class ProductphotoRepoImpl extends ProductphotoRepo { """.as(ProductphotoRow.rowParser(1).*) } - override def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, Option[ProductphotoRow]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, ProductphotoRow] = { val byId = selectByIds(productphotoids).view.map(x => (x.productphotoid, x)).toMap - productphotoids.view.map(id => (id, byId.get(id))).toMap + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e24e073bdb..6bb12b12a4 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId])(implicit c: Connection): Map[ProductphotoId, ProductphotoRow] = { val byId = selectByIds(productphotoids).view.map(x => (x.productphotoid, x)).toMap - productphotoids.view.map(id => (id, byId.get(id))).toMap + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 0842722a2c..669286788f 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, 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 c9f31d2612..b448d03a32 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,9 +110,9 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.as(ProductproductphotoRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, Option[ProductproductphotoRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, ProductproductphotoRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 3273f5904a..3d786ebf5b 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId])(implicit c: Connection): Map[ProductproductphotoId, ProductproductphotoRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 ecc889973b..1dce4ece3c 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,7 +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 selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, 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 fc73147eda..db3ec9a77a 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,9 +112,9 @@ class ProductreviewRepoImpl extends ProductreviewRepo { """.as(ProductreviewRow.rowParser(1).*) } - override def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, Option[ProductreviewRow]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, ProductreviewRow] = { val byId = selectByIds(productreviewids).view.map(x => (x.productreviewid, x)).toMap - productreviewids.view.map(id => (id, byId.get(id))).toMap + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 036c0d720f..5ee5bd0833 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId])(implicit c: Connection): Map[ProductreviewId, ProductreviewRow] = { val byId = selectByIds(productreviewids).view.map(x => (x.productreviewid, x)).toMap - productreviewids.view.map(id => (id, byId.get(id))).toMap + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d18f58e0ad..14ea904267 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,7 +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 selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, 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 96a3b540ea..60a89f919a 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,9 +108,9 @@ class ProductsubcategoryRepoImpl extends ProductsubcategoryRepo { """.as(ProductsubcategoryRow.rowParser(1).*) } - override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, Option[ProductsubcategoryRow]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, ProductsubcategoryRow] = { val byId = selectByIds(productsubcategoryids).view.map(x => (x.productsubcategoryid, x)).toMap - productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 cc8027a8bf..29242b88ec 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId])(implicit c: Connection): Map[ProductsubcategoryId, ProductsubcategoryRow] = { val byId = selectByIds(productsubcategoryids).view.map(x => (x.productsubcategoryid, x)).toMap - productsubcategoryids.view.map(id => (id, byId.get(id))).toMap + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 27104030bd..011a077cd4 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,7 +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 selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, 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 ad78df5b93..2c93e95fc7 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,9 +101,9 @@ class ScrapreasonRepoImpl extends ScrapreasonRepo { """.as(ScrapreasonRow.rowParser(1).*) } - override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, Option[ScrapreasonRow]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, ScrapreasonRow] = { val byId = selectByIds(scrapreasonids).view.map(x => (x.scrapreasonid, x)).toMap - scrapreasonids.view.map(id => (id, byId.get(id))).toMap + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 381ddde005..6e0876cf1c 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId])(implicit c: Connection): Map[ScrapreasonId, ScrapreasonRow] = { val byId = selectByIds(scrapreasonids).view.map(x => (x.scrapreasonid, x)).toMap - scrapreasonids.view.map(id => (id, byId.get(id))).toMap + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2ab3ac71a3..0a61c5d64e 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, 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 8cf9f428c2..a59ad0fee5 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,9 +114,9 @@ class TransactionhistoryRepoImpl extends TransactionhistoryRepo { """.as(TransactionhistoryRow.rowParser(1).*) } - override def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, Option[TransactionhistoryRow]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, TransactionhistoryRow] = { val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap - transactionids.view.map(id => (id, byId.get(id))).toMap + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1ea1ddf600..47dac26054 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId])(implicit c: Connection): Map[TransactionhistoryId, TransactionhistoryRow] = { val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap - transactionids.view.map(id => (id, byId.get(id))).toMap + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 26928f4a1e..6e0b145c2b 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, 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 1e552b385e..f437e5c066 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,9 +110,9 @@ class TransactionhistoryarchiveRepoImpl extends TransactionhistoryarchiveRepo { """.as(TransactionhistoryarchiveRow.rowParser(1).*) } - override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, Option[TransactionhistoryarchiveRow]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, TransactionhistoryarchiveRow] = { val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap - transactionids.view.map(id => (id, byId.get(id))).toMap + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e10d2eac0a..835f9dd7ed 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId])(implicit c: Connection): Map[TransactionhistoryarchiveId, TransactionhistoryarchiveRow] = { val byId = selectByIds(transactionids).view.map(x => (x.transactionid, x)).toMap - transactionids.view.map(id => (id, byId.get(id))).toMap + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 3148688949..fbf624a03d 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,7 +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 selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, 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 bb8005a7b1..dda4b17ca2 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,9 +98,9 @@ class UnitmeasureRepoImpl extends UnitmeasureRepo { """.as(UnitmeasureRow.rowParser(1).*) } - override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, Option[UnitmeasureRow]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, UnitmeasureRow] = { val byId = selectByIds(unitmeasurecodes).view.map(x => (x.unitmeasurecode, x)).toMap - unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 a0c399b917..5446154277 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId])(implicit c: Connection): Map[UnitmeasureId, UnitmeasureRow] = { val byId = selectByIds(unitmeasurecodes).view.map(x => (x.unitmeasurecode, x)).toMap - unitmeasurecodes.view.map(id => (id, byId.get(id))).toMap + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 4e3eb2085b..08cb693e5c 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,7 +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 selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, 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 a16d0a3604..fce429714d 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,9 +110,9 @@ class WorkorderRepoImpl extends WorkorderRepo { """.as(WorkorderRow.rowParser(1).*) } - override def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, Option[WorkorderRow]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, WorkorderRow] = { val byId = selectByIds(workorderids).view.map(x => (x.workorderid, x)).toMap - workorderids.view.map(id => (id, byId.get(id))).toMap + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 bb4c2d8b40..8b1f489e85 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId])(implicit c: Connection): Map[WorkorderId, WorkorderRow] = { val byId = selectByIds(workorderids).view.map(x => (x.workorderid, x)).toMap - workorderids.view.map(id => (id, byId.get(id))).toMap + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e2561dc772..a7b98aa541 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,7 +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 selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, 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 d24ad2e605..8efd5ad83b 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,9 +119,9 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.as(WorkorderroutingRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, Option[WorkorderroutingRow]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, WorkorderroutingRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9c36788cd9..4916a0865b 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId])(implicit c: Connection): Map[WorkorderroutingId, WorkorderroutingRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 8758dd8796..609b5fb3e8 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,7 +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 selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, 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 16045f74f5..6eebf7d04f 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,9 +74,9 @@ class FlaffRepoImpl extends FlaffRepo { """.as(FlaffRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, Option[FlaffRow]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, FlaffRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 8e13a2d65c..ec41a18211 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,9 +55,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId])(implicit c: Connection): Map[FlaffId, FlaffRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 b4dd868656..f684ba2886 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,7 +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 selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, 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 155b923431..9d2133290f 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,9 +96,9 @@ class IdentityTestRepoImpl extends IdentityTestRepo { """.as(IdentityTestRow.rowParser(1).*) } - override def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, Option[IdentityTestRow]] = { + override def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, IdentityTestRow] = { val byId = selectByIds(names).view.map(x => (x.name, x)).toMap - names.view.map(id => (id, byId.get(id))).toMap + names.view.flatMap(id => byId.get(id).map(x => (id, x))).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 87ac487f8d..bbc05a3ca6 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(names: Array[IdentityTestId])(implicit c: Connection): Map[IdentityTestId, IdentityTestRow] = { val byId = selectByIds(names).view.map(x => (x.name, x)).toMap - names.view.map(id => (id, byId.get(id))).toMap + names.view.flatMap(id => byId.get(id).map(x => (id, x))).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 f0ce65228e..b91d7dbd7c 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,7 +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 selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, 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 99c2eaf6b8..a3a0a29f23 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,9 +104,9 @@ class UsersRepoImpl extends UsersRepo { """.as(UsersRow.rowParser(1).*) } - override def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, Option[UsersRow]] = { + override def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, UsersRow] = { val byId = selectByIds(userIds).view.map(x => (x.userId, x)).toMap - userIds.view.map(id => (id, byId.get(id))).toMap + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 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 155e0fb050..7413c085b8 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(userIds: Array[UsersId])(implicit c: Connection): Map[UsersId, UsersRow] = { val byId = selectByIds(userIds).view.map(x => (x.userId, x)).toMap - userIds.view.map(id => (id, byId.get(id))).toMap + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 4d648c88cf..6be9365233 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, 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 5aebef7ecd..500dad2c6e 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,9 +116,9 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.as(ProductvendorRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, Option[ProductvendorRow]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, ProductvendorRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 fe306860e7..a6790cf421 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId])(implicit c: Connection): Map[ProductvendorId, ProductvendorRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 7f79277cbc..18bf8c5652 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,5 +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]] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): Map[PurchaseorderdetailId, 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 88027d8ed4..7279916259 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,8 +40,8 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.as(PurchaseorderdetailRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]] = { + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId])(implicit c: Connection): Map[PurchaseorderdetailId, PurchaseorderdetailRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 c263bc1206..6eff633cc3 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,7 +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 selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, 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 225b761698..7514f1819b 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,9 +131,9 @@ class PurchaseorderheaderRepoImpl extends PurchaseorderheaderRepo { """.as(PurchaseorderheaderRow.rowParser(1).*) } - override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, Option[PurchaseorderheaderRow]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, PurchaseorderheaderRow] = { val byId = selectByIds(purchaseorderids).view.map(x => (x.purchaseorderid, x)).toMap - purchaseorderids.view.map(id => (id, byId.get(id))).toMap + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 29baec640d..6bbea156b9 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId])(implicit c: Connection): Map[PurchaseorderheaderId, PurchaseorderheaderRow] = { val byId = selectByIds(purchaseorderids).view.map(x => (x.purchaseorderid, x)).toMap - purchaseorderids.view.map(id => (id, byId.get(id))).toMap + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 bfa2f86f8f..2bcc28e36d 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,7 +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 selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, 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 721c565eec..8cdc568c35 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,9 +115,9 @@ class ShipmethodRepoImpl extends ShipmethodRepo { """.as(ShipmethodRow.rowParser(1).*) } - override def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, Option[ShipmethodRow]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, ShipmethodRow] = { val byId = selectByIds(shipmethodids).view.map(x => (x.shipmethodid, x)).toMap - shipmethodids.view.map(id => (id, byId.get(id))).toMap + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 b54b9c2627..5cc6b94764 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId])(implicit c: Connection): Map[ShipmethodId, ShipmethodRow] = { val byId = selectByIds(shipmethodids).view.map(x => (x.shipmethodid, x)).toMap - shipmethodids.view.map(id => (id, byId.get(id))).toMap + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e39757ef9f..1c6e1739c5 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 509eaccc69..510f77e82d 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,9 +115,9 @@ class VendorRepoImpl extends VendorRepo { """.as(VendorRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[VendorRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, VendorRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 0960b6fe1d..6c166b5aca 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, VendorRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 fbb3e85c2d..b688c30554 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,7 +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 selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, 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 dda50a5447..01458556ab 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,9 +105,9 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.as(CountryregioncurrencyRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, CountryregioncurrencyRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 c3a1a4579c..6d684657cf 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId])(implicit c: Connection): Map[CountryregioncurrencyId, CountryregioncurrencyRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 3a861f1b05..51ba3e86f1 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,7 +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 selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, 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 53c4444146..acbf2d6be8 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,9 +106,9 @@ 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]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, CreditcardRow] = { val byId = selectByIds(creditcardids).view.map(x => (x.creditcardid, x)).toMap - creditcardids.view.map(id => (id, byId.get(id))).toMap + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 dc9e6b1cc5..43727e4c99 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,9 +69,9 @@ 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]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[/* user-picked */ CustomCreditcardId, CreditcardRow] = { val byId = selectByIds(creditcardids).view.map(x => (x.creditcardid, x)).toMap - creditcardids.view.map(id => (id, byId.get(id))).toMap + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 2cde5e5246..5fe703c795 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,7 +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 selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, 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 575fbe2583..3f0f5055d4 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,9 +98,9 @@ class CurrencyRepoImpl extends CurrencyRepo { """.as(CurrencyRow.rowParser(1).*) } - override def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, Option[CurrencyRow]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, CurrencyRow] = { val byId = selectByIds(currencycodes).view.map(x => (x.currencycode, x)).toMap - currencycodes.view.map(id => (id, byId.get(id))).toMap + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 60641198f2..7616bcd771 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId])(implicit c: Connection): Map[CurrencyId, CurrencyRow] = { val byId = selectByIds(currencycodes).view.map(x => (x.currencycode, x)).toMap - currencycodes.view.map(id => (id, byId.get(id))).toMap + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).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 11f3fba810..51c409f6fa 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,7 +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 selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, 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 e9aa5ce375..386462eeab 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,9 +106,9 @@ class CurrencyrateRepoImpl extends CurrencyrateRepo { """.as(CurrencyrateRow.rowParser(1).*) } - override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, Option[CurrencyrateRow]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, CurrencyrateRow] = { val byId = selectByIds(currencyrateids).view.map(x => (x.currencyrateid, x)).toMap - currencyrateids.view.map(id => (id, byId.get(id))).toMap + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 415f491d54..b32c0679e3 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId])(implicit c: Connection): Map[CurrencyrateId, CurrencyrateRow] = { val byId = selectByIds(currencyrateids).view.map(x => (x.currencyrateid, x)).toMap - currencyrateids.view.map(id => (id, byId.get(id))).toMap + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d9347b44f2..1c04b7e16d 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,7 +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 selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, 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 94f53eb9cd..ff54b323c4 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,9 +110,9 @@ class CustomerRepoImpl extends CustomerRepo { """.as(CustomerRow.rowParser(1).*) } - override def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, Option[CustomerRow]] = { + override def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, CustomerRow] = { val byId = selectByIds(customerids).view.map(x => (x.customerid, x)).toMap - customerids.view.map(id => (id, byId.get(id))).toMap + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 107c5082b7..39ef9333d5 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(customerids: Array[CustomerId])(implicit c: Connection): Map[CustomerId, CustomerRow] = { val byId = selectByIds(customerids).view.map(x => (x.customerid, x)).toMap - customerids.view.map(id => (id, byId.get(id))).toMap + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 46a6dfebce..2748f91ad8 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,7 +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 selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, 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 1228d2b0f5..5f89fc2286 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,9 +106,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, PersoncreditcardRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d3f1874046..891192e136 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,9 +69,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit c: Connection, toStatement0: ToStatement[Array[/* user-picked */ CustomCreditcardId]]): Map[PersoncreditcardId, PersoncreditcardRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 7f12de0295..a6d48fa801 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, 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 bafb2a989f..911eedd38f 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,9 +126,9 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.as(SalesorderdetailRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, Option[SalesorderdetailRow]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, SalesorderdetailRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 dddd6d3930..bdaf75fcfb 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId])(implicit c: Connection): Map[SalesorderdetailId, SalesorderdetailRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 429e2f8f92..f9ee388f14 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,7 +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 selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, 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 6424fa0b12..f17437ec74 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,9 +160,9 @@ class SalesorderheaderRepoImpl extends SalesorderheaderRepo { """.as(SalesorderheaderRow.rowParser(1).*) } - override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, Option[SalesorderheaderRow]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, SalesorderheaderRow] = { val byId = selectByIds(salesorderids).view.map(x => (x.salesorderid, x)).toMap - salesorderids.view.map(id => (id, byId.get(id))).toMap + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 c261b59444..4ba14451c6 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId])(implicit c: Connection): Map[SalesorderheaderId, SalesorderheaderRow] = { val byId = selectByIds(salesorderids).view.map(x => (x.salesorderid, x)).toMap - salesorderids.view.map(id => (id, byId.get(id))).toMap + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 53005d36ff..a180bb4b18 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, 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 efe6806425..1d1873da16 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,9 +105,9 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.as(SalesorderheadersalesreasonRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, SalesorderheadersalesreasonRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d481620dd0..41dfce438b 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId])(implicit c: Connection): Map[SalesorderheadersalesreasonId, SalesorderheadersalesreasonRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 33bc48c36d..4b97eb12be 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 c07b3210e8..24da1337e9 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,9 +123,9 @@ class SalespersonRepoImpl extends SalespersonRepo { """.as(SalespersonRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[SalespersonRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, SalespersonRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 68b67e4444..c7087991c7 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, SalespersonRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 66371ce2f6..07ec8d4a06 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,7 +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 selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, 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 e64f5647e4..e2f485b5f2 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,9 +111,9 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.as(SalespersonquotahistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, SalespersonquotahistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 1f21139e3d..e800461f97 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId])(implicit c: Connection): Map[SalespersonquotahistoryId, SalespersonquotahistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 bc48e77f03..16b7c307ba 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,7 +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 selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, 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 ea50f446f5..54a11bbc26 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,9 +102,9 @@ class SalesreasonRepoImpl extends SalesreasonRepo { """.as(SalesreasonRow.rowParser(1).*) } - override def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, Option[SalesreasonRow]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, SalesreasonRow] = { val byId = selectByIds(salesreasonids).view.map(x => (x.salesreasonid, x)).toMap - salesreasonids.view.map(id => (id, byId.get(id))).toMap + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9f598da8d5..36eb092a8a 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId])(implicit c: Connection): Map[SalesreasonId, SalesreasonRow] = { val byId = selectByIds(salesreasonids).view.map(x => (x.salesreasonid, x)).toMap - salesreasonids.view.map(id => (id, byId.get(id))).toMap + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9c64a0d14a..cd72e6ef17 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,7 +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 selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, 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 7ec3eda1f3..c0436cbda2 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,9 +115,9 @@ class SalestaxrateRepoImpl extends SalestaxrateRepo { """.as(SalestaxrateRow.rowParser(1).*) } - override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, Option[SalestaxrateRow]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, SalestaxrateRow] = { val byId = selectByIds(salestaxrateids).view.map(x => (x.salestaxrateid, x)).toMap - salestaxrateids.view.map(id => (id, byId.get(id))).toMap + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 4fa38415a9..e51dcf7c9c 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId])(implicit c: Connection): Map[SalestaxrateId, SalestaxrateRow] = { val byId = selectByIds(salestaxrateids).view.map(x => (x.salestaxrateid, x)).toMap - salestaxrateids.view.map(id => (id, byId.get(id))).toMap + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 64b27b320f..eac709b2fd 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,7 +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 selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, 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 832309bda0..b5e1f4f974 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,9 +126,9 @@ class SalesterritoryRepoImpl extends SalesterritoryRepo { """.as(SalesterritoryRow.rowParser(1).*) } - override def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, Option[SalesterritoryRow]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, SalesterritoryRow] = { val byId = selectByIds(territoryids).view.map(x => (x.territoryid, x)).toMap - territoryids.view.map(id => (id, byId.get(id))).toMap + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 25f99231b0..c800aef670 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId])(implicit c: Connection): Map[SalesterritoryId, SalesterritoryRow] = { val byId = selectByIds(territoryids).view.map(x => (x.territoryid, x)).toMap - territoryids.view.map(id => (id, byId.get(id))).toMap + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 21e49c7bd1..e1b55d5696 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, 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 f941fd359a..8862de6c1b 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,9 +115,9 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.as(SalesterritoryhistoryRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, SalesterritoryhistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 601ea4123b..f8ada5e502 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId])(implicit c: Connection): Map[SalesterritoryhistoryId, SalesterritoryhistoryRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 408bcf4e00..fd54f6963b 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,7 +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 selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, 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 ee5a9f2203..de2faa6940 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,9 +111,9 @@ class ShoppingcartitemRepoImpl extends ShoppingcartitemRepo { """.as(ShoppingcartitemRow.rowParser(1).*) } - override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, Option[ShoppingcartitemRow]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, ShoppingcartitemRow] = { val byId = selectByIds(shoppingcartitemids).view.map(x => (x.shoppingcartitemid, x)).toMap - shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 af773b071b..e89a6ee84e 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId])(implicit c: Connection): Map[ShoppingcartitemId, ShoppingcartitemRow] = { val byId = selectByIds(shoppingcartitemids).view.map(x => (x.shoppingcartitemid, x)).toMap - shoppingcartitemids.view.map(id => (id, byId.get(id))).toMap + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 9c750d0b16..f3af8fbdca 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,7 +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 selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, 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 037102309d..130774d753 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,9 +120,9 @@ class SpecialofferRepoImpl extends SpecialofferRepo { """.as(SpecialofferRow.rowParser(1).*) } - override def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, Option[SpecialofferRow]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, SpecialofferRow] = { val byId = selectByIds(specialofferids).view.map(x => (x.specialofferid, x)).toMap - specialofferids.view.map(id => (id, byId.get(id))).toMap + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 aa3257ebc6..a0aec4cfc6 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId])(implicit c: Connection): Map[SpecialofferId, SpecialofferRow] = { val byId = selectByIds(specialofferids).view.map(x => (x.specialofferid, x)).toMap - specialofferids.view.map(id => (id, byId.get(id))).toMap + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 d3ec26beb6..3eb44c9bf3 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,7 +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 selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, 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 67df42fba5..5371254ab0 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,9 +110,9 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.as(SpecialofferproductRow.rowParser(1).*) } - override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, Option[SpecialofferproductRow]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, SpecialofferproductRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 fe2b3d0da1..8841b54fbf 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,9 +67,9 @@ 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]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId])(implicit c: Connection): Map[SpecialofferproductId, SpecialofferproductRow] = { val byId = selectByIds(compositeIds).view.map(x => (x.compositeId, x)).toMap - compositeIds.view.map(id => (id, byId.get(id))).toMap + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 e7469af578..b8432187b9 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, 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 568ca9aee5..1665aed60c 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,9 +108,9 @@ class StoreRepoImpl extends StoreRepo { """.as(StoreRow.rowParser(1).*) } - override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, Option[StoreRow]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, StoreRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 a8b3e39279..e1c93d997b 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,9 +68,9 @@ 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]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId])(implicit c: Connection): Map[BusinessentityId, StoreRow] = { val byId = selectByIds(businessentityids).view.map(x => (x.businessentityid, x)).toMap - businessentityids.view.map(id => (id, byId.get(id))).toMap + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).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 6e527dd6e9..a0ad086c78 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,7 +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 selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, 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 c2bb75e9bd..e6968621cd 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,10 +85,10 @@ 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]]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, 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 + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { 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 b08fa59861..1096e9bcfd 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ConnectionIO[Map[DepartmentId, 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 + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { 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 7594dbaf9c..0a7187f89f 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 dd6736baf8..23c4a0fab2 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,10 +116,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { 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 af2f252ed2..320deea426 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { 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 1bdd17cc00..3b99c7ec54 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, 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 8c7a7bb56f..09dab2c0b7 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,10 +105,10 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.query(using EmployeedepartmenthistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { 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 d602f32c4e..a12ced5749 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ConnectionIO[Map[EmployeedepartmenthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { 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 5ce385d6f2..4da02bcb1e 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, 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 688ace2bd3..2787641a97 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,10 +99,10 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.query(using EmployeepayhistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { 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 109ad91612..9a0b61b394 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ConnectionIO[Map[EmployeepayhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { 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 9f0f1aabb2..2855a8944b 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,7 +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 selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, 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 f1a140a6e6..1bd3f8fc18 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,10 +86,10 @@ 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]]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, 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 + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { 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 160861300b..2eb61dcc07 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ConnectionIO[Map[JobcandidateId, 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 + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { 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 3f3242dc87..36648c9c8c 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,7 +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 selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, 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 4ea2b4a993..7d365012d2 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,10 +87,10 @@ 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]]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, 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 + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { 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 73f6fa529c..094ad19206 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId]): ConnectionIO[Map[ShiftId, 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 + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { 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 1ab02938de..6489fe2c9b 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,7 +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 selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, 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 cf71550e83..dbd4011719 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,10 +96,10 @@ 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]]] = { + override def selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, 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 + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddressFields, AddressRow] = { 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 e84a07c050..dff0adecaa 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(addressids: Array[AddressId]): ConnectionIO[Map[AddressId, 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 + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddressFields, AddressRow] = { 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 744b287078..b1f569f9f1 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,7 +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 selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, 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 dba5e88d54..f9fd5631ff 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,10 +89,10 @@ 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]]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, 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 + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { 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 255b08ea6e..66b8014115 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ConnectionIO[Map[AddresstypeId, 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 + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { 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 af8f931b83..6394b5241b 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 2266a5c6b0..5ab2a1202e 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,10 +87,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { 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 92a07e017a..1ab5783e2c 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { 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 ed9ebf0718..1dca0ffc38 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, 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 c86614177c..37b8faf6d0 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,10 +105,10 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.query(using BusinessentityaddressRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { 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 fbb516cfe7..6a5c1a6eff 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ConnectionIO[Map[BusinessentityaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { 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 97d14ecadb..abffd5b6f6 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, 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 6492a4aade..65b96d7acc 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,10 +104,10 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.query(using BusinessentitycontactRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { 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 af0b548641..e6a8745604 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ConnectionIO[Map[BusinessentitycontactId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { 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 a62f3a62a4..5d7e93a36d 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,7 +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 selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, 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 12f7b21a86..49f252019e 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, 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 + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { 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 7d5ecd99f8..40e1547231 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ConnectionIO[Map[ContacttypeId, 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 + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { 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 8809108c66..b4e96ced88 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,7 +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 selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, 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 fe448e8a93..cb3c75815d 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, 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 + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { 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 b4b90e0cbe..d9c05bd76c 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ConnectionIO[Map[CountryregionId, 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 + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { 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 b7f3a0e0e9..d64e2df5c5 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,7 +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 selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, 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 b79d30b369..699cf9cc17 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,10 +105,10 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.query(using EmailaddressRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, Option[EmailaddressRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { 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 7cc6ef9653..cd462ee0d6 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ConnectionIO[Map[EmailaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { 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 fd2870d694..3a5d28d899 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 8431db0220..0e5c969b93 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { 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 5b47f9e83b..57aa5c1eb0 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { 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 4d707ebce0..4fbf1b2a8a 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 71d28de213..7764d64ca5 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,10 +106,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 3061ac6dda..f8af4abb13 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 ec7554cac9..0cecdafb0c 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,7 +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 selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, 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 ef1bef84a2..c201cc2774 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,10 +100,10 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.query(using PersonphoneRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, Option[PersonphoneRow]]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { 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 dec8be0120..8d934663ea 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ConnectionIO[Map[PersonphoneId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { 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 f234e208c2..18f72dd853 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,7 +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 selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, 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 3c42e8ac59..37af00a2cc 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, 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 + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { 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 904a959fb6..7beb97d4b8 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ConnectionIO[Map[PhonenumbertypeId, 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 + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { 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 c15c0dd15d..eeba397b3f 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,7 +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 selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, 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 ea01fbe6fb..050cb44f48 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,10 +100,10 @@ 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]]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, 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 + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { 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 2d0a02cb75..09f71195d1 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ConnectionIO[Map[StateprovinceId, 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 + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { 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 6b23eca0e0..89ee581832 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,7 +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 selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, 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 0d3c3f2c68..e08de00ef0 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,10 +99,10 @@ 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]]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, 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 + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { 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 040b1a4847..21449ad8ea 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ConnectionIO[Map[Int, 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 + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { 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 8755c0ceed..58a1d85c3d 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,7 +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 selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, 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 ab3649c7cd..7d5eeef1ee 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, 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 + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CultureFields, CultureRow] = { 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 70c405b96e..9113d2f945 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(cultureids: Array[CultureId]): ConnectionIO[Map[CultureId, 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 + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CultureFields, CultureRow] = { 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 42555cce86..463a4d0879 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,7 +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 selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, 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 b2882faf0d..65077a4f9f 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,10 +108,10 @@ 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]]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, 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 + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueRowguid(rowguid: TypoUUID): ConnectionIO[Option[DocumentRow]] = { 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 6c6368b348..53185c59e8 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ConnectionIO[Map[DocumentId, 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 + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueRowguid(rowguid: TypoUUID): ConnectionIO[Option[DocumentRow]] = { 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 27a9f808a1..7e513c17c4 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,7 +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 selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, 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 dd04cf3aa8..8fd22f8c77 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, 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 + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { 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 5e3f2af543..83f1357487 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ConnectionIO[Map[IllustrationId, 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 + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { 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 f968cf0e17..e86826bc17 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,7 +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 selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, 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 01444e2154..da50a674c7 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,10 +93,10 @@ 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]]] = { + override def selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, 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 + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[LocationFields, LocationRow] = { 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 f340b45783..1e1ffc6db0 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(locationids: Array[LocationId]): ConnectionIO[Map[LocationId, 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 + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[LocationFields, LocationRow] = { 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 a4a5420bdb..af68a87206 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,7 +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 selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, 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 006e74f9bd..ef709bd162 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,10 +122,10 @@ 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]]] = { + override def selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, 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 + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductFields, ProductRow] = { 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 febdb927e6..473adf66e9 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productids: Array[ProductId]): ConnectionIO[Map[ProductId, 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 + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductFields, ProductRow] = { 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 37b69c5535..87559d3054 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,7 +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 selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, 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 b51d81e69d..0a177b3682 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,10 +89,10 @@ 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]]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, 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 + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { 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 473d2d5830..bba06a5ad5 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ConnectionIO[Map[ProductcategoryId, 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 + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { 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 3f60c0db48..151ea57fdd 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, 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 acc24f2533..c83d184ea3 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,10 +98,10 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.query(using ProductcosthistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { 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 81d5cfffb7..aad13cab11 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ConnectionIO[Map[ProductcosthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { 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 958645479c..9447f002c1 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,7 +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 selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, 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 d021065849..ba03cc3a5a 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,10 +89,10 @@ 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]]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, 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 + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { 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 730fc5660e..289b45519e 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ConnectionIO[Map[ProductdescriptionId, 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 + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { 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 a2512d78dd..415d1b3438 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, 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 df929fa98a..08ae404a25 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,10 +99,10 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.query(using ProductdocumentRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { 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 51ad7f7bbd..6f60a38a95 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ConnectionIO[Map[ProductdocumentId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { 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 353a02c888..6500d9122b 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, 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 b85ca96618..618630b39e 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,10 +109,10 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.query(using ProductinventoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { 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 2a27fcd24c..64e8e3a3d0 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ConnectionIO[Map[ProductinventoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { 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 0b125d5980..c0ae6041ae 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, 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 b9f2210721..42c9f2e62e 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,10 +98,10 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.query(using ProductlistpricehistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { 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 4db9077a18..79211bbf7d 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ConnectionIO[Map[ProductlistpricehistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { 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 8510aef97b..5b87a5c973 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,7 +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 selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, 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 5f19910902..ecc769372b 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, 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 + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { 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 5e98c78b56..c4528e0f28 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ConnectionIO[Map[ProductmodelId, 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 + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { 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 45a7f04be7..eacb7fec25 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, 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 5f2874c714..41274aaac8 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,10 +96,10 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.query(using ProductmodelillustrationRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { 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 f0fec0d718..ea2300c1c1 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ConnectionIO[Map[ProductmodelillustrationId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { 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 22249305cc..49c91cc708 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, 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 2e4a210c10..338454579b 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,10 +100,10 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.query(using ProductmodelproductdescriptioncultureRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { 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 2d9d6489da..8afc0884a2 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ConnectionIO[Map[ProductmodelproductdescriptioncultureId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { 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 13d3641d94..eb2dd313d7 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,7 +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 selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, 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 ed9d1f9a2a..737f2a4621 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, 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 + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { 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 b01731da49..07205c78e7 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ConnectionIO[Map[ProductphotoId, 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 + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { 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 3200da0942..b57a106ec4 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, 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 0573d2ec09..f5b239a5fc 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,10 +101,10 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.query(using ProductproductphotoRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { 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 d89480a7a5..9c2a14d7f6 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ConnectionIO[Map[ProductproductphotoId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { 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 ef7168f715..2fc839da12 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,7 +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 selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, 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 7fe6a0a4b5..060361827c 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,10 +94,10 @@ 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]]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, 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 + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { 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 1bd2970d10..90d73674e9 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ConnectionIO[Map[ProductreviewId, 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 + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { 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 e01cb27da0..c5381c27ab 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,7 +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 selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, 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 39c83e7c81..8cd1934288 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,10 +91,10 @@ 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]]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, 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 + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { 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 72ce55df41..9cbde82737 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ConnectionIO[Map[ProductsubcategoryId, 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 + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { 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 0f8d8b4b7c..63e63855f0 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,7 +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 selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, 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 05aba9cb9b..b9df3985f9 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, 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 + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { 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 9144dd7fc9..b855505f8b 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ConnectionIO[Map[ScrapreasonId, 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 + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { 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 98e5545a17..1a2dd68217 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, 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 12bed8aad0..77336a89aa 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { 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 fa924f211d..22c3bdfcad 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ConnectionIO[Map[TransactionhistoryId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { 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 a3b06a7ecc..13eac4daa4 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, 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 59bce266e0..e2ccb51b5b 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,10 +93,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { 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 27e75e3b23..923455d1e8 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ConnectionIO[Map[TransactionhistoryarchiveId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { 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 c4be34881a..fc98c1f282 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,7 +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 selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, 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 a7cb8fb7a9..89a5bd2370 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, 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 + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { 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 805cf0eed3..7d9c28b6ab 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ConnectionIO[Map[UnitmeasureId, 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 + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { 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 f1802c6c4d..1a92eb4ba9 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,7 +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 selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, 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 e2faa709dd..999a7417bf 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,10 +93,10 @@ 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]]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, 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 + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { 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 b24b542cc4..909c99d4f4 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ConnectionIO[Map[WorkorderId, 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 + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { 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 3d3453facc..57e3d06fbf 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,7 +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 selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, 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 6c263f80e8..4ce864e2c1 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,10 +109,10 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.query(using WorkorderroutingRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { 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 1c60e2d181..8b93ac7040 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ConnectionIO[Map[WorkorderroutingId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { 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 5b1cd3c9a8..2f8a4a5a82 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,7 +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 selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, 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 c1c6690014..532df39e80 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,10 +69,10 @@ class FlaffRepoImpl extends FlaffRepo { """.query(using FlaffRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, Option[FlaffRow]]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { 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 3876596647..4f8c16c52c 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,10 +63,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ConnectionIO[Map[FlaffId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { 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 629008d00b..126c7aaa51 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,7 +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 selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, 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 90635da6ff..a2654e47db 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, 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 + names.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { 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 11ac4a4a60..defe3237df 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(names: Array[IdentityTestId]): ConnectionIO[Map[IdentityTestId, 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 + names.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { 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 3d99827087..d7f095e13a 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,7 +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 selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, 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 04c32460aa..7044fa173c 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,10 +86,10 @@ 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]]] = { + override def selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, 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 + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueEmail(email: TypoUnknownCitext): ConnectionIO[Option[UsersRow]] = { 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 82d1a056d9..183bdec72b 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(userIds: Array[UsersId]): ConnectionIO[Map[UsersId, 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 + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueEmail(email: TypoUnknownCitext): ConnectionIO[Option[UsersRow]] = { 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 3c7f47e5b6..9fe44954c7 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, 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 6887c0a32f..a1e44cffbe 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,10 +106,10 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.query(using ProductvendorRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, Option[ProductvendorRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { 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 3fe81caa7a..0302f81c53 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ConnectionIO[Map[ProductvendorId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { 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 8bbcefccd2..ca64eded86 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,5 +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]]] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ConnectionIO[Map[PurchaseorderdetailId, 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 6e48e024ee..42b671685f 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,10 +37,10 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.query(using PurchaseorderdetailRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ConnectionIO[Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] = { + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ConnectionIO[Map[PurchaseorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 30520375c0..9d98ca58bd 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,7 +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 selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, 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 c7e061882b..216a91145b 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,10 +114,10 @@ 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]]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, 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 + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { 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 4cf6ee2692..d6246fe003 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ConnectionIO[Map[PurchaseorderheaderId, 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 + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { 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 e89519d075..1e0e982125 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,7 +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 selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, 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 780984f065..f7e16c7689 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,10 +98,10 @@ 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]]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, 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 + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { 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 c9b87ea16f..e8200ab43d 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ConnectionIO[Map[ShipmethodId, 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 + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { 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 a73eb12a14..00bd84cf6f 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 0b319f4a9f..2091ead297 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[VendorFields, VendorRow] = { 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 b90fca3b15..6bf266885c 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[VendorFields, VendorRow] = { 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 ab2da5de8b..06424c6222 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,7 +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 selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, 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 822256dbe2..0d6db11e36 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,10 +96,10 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.query(using CountryregioncurrencyRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { 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 100191fc4e..b54dffe5ac 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ConnectionIO[Map[CountryregioncurrencyId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { 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 c0ac983365..a9f293d7af 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,7 +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 selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, 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 554919d939..6156fbe9b5 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,10 +90,10 @@ 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]]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, 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 + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { 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 ff9d928f07..db9d9843e5 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[/* user-picked */ CustomCreditcardId, 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 + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { 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 eeb4ea4488..f9c279e711 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,7 +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 selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, 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 b11b212b98..b3a256a3e9 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, 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 + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { 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 8f01f13fb2..682d078560 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ConnectionIO[Map[CurrencyId, 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 + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { 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 a08d59a5be..22153e1ecb 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,7 +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 selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, 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 6c23d0128d..9cc1605022 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,10 +89,10 @@ 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]]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, 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 + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { 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 deeb4ce2dd..f770919686 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ConnectionIO[Map[CurrencyrateId, 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 + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { 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 0c45cea0e0..dac21df469 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,7 +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 selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, 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 d6ef233656..0083482d26 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, 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 + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { 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 f8b4976201..b626355869 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(customerids: Array[CustomerId]): ConnectionIO[Map[CustomerId, 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 + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { 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 535bfc0c77..de08af799e 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,7 +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 selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, 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 76dc597e0a..bbf78849df 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { 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 66569f6afa..c6615c5897 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,10 +81,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit puts0: Put[Array[/* user-picked */ CustomCreditcardId]]): ConnectionIO[Map[PersoncreditcardId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { 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 4068d51594..6487ee6453 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, 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 d97c390bc0..8f923a269a 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,10 +116,10 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.query(using SalesorderdetailRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { 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 845e0ec67b..7d7ccc6819 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ConnectionIO[Map[SalesorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { 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 7f282f21bb..1b3c94bdca 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,7 +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 selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, 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 57308b9ac3..76a01ae97a 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,10 +142,10 @@ 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]]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, 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 + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { 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 d9f7202263..58d43b6c07 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ConnectionIO[Map[SalesorderheaderId, 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 + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { 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 ee7bf390b2..8864be3256 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, 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 6a54be5d94..51d2aae860 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,10 +96,10 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.query(using SalesorderheadersalesreasonRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { 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 1d713a8388..291adaeeb2 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ConnectionIO[Map[SalesorderheadersalesreasonId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { 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 d27953727d..341a512333 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 fc3622eb15..547966b8cc 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,10 +105,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { 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 2edfdb208e..4a73bf6972 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { 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 51a70c85c3..79628947da 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,7 +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 selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, 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 2650064594..30f6ac36cd 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,10 +102,10 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.query(using SalespersonquotahistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { 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 cf5a322649..5d700a65cd 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ConnectionIO[Map[SalespersonquotahistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { 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 5718295111..8a2230c8ac 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,7 +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 selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, 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 f9ecd41984..6cc75758bc 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,10 +85,10 @@ 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]]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, 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 + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { 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 ef6455b7bc..5e5a276271 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ConnectionIO[Map[SalesreasonId, 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 + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { 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 2af2676560..52e375556f 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,7 +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 selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, 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 8576324e39..5fee3baaef 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,10 +98,10 @@ 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]]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, 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 + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { 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 241617bb8b..2204498700 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ConnectionIO[Map[SalestaxrateId, 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 + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { 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 69aea7615e..4d6976a24d 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,7 +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 selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, 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 739076cf84..e3ef754bf3 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,10 +109,10 @@ 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]]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, 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 + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { 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 74fa47e2b3..d0e30ba85c 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ConnectionIO[Map[SalesterritoryId, 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 + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { 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 0fc3288970..5d987ea579 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, 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 f4ea261d26..22f1c93f9b 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,10 +105,10 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.query(using SalesterritoryhistoryRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { 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 8ba8523b3c..089e6b7554 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ConnectionIO[Map[SalesterritoryhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { 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 3361b1aff1..baeb0de874 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,7 +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 selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, 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 b332213505..88737a091a 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,10 +94,10 @@ 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]]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, 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 + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { 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 00685d1419..86a686a5c6 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ConnectionIO[Map[ShoppingcartitemId, 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 + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { 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 82a7ca8dde..b82db537e3 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,7 +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 selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, 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 44d3cd8669..89cfc1042a 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,10 +102,10 @@ 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]]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, 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 + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { 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 6573d52542..fbfb7c1fd4 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ConnectionIO[Map[SpecialofferId, 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 + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { 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 5bf32b9cba..ee69f3980a 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,7 +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 selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, 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 7cbd884e54..d66bfe61a8 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,10 +101,10 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.query(using SpecialofferproductRow.read).stream } - override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { 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 aa33fdee68..1ccc4be1d1 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ConnectionIO[Map[SpecialofferproductId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { 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 830017b6d7..756b16f640 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 fd4d4f7a65..5143fb1e06 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,10 +90,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StoreFields, StoreRow] = { 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 3e2d220f09..14f0a20689 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ConnectionIO[Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StoreFields, StoreRow] = { 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 dae2185595..df273e5148 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,7 +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 selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, 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 9dc1b6f720..d5926d212e 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, 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 + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { 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 46e7e74530..eb55064f6a 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(departmentids: Array[DepartmentId]): ZIO[ZConnection, Throwable, Map[DepartmentId, 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 + departmentids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[DepartmentFields, DepartmentRow] = { 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 2983ed2f96..10c985d53b 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 e4d71dab82..b983f7c3ad 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,10 +115,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { 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 5b1078ccf3..ba88d4992f 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeeFields, EmployeeRow] = { 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 7c304f296a..11c6bd2c2e 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, 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 878e168b71..75191bca14 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,10 +105,10 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { """.query(using EmployeedepartmenthistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, Option[EmployeedepartmenthistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { 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 332c0a232a..143e71303f 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeedepartmenthistoryId]): ZIO[ZConnection, Throwable, Map[EmployeedepartmenthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeedepartmenthistoryFields, EmployeedepartmenthistoryRow] = { 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 a7e1eb3912..a2ebfdd44e 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,7 +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 selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, 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 33694a7bf6..186af40e6d 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,10 +98,10 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { """.query(using EmployeepayhistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, Option[EmployeepayhistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { 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 10c0025fb2..8b516c1cd8 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmployeepayhistoryId]): ZIO[ZConnection, Throwable, Map[EmployeepayhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmployeepayhistoryFields, EmployeepayhistoryRow] = { 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 b540ba3e32..d5e2d8f49d 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,7 +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 selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, 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 18b41f1576..f11b0ea7c4 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,10 +86,10 @@ 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]]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, 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 + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { 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 e697fd90e2..520c18efe6 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(jobcandidateids: Array[JobcandidateId]): ZIO[ZConnection, Throwable, Map[JobcandidateId, 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 + jobcandidateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[JobcandidateFields, JobcandidateRow] = { 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 9689e9c56e..466ee97664 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,7 +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 selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, 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 4d2d868231..c4d68628b4 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,10 +86,10 @@ 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]]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, 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 + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { 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 690c3333d2..e024d3eb57 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(shiftids: Array[ShiftId]): ZIO[ZConnection, Throwable, Map[ShiftId, 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 + shiftids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShiftFields, ShiftRow] = { 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 8289a2f19c..21e9897060 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,7 +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 selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, 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 676f984a03..143e3495dd 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,10 +95,10 @@ 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]]] = { + override def selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, 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 + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddressFields, AddressRow] = { 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 f60075e070..9f0f25280d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(addressids: Array[AddressId]): ZIO[ZConnection, Throwable, Map[AddressId, 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 + addressids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddressFields, AddressRow] = { 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 1c1b699907..970a1ee967 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,7 +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 selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, 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 8f52a5cd4e..d3b9e285bf 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, 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 + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { 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 959e50f608..f10c1be750 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(addresstypeids: Array[AddresstypeId]): ZIO[ZConnection, Throwable, Map[AddresstypeId, 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 + addresstypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[AddresstypeFields, AddresstypeRow] = { 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 5e1410c93d..8d5723e576 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 b93ffa8d42..efb685947e 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,10 +86,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { 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 e61be5cde7..75e45d1d23 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityFields, BusinessentityRow] = { 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 d917be01cc..de1c702ff3 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, 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 c08f62780d..f06be2a898 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,10 +104,10 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { """.query(using BusinessentityaddressRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, Option[BusinessentityaddressRow]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { 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 5531fa54bb..8339ef115d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentityaddressId]): ZIO[ZConnection, Throwable, Map[BusinessentityaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentityaddressFields, BusinessentityaddressRow] = { 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 583e06c847..c4cef12533 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,7 +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 selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, 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 54155439d6..bfe1929093 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,10 +103,10 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { """.query(using BusinessentitycontactRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, Option[BusinessentitycontactRow]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { 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 9b361adc6a..6a286a6b74 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[BusinessentitycontactId]): ZIO[ZConnection, Throwable, Map[BusinessentitycontactId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BusinessentitycontactFields, BusinessentitycontactRow] = { 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 557ddfb241..6cefc84874 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,7 +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 selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, 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 5aaeee23db..3ce99aaa80 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,10 +83,10 @@ 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]]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, 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 + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { 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 6a7a6e96d1..cf9cea70b4 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(contacttypeids: Array[ContacttypeId]): ZIO[ZConnection, Throwable, Map[ContacttypeId, 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 + contacttypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ContacttypeFields, ContacttypeRow] = { 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 0de966dc3f..ba9ccc582d 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,7 +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 selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, 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 aa150e57a0..6542bc1fbe 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, 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 + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { 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 a4b18720e9..8099bbd2b4 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(countryregioncodes: Array[CountryregionId]): ZIO[ZConnection, Throwable, Map[CountryregionId, 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 + countryregioncodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregionFields, CountryregionRow] = { 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 67e99b0630..f25412f969 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,7 +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 selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, 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 aa3e81275e..bc72dd6620 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,10 +104,10 @@ class EmailaddressRepoImpl extends EmailaddressRepo { """.query(using EmailaddressRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, Option[EmailaddressRow]]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { 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 7bf0b9dc9c..95c9be97b1 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[EmailaddressId]): ZIO[ZConnection, Throwable, Map[EmailaddressId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[EmailaddressFields, EmailaddressRow] = { 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 34fb83b5da..447152fff6 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 75cc2fb185..46d8b7334c 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,10 +87,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { 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 5228ee6b6c..67f0d9a4dc 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PasswordFields, PasswordRow] = { 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 a7c9dcd92b..e431bc1f12 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 bed1715808..5762d133e5 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,10 +105,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 b0c8d9cda5..6225f12fba 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonFields, PersonRow] = { 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 79c7411563..bc04cd72a3 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,7 +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 selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, 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 250ddb0726..d1eb7c0b95 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,10 +99,10 @@ class PersonphoneRepoImpl extends PersonphoneRepo { """.query(using PersonphoneRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, Option[PersonphoneRow]]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { 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 17149651c3..0433f5645e 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersonphoneId]): ZIO[ZConnection, Throwable, Map[PersonphoneId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersonphoneFields, PersonphoneRow] = { 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 1434893957..426ed087e7 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,7 +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 selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, 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 fc8cb053b5..91a81784a1 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,10 +83,10 @@ 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]]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, 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 + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { 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 b479374825..46bc7c4fd3 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(phonenumbertypeids: Array[PhonenumbertypeId]): ZIO[ZConnection, Throwable, Map[PhonenumbertypeId, 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 + phonenumbertypeids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PhonenumbertypeFields, PhonenumbertypeRow] = { 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 ec60439bd0..5e3a26c693 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,7 +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 selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, 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 a0c45d33a0..4774e4eb0c 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,10 +99,10 @@ 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]]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, 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 + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { 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 93f1b8cb6e..8b934f95ca 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(stateprovinceids: Array[StateprovinceId]): ZIO[ZConnection, Throwable, Map[StateprovinceId, 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 + stateprovinceids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StateprovinceFields, StateprovinceRow] = { 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 25ff977962..312892a6e3 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,7 +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 selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, 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 3249a78313..825db42222 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,10 +98,10 @@ 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]]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, 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 + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { 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 984586844d..e24896a96b 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(billofmaterialsids: Array[Int]): ZIO[ZConnection, Throwable, Map[Int, 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 + billofmaterialsids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[BillofmaterialsFields, BillofmaterialsRow] = { 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 03300e6a66..03712c55c1 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,7 +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 selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, 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 199941cf38..5ce6250923 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, 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 + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CultureFields, CultureRow] = { 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 8a3591bf5f..dde24370fe 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(cultureids: Array[CultureId]): ZIO[ZConnection, Throwable, Map[CultureId, 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 + cultureids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CultureFields, CultureRow] = { 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 66a32c13b5..f99a29423a 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,7 +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 selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, 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 f137d620f9..62f30f533b 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,10 +107,10 @@ 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]]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, 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 + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueRowguid(rowguid: TypoUUID): ZIO[ZConnection, Throwable, Option[DocumentRow]] = { 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 f6ec3b22a5..0c46702792 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(documentnodes: Array[DocumentId]): ZIO[ZConnection, Throwable, Map[DocumentId, 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 + documentnodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueRowguid(rowguid: TypoUUID): ZIO[ZConnection, Throwable, Option[DocumentRow]] = { 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 66b037b672..1ff081c4c2 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,7 +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 selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, 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 662f8eda08..3ecff14877 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, 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 + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { 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 902e73f755..daa0e3487a 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(illustrationids: Array[IllustrationId]): ZIO[ZConnection, Throwable, Map[IllustrationId, 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 + illustrationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IllustrationFields, IllustrationRow] = { 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 57a7b5a712..2ba616034a 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,7 +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 selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, 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 ed6a3a2210..2d3a9b6758 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, 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 + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[LocationFields, LocationRow] = { 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 35f35f3a8c..e0680ddf7f 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(locationids: Array[LocationId]): ZIO[ZConnection, Throwable, Map[LocationId, 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 + locationids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[LocationFields, LocationRow] = { 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 ea73f9979a..0eca703668 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,7 +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 selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, 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 f6e426efc8..a445bd1cc7 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,10 +121,10 @@ 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]]] = { + override def selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, 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 + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductFields, ProductRow] = { 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 ec022e8fec..ccad20bb6f 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productids: Array[ProductId]): ZIO[ZConnection, Throwable, Map[ProductId, 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 + productids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductFields, ProductRow] = { 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 32e9b64441..0d84445fa4 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,7 +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 selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, 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 825a06b044..1b9cf3b921 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, 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 + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { 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 406a82adf9..2a1c7be6b5 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productcategoryids: Array[ProductcategoryId]): ZIO[ZConnection, Throwable, Map[ProductcategoryId, 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 + productcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcategoryFields, ProductcategoryRow] = { 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 a152529855..0bf6ecf398 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, 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 c97196d913..ff340e4e57 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,10 +97,10 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { """.query(using ProductcosthistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, Option[ProductcosthistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { 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 bb8c5cfcb3..49c74a28ee 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductcosthistoryId]): ZIO[ZConnection, Throwable, Map[ProductcosthistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductcosthistoryFields, ProductcosthistoryRow] = { 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 884e567d65..cfe85d2fe8 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,7 +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 selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, 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 1f90e33cf2..01a4b30818 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, 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 + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { 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 b28242426e..d43f602e41 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productdescriptionids: Array[ProductdescriptionId]): ZIO[ZConnection, Throwable, Map[ProductdescriptionId, 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 + productdescriptionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdescriptionFields, ProductdescriptionRow] = { 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 53564b08f5..a8d933b97f 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, 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 39d0d9f7e4..d19a1064d8 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,10 +98,10 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { """.query(using ProductdocumentRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, Option[ProductdocumentRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { 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 f2ab296f10..a13ce3343d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductdocumentId]): ZIO[ZConnection, Throwable, Map[ProductdocumentId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductdocumentFields, ProductdocumentRow] = { 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 188d9d0a48..52e9c1d122 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, 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 e809170ca4..72a5415784 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,10 +108,10 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { """.query(using ProductinventoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, Option[ProductinventoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { 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 d7a3918515..2c2f12fd9d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductinventoryId]): ZIO[ZConnection, Throwable, Map[ProductinventoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductinventoryFields, ProductinventoryRow] = { 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 245aff8eec..401a222fbc 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, 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 55f62a5b22..869ee05da5 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,10 +97,10 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { """.query(using ProductlistpricehistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, Option[ProductlistpricehistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { 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 2288aeda5c..0f8b51b692 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductlistpricehistoryId]): ZIO[ZConnection, Throwable, Map[ProductlistpricehistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductlistpricehistoryFields, ProductlistpricehistoryRow] = { 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 5d86b58c37..f83f9f199a 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,7 +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 selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, 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 f6ba97aef5..d0ed822e54 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, 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 + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { 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 e4e4f1fdce..8845de9f9d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productmodelids: Array[ProductmodelId]): ZIO[ZConnection, Throwable, Map[ProductmodelId, 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 + productmodelids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelFields, ProductmodelRow] = { 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 ea74bb6e4b..d02bfe0c07 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, 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 9c8219e51d..3ee70ce02a 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,10 +95,10 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { """.query(using ProductmodelillustrationRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, Option[ProductmodelillustrationRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { 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 2aefdb170d..e85d7aa94c 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelillustrationId]): ZIO[ZConnection, Throwable, Map[ProductmodelillustrationId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelillustrationFields, ProductmodelillustrationRow] = { 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 d3f99fe6f3..9e7af612db 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, 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 31bf0e758f..de1f9697e6 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,10 +99,10 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd """.query(using ProductmodelproductdescriptioncultureRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, Option[ProductmodelproductdescriptioncultureRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { 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 1f5d4299d8..a2559f4289 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductmodelproductdescriptioncultureId]): ZIO[ZConnection, Throwable, Map[ProductmodelproductdescriptioncultureId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductmodelproductdescriptioncultureFields, ProductmodelproductdescriptioncultureRow] = { 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 8d7325f28d..493c164ac9 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,7 +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 selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, 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 bbb9f57290..a961db8f43 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,10 +87,10 @@ 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]]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, 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 + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { 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 dc292db1a3..cc570f0611 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productphotoids: Array[ProductphotoId]): ZIO[ZConnection, Throwable, Map[ProductphotoId, 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 + productphotoids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductphotoFields, ProductphotoRow] = { 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 496eaf02d5..eb8617e15f 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, 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 a433dc855a..8228079309 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,10 +100,10 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { """.query(using ProductproductphotoRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, Option[ProductproductphotoRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { 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 e30e95234a..982b33e3dc 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductproductphotoId]): ZIO[ZConnection, Throwable, Map[ProductproductphotoId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductproductphotoFields, ProductproductphotoRow] = { 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 bfec6f5fa6..d6f45cb205 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,7 +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 selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, 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 8cd579eb5a..f024158ce5 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,10 +93,10 @@ 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]]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, 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 + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { 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 e3bcbc7bb9..ec19efa945 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productreviewids: Array[ProductreviewId]): ZIO[ZConnection, Throwable, Map[ProductreviewId, 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 + productreviewids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductreviewFields, ProductreviewRow] = { 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 b202ac6bd1..b0d3f39526 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,7 +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 selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, 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 fd5080102a..d3e3e9854a 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,10 +90,10 @@ 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]]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, 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 + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { 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 bd0a118d43..4fc87f9be9 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(productsubcategoryids: Array[ProductsubcategoryId]): ZIO[ZConnection, Throwable, Map[ProductsubcategoryId, 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 + productsubcategoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductsubcategoryFields, ProductsubcategoryRow] = { 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 61d3f4e5a5..591e1f6f01 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,7 +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 selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, 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 9a40f3f066..944be0e049 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,10 +83,10 @@ 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]]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, 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 + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { 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 bb9fe06149..e8be382a75 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(scrapreasonids: Array[ScrapreasonId]): ZIO[ZConnection, Throwable, Map[ScrapreasonId, 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 + scrapreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ScrapreasonFields, ScrapreasonRow] = { 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 3621e2379f..5fd64695fa 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, 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 d8fb284e2c..17e7809b9d 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,10 +96,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { 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 4280a68dde..e006882403 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryFields, TransactionhistoryRow] = { 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 4736610c99..f9a6d2ebce 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,7 +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 selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, 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 526c6beb26..6b7d52e7c6 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { 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 d2a756efba..dc508e07a1 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(transactionids: Array[TransactionhistoryarchiveId]): ZIO[ZConnection, Throwable, Map[TransactionhistoryarchiveId, 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 + transactionids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[TransactionhistoryarchiveFields, TransactionhistoryarchiveRow] = { 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 b7367e6fa3..7de3b87451 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,7 +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 selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, 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 8bead1a546..0fd34ced96 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, 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 + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { 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 18f2d8c6cf..fe11b4b0a1 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(unitmeasurecodes: Array[UnitmeasureId]): ZIO[ZConnection, Throwable, Map[UnitmeasureId, 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 + unitmeasurecodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[UnitmeasureFields, UnitmeasureRow] = { 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 c90f0c43e0..f58124a293 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,7 +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 selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, 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 a4ecc3348e..d3773f1758 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, 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 + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { 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 4048c77c14..e5f4dcdcf1 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(workorderids: Array[WorkorderId]): ZIO[ZConnection, Throwable, Map[WorkorderId, 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 + workorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderFields, WorkorderRow] = { 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 983e73722b..69e4845451 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,7 +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 selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, 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 9b7afc8c91..4d6b2ddba2 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,10 +108,10 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { """.query(using WorkorderroutingRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, Option[WorkorderroutingRow]]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { 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 ee103bcdb7..9597d01735 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[WorkorderroutingId]): ZIO[ZConnection, Throwable, Map[WorkorderroutingId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[WorkorderroutingFields, WorkorderroutingRow] = { 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 123033f301..f1237e8762 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,7 +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 selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, 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 ae2b1c27a7..fe446e1fb4 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,10 +70,10 @@ class FlaffRepoImpl extends FlaffRepo { """.query(using FlaffRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, Option[FlaffRow]]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { 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 3f392d7e34..977cb44e74 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,10 +64,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[FlaffId]): ZIO[ZConnection, Throwable, Map[FlaffId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[FlaffFields, FlaffRow] = { 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 98c613c449..94abafbe0e 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,7 +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 selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, 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 6a3440ed60..156f1844c3 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, 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 + names.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { 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 ea0444ff77..fbe50febd5 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(names: Array[IdentityTestId]): ZIO[ZConnection, Throwable, Map[IdentityTestId, 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 + names.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[IdentityTestFields, IdentityTestRow] = { 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 bc46df1606..ff5fc2d619 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,7 +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 selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, 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 79e5435458..0ea170135c 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,10 +85,10 @@ 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]]] = { + override def selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, 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 + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueEmail(email: TypoUnknownCitext): ZIO[ZConnection, Throwable, Option[UsersRow]] = { 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 cb7273cc6f..a19943a1b2 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(userIds: Array[UsersId]): ZIO[ZConnection, Throwable, Map[UsersId, 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 + userIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def selectByUniqueEmail(email: TypoUnknownCitext): ZIO[ZConnection, Throwable, Option[UsersRow]] = { 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 5309d336a9..4b42e7a0f3 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,7 +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 selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, 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 8bd87cad89..462cf3cdcf 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,10 +105,10 @@ class ProductvendorRepoImpl extends ProductvendorRepo { """.query(using ProductvendorRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, Option[ProductvendorRow]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { 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 649c8f9b30..30e86a624b 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[ProductvendorId]): ZIO[ZConnection, Throwable, Map[ProductvendorId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ProductvendorFields, ProductvendorRow] = { 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 00ace125f5..d9a3f7acb1 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,5 +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]]] + def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ZIO[ZConnection, Throwable, Map[PurchaseorderdetailId, 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 b7d129f14f..85c0411bd2 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,10 +37,10 @@ class PurchaseorderdetailRepoImpl extends PurchaseorderdetailRepo { """.query(using PurchaseorderdetailRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ZIO[ZConnection, Throwable, Map[PurchaseorderdetailId, Option[PurchaseorderdetailRow]]] = { + override def selectByIdsTracked(compositeIds: Array[PurchaseorderdetailId]): ZIO[ZConnection, Throwable, Map[PurchaseorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).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 7b471223f0..3e7e3ea94d 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,7 +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 selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, 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 a55e258548..8c116f78d7 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,10 +113,10 @@ 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]]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, 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 + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { 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 0cc1fea021..d3c21de117 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(purchaseorderids: Array[PurchaseorderheaderId]): ZIO[ZConnection, Throwable, Map[PurchaseorderheaderId, 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 + purchaseorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PurchaseorderheaderFields, PurchaseorderheaderRow] = { 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 9e6e1f998c..981ee3cb9f 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,7 +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 selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, 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 707f3b3967..86e81af19d 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, 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 + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { 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 3d38aea7a9..0c6d634eb6 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(shipmethodids: Array[ShipmethodId]): ZIO[ZConnection, Throwable, Map[ShipmethodId, 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 + shipmethodids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShipmethodFields, ShipmethodRow] = { 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 4b92921557..8c492a5d32 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 bfb8bde6c5..678351d3ea 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,10 +96,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[VendorFields, VendorRow] = { 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 95a67e8c9f..e2a2e5e47d 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[VendorFields, VendorRow] = { 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 88e5ecf596..1b00302e48 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,7 +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 selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, 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 a6ac4b70d2..43d05724e4 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,10 +95,10 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { """.query(using CountryregioncurrencyRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, Option[CountryregioncurrencyRow]]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { 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 21a61d17a2..5520b87a85 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[CountryregioncurrencyId]): ZIO[ZConnection, Throwable, Map[CountryregioncurrencyId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CountryregioncurrencyFields, CountryregioncurrencyRow] = { 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 31f486c3e7..c8ec9706ea 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,7 +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 selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, 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 8c2d53645c..383b3ae702 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,10 +89,10 @@ 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]]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, 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 + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { 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 04419750fb..438791b66a 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(creditcardids: Array[/* user-picked */ CustomCreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[/* user-picked */ CustomCreditcardId, 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 + creditcardids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CreditcardFields, CreditcardRow] = { 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 ffe42b30eb..debac359be 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,7 +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 selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, 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 11f00dbe08..bab0879a25 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, 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 + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { 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 791096353a..9ed4d1b576 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(currencycodes: Array[CurrencyId]): ZIO[ZConnection, Throwable, Map[CurrencyId, 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 + currencycodes.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyFields, CurrencyRow] = { 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 b5f5636c47..124c5481b6 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,7 +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 selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, 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 94dc9f46cb..8b4468675e 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,10 +88,10 @@ 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]]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, 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 + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { 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 d44606c435..e8c8b678d1 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(currencyrateids: Array[CurrencyrateId]): ZIO[ZConnection, Throwable, Map[CurrencyrateId, 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 + currencyrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CurrencyrateFields, CurrencyrateRow] = { 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 34ab0a63d4..709ff71e31 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,7 +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 selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, 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 53773bfee8..d659bbb869 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,10 +92,10 @@ 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]]] = { + override def selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, 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 + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { 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 f9a3c11a1c..94d1536f6d 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(customerids: Array[CustomerId]): ZIO[ZConnection, Throwable, Map[CustomerId, 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 + customerids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[CustomerFields, CustomerRow] = { 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 42ce01a2ad..71c56ddf07 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,7 +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 selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, 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 9e77f9f098..4bf0b8f828 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,10 +96,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { 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 cbebb3a709..3199eef810 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,10 +80,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[PersoncreditcardId])(implicit encoder0: JdbcEncoder[Array[/* user-picked */ CustomCreditcardId]]): ZIO[ZConnection, Throwable, Map[PersoncreditcardId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[PersoncreditcardFields, PersoncreditcardRow] = { 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 15ac4daa0e..fcf64e94e6 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, 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 826dc0efc2..bd71baef7d 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,10 +115,10 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { """.query(using SalesorderdetailRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, Option[SalesorderdetailRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { 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 c185203f3c..1b457ee0b3 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderdetailId]): ZIO[ZConnection, Throwable, Map[SalesorderdetailId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderdetailFields, SalesorderdetailRow] = { 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 ba7de44c38..b4a0ba40fb 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,7 +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 selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, 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 f11e8248fa..7a7662ce35 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,10 +141,10 @@ 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]]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, 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 + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { 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 182ab4347f..a95c40bc3f 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(salesorderids: Array[SalesorderheaderId]): ZIO[ZConnection, Throwable, Map[SalesorderheaderId, 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 + salesorderids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheaderFields, SalesorderheaderRow] = { 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 0687783679..0726ebe73e 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, 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 16e68c1987..70a116f57c 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,10 +95,10 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep """.query(using SalesorderheadersalesreasonRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, Option[SalesorderheadersalesreasonRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { 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 43540a2804..af18b61de6 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesorderheadersalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesorderheadersalesreasonId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesorderheadersalesreasonFields, SalesorderheadersalesreasonRow] = { 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 d0f7a81789..c4aa0d1150 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 d2e15949e2..567f7b66dc 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,10 +104,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { 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 ff2bcaadd0..697674100a 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonFields, SalespersonRow] = { 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 9b16012989..19ec5ee403 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,7 +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 selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, 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 b029936e7a..e001c120bd 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,10 +101,10 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { """.query(using SalespersonquotahistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, Option[SalespersonquotahistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { 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 45dd1a3e85..862e68b8a2 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalespersonquotahistoryId]): ZIO[ZConnection, Throwable, Map[SalespersonquotahistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalespersonquotahistoryFields, SalespersonquotahistoryRow] = { 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 41f45305e5..670156811e 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,7 +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 selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, 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 8fb016d162..bbf040c3c6 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,10 +84,10 @@ 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]]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, 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 + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { 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 d6b21fa8e9..1d4d877638 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(salesreasonids: Array[SalesreasonId]): ZIO[ZConnection, Throwable, Map[SalesreasonId, 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 + salesreasonids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesreasonFields, SalesreasonRow] = { 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 e8a7b3f567..89c8a059f1 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,7 +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 selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, 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 0a8bab5ba9..d35d6bc1be 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,10 +97,10 @@ 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]]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, 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 + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { 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 548ee61bde..3aadb7ccc6 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(salestaxrateids: Array[SalestaxrateId]): ZIO[ZConnection, Throwable, Map[SalestaxrateId, 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 + salestaxrateids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalestaxrateFields, SalestaxrateRow] = { 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 0ddb5bcf05..10c0ccfe63 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,7 +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 selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, 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 ebc9665d04..f966008bd4 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,10 +108,10 @@ 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]]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, 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 + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { 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 51ade595b9..e010f1d202 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(territoryids: Array[SalesterritoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryId, 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 + territoryids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryFields, SalesterritoryRow] = { 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 ef760a4cc9..11e7a642ec 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,7 +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 selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, 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 4b1a2d4fa0..6eba257cb9 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,10 +105,10 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { """.query(using SalesterritoryhistoryRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, Option[SalesterritoryhistoryRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { 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 f24bd056b9..76c1a53954 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SalesterritoryhistoryId]): ZIO[ZConnection, Throwable, Map[SalesterritoryhistoryId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SalesterritoryhistoryFields, SalesterritoryhistoryRow] = { 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 3209b42ee6..fa18348b75 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,7 +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 selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, 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 00127519bb..5fea187bac 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,10 +93,10 @@ 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]]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, 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 + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { 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 b3a381800c..f336f63964 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(shoppingcartitemids: Array[ShoppingcartitemId]): ZIO[ZConnection, Throwable, Map[ShoppingcartitemId, 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 + shoppingcartitemids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[ShoppingcartitemFields, ShoppingcartitemRow] = { 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 1e8ef0f715..00d3b8c63c 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,7 +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 selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, 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 044120cd0e..303fe9a6b2 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,10 +101,10 @@ 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]]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, 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 + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { 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 747d406719..0fa96e1254 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(specialofferids: Array[SpecialofferId]): ZIO[ZConnection, Throwable, Map[SpecialofferId, 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 + specialofferids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferFields, SpecialofferRow] = { 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 350365e9ff..816c9302df 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,7 +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 selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, 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 4decffb171..0ed72a951c 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,10 +100,10 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { """.query(using SpecialofferproductRow.jdbcDecoder).selectStream() } - override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, Option[SpecialofferproductRow]]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { 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 49362b0148..dfbd6d5fcf 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,10 +78,10 @@ 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]]] = { + override def selectByIdsTracked(compositeIds: Array[SpecialofferproductId]): ZIO[ZConnection, Throwable, Map[SpecialofferproductId, 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 + compositeIds.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[SpecialofferproductFields, SpecialofferproductRow] = { 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 8a839c0bd1..1585505442 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,7 +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 selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 249b09b933..b604aed4ec 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,10 +90,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StoreFields, StoreRow] = { 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 7b209686b3..ed70d03c7c 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,10 +79,10 @@ 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]]] = { + override def selectByIdsTracked(businessentityids: Array[BusinessentityId]): ZIO[ZConnection, Throwable, Map[BusinessentityId, 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 + businessentityids.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap } } override def update: UpdateBuilder[StoreFields, StoreRow] = { diff --git a/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala b/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala index 46d02d3329..9f409f4820 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibAnorm.scala @@ -174,7 +174,7 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa 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))}" + code"def $name(${x.idsParam})(implicit ${params.map(_.code).mkCode(", ")}): ${TypesScala.Map.of(x.idComputed.tpe, 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) => @@ -263,7 +263,7 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa } 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 + |${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap""".stripMargin case RepoMethod.UpdateBuilder(relName, fieldsType, rowType) => code"${sc.Type.dsl.UpdateBuilder}(${sc.StrLit(relName.value)}, $fieldsType.structure, $rowType.rowParser)" @@ -523,7 +523,7 @@ class DbLibAnorm(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDefa 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 + |${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).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 cd80b88341..b4a45344ae 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala @@ -80,7 +80,7 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef } 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))) + val returnType = ConnectionIO.of(TypesScala.Map.of(x.idComputed.tpe, x.rowType)) usedDefineds match { case Nil => code"def $name(${x.idsParam}): $returnType" @@ -179,7 +179,7 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef 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 + | ${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap |}""".stripMargin case RepoMethod.SelectByUnique(relName, keyColumns, allColumns, rowType) => @@ -404,7 +404,7 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef 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 + | ${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).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 428c5c5e26..c047f891cb 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibZioJdbc.scala @@ -199,7 +199,7 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean } 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))) + val returnType = ZIO.of(ZConnection, Throwable, TypesScala.Map.of(x.idComputed.tpe, x.rowType)) usedDefineds match { case Nil => code"def $name(${x.idsParam}): $returnType" @@ -296,7 +296,7 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean 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 + | ${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap |}""".stripMargin case RepoMethod.SelectByUnique(relName, keyColumns, allCols, rowType) => @@ -520,7 +520,7 @@ class DbLibZioJdbc(pkg: sc.QIdent, inlineImplicits: Boolean, dslEnabled: Boolean 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 + | ${x.idsParam.name}.view.flatMap(id => byId.get(id).map(x => (id, x))).toMap |}""".stripMargin case RepoMethod.SelectByUnique(_, keyColumns, _, _) => code"$ZIO.succeed(map.values.find(v => ${keyColumns.map(c => code"${c.name} == v.${c.name}").mkCode(" && ")}))"