Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Feb 4, 2025

TL;DR

Updated the GetTraces function to return a QueryResult type instead of a raw array of traces.

What changed?

  • Modified the GetTraces function signature to return QueryResult[common.Trace] instead of []common.Trace
  • Extracted trace scanning logic into a separate scanTrace function
  • Updated the GetTraces implementation to use the generic executeQuery function
  • Updated the mock storage interface to reflect the new return type

How to test?

  1. Verify that existing trace queries continue to work as expected
  2. Ensure that pagination and filtering functionality works correctly with traces
  3. Confirm that the mock storage interface is properly implemented in test cases

Why make this change?

This change brings consistency to the codebase by making the GetTraces function return the same QueryResult type as other query functions. This enables better pagination support and maintains a uniform interface across all data retrieval methods.

Copy link
Contributor Author

iuwqyir commented Feb 4, 2025

@iuwqyir iuwqyir changed the title conform getTraces to api standard Conform getTraces to api standard Feb 4, 2025
@iuwqyir iuwqyir requested a review from a team February 4, 2025 16:56
@iuwqyir iuwqyir marked this pull request as ready for review February 4, 2025 16:56
@iuwqyir iuwqyir merged commit 34e38e0 into main Feb 4, 2025
5 checks passed
@iuwqyir iuwqyir deleted the 02-04-conform_gettraces_to_api_standard branch February 4, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants