nidus-sync/platform/publicreport/address.go
Eli Ribble fcd95f1a25
Get back to compiling, but using new jet for publicreport
This was an epically long change, and a terrible idea, but it compiles.
This was essentially a cascade that came about because I can't blend jet
and bob in the same transaction. In for a penny, I guess...
2026-05-07 10:39:17 +00:00

22 lines
661 B
Go

package publicreport
import (
"context"
"fmt"
"github.com/Gleipnir-Technology/nidus-sync/db"
querypublic "github.com/Gleipnir-Technology/nidus-sync/db/query/public"
"github.com/Gleipnir-Technology/nidus-sync/platform/types"
)
func loadAddresses(ctx context.Context, txn db.Tx, address_ids []int64) (results map[int32]types.Address, err error) {
addresses, err := querypublic.AddressesFromIDs(ctx, txn, address_ids)
if err != nil {
return nil, fmt.Errorf("query addresses: %w", err)
}
results = make(map[int32]types.Address, len(addresses))
for _, row := range addresses {
results[row.ID] = types.AddressFromModel(row)
}
return results, nil
}