Repository navigation
Add FetchRegistrationEntries API - #5910
Conversation
f23f128 to
27c7f6f
Compare
|
@sorindumitru This is now ready for review |
| CreateOrReturnRegistrationEntry(context.Context, *common.RegistrationEntry) (*common.RegistrationEntry, bool, error) | ||
| DeleteRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error) | ||
| FetchRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error) | ||
| FetchRegistrationEntries(ctx context.Context, entryIDs []string) ([]*common.RegistrationEntry, error) |
There was a problem hiding this comment.
I wonder if returning a map wouldn't be a better interface. I think you're likely to be interested in both the found entries and the entries that were not found (no longer in the database).
There was a problem hiding this comment.
Yea i think so.
There was a problem hiding this comment.
This change is in
| { | ||
| name: "Entries 1, 2, and 3", | ||
| entryIDs: []string{createdEntry1.EntryId, createdEntry2.EntryId, createdEntry3.EntryId}, | ||
| }, |
There was a problem hiding this comment.
Could we also add test for non-existing entries? Looking them up just by themselves and looking them up together with other existing entries.
There was a problem hiding this comment.
I think this one is still not addressed
|
There's one test failure which looks like it's related to the changes here: |
|
@sorindumitru All comments addressed and unit tests fixed. |
| @@ -2662,12 +2666,12 @@ FROM | |||
| WHERE registered_entry_id IN (SELECT id FROM listing) | |||
|
|
|||
| ORDER BY selector_id, dns_name_id | |||
There was a problem hiding this comment.
We should also sort bu entry id here and for the MySQL variants.
There was a problem hiding this comment.
Good catch, done.
sorindumitru
left a comment
There was a problem hiding this comment.
LGTM, thanks for the contribution @faisal-memon !
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Co-authored-by: Sorin Dumitru <[email protected]> Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
e710fe4 to
17eda58
Compare
Use the new FetchRegistrationEntries API from #5910 to get the full list of updated entries rather than fetching them individually. Signed-off-by: Faisal Memon <[email protected]>
Pull Request check list
Affected functionality
sql store
Description of change
Adds a FetchRegistrationEntries API to fetch multiple select entry IDs. Will be used in a separate PR to batch fetch updated entries with the events based cache.
Which issue this PR fixes
partially addresses #5624