(VDB-1279) LogSortedOffer + LogUnsortedOffer transformers#169
(VDB-1279) LogSortedOffer + LogUnsortedOffer transformers#169
Conversation
573ca59 to
bac6af6
Compare
|
|
||
| Expect(len(dbResult)).To(Equal(1)) | ||
| Expect(dbResult[0].OfferID).To(Equal("717050")) | ||
| }) |
There was a problem hiding this comment.
Assuming we haven't seen any of these on the second contract?
| type logUnsortedOfferModel struct { | ||
| OfferID string `db:"offer_id"` | ||
| HeaderID int64 | ||
| LogID int64 `db:"log_id"` |
There was a problem hiding this comment.
nbd but I think we can remove the HeaderID and LogID from this model if we're only querying for the OfferID. For that matter, we may not even need a model if we can just scan that value directly into a string or int64
| ) | ||
|
|
||
| var ( | ||
| logSortedOfferOfferID, _ = new(big.Int).SetString("811648", 10) |
There was a problem hiding this comment.
what's the motivation for putting this string into a big int? Seems like the only usage is calling String() on it?
| ColumnValues: event.ColumnValues{ | ||
| event.HeaderFK: LogSortedOfferEventLog.HeaderID, | ||
| event.LogFK: LogSortedOfferEventLog.ID, | ||
| constants.OfferId: logSortedOfferOfferID.String(), |
There was a problem hiding this comment.
this won't work 99% of the time but in this case we might be able to do new(big.Int).SetBytes(logSortedOfferRawLog.Data).String()
|
Paranoid me checking in to request a migration timestamp bump if #170 is merged first 😅 |
bac6af6 to
72e5542
Compare
2 nearly-identical transformers in 2 separate commits