Skip to content

rz table view refactoring#6456

Open
ashishk15678 wants to merge 5 commits into
rizinorg:devfrom
ashishk15678:table_refactoring
Open

rz table view refactoring#6456
ashishk15678 wants to merge 5 commits into
rizinorg:devfrom
ashishk15678:table_refactoring

Conversation

@ashishk15678
Copy link
Copy Markdown
Contributor

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description
After querying any table the output now goes to RzTableView and associated functions , so that the querying can be better and more optimized and the results that were not part of the query donot automatically get dropped after querying.

Test plan
Existing tests and new unit test test_table_view

Closing issues
Linked #1961

...

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 53.14685% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.23%. Comparing base (d723950) to head (9be2067).

Files with missing lines Patch % Lines
librz/util/table.c 52.75% 23 Missing and 37 partials ⚠️
librz/core/cmd/cmd_print.c 0.00% 4 Missing ⚠️
librz/core/cmd/cmd_api.c 71.42% 0 Missing and 2 partials ⚠️
librz/core/cbin.c 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
librz/include/rz_cmd.h 71.42% <ø> (ø)
librz/core/cbin.c 65.89% <80.00%> (+0.01%) ⬆️
librz/core/cmd/cmd_api.c 68.05% <71.42%> (+0.01%) ⬆️
librz/core/cmd/cmd_print.c 45.09% <0.00%> (-0.04%) ⬇️
librz/util/table.c 62.61% <52.75%> (-1.10%) ⬇️

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d723950...9be2067. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread librz/util/table.c Outdated

RZ_API bool rz_table_view_query(RZ_NONNULL RzTableView *view, RZ_NULLABLE const char *q) {
rz_return_val_if_fail(view && view->table, false);
return rz_table_query(view->table, q);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to "run" the query here. The whole point is not to modify the original table.

Comment thread librz/util/table.c
return transpose;
}

RZ_API RZ_OWN RzTableView *rz_table_view_new(RZ_NONNULL const RzTable *t) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to handle multiple queries you need to have a function of creating rztableview out of the rztableview

@ashishk15678 ashishk15678 requested a review from notxvilka June 7, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants