reth icon indicating copy to clipboard operation
reth copied to clipboard

feat(db): add helper enum for table name

Open Majchrzak opened this issue 2 years ago • 4 comments

Added a helper enum for tables, this is a replacement for TABLES with some additional functionality.

Closes https://github.com/paradigmxyz/reth/issues/2835

Majchrzak avatar May 31 '23 19:05 Majchrzak

Codecov Report

Merging #2935 (e6d82e5) into main (9e72cbf) will decrease coverage by 0.01%. The diff coverage is 29.46%.

@@            Coverage Diff             @@
##             main    #2935      +/-   ##
==========================================
- Coverage   69.47%   69.46%   -0.01%     
==========================================
  Files         534      535       +1     
  Lines       71647    71650       +3     
==========================================
- Hits        49778    49774       -4     
- Misses      21869    21876       +7     
Flag Coverage Δ
integration-tests 16.35% <0.00%> (-0.01%) :arrow_down:
unit-tests 64.51% <29.46%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bin/reth/src/db/mod.rs 10.38% <0.00%> (+2.42%) :arrow_up:
bin/reth/src/prometheus_exporter.rs 0.00% <0.00%> (ø)
bin/reth/src/utils.rs 4.68% <0.00%> (ø)
crates/storage/db/src/abstraction/table.rs 18.60% <ø> (ø)
bin/reth/src/db/list.rs 2.32% <2.32%> (ø)
bin/reth/src/db/get.rs 75.64% <11.76%> (+20.28%) :arrow_up:
crates/storage/db/src/tables/mod.rs 53.65% <64.70%> (+53.65%) :arrow_up:
crates/storage/db/src/implementation/mdbx/mod.rs 99.32% <100.00%> (+<0.01%) :arrow_up:
crates/storage/db/src/implementation/mdbx/tx.rs 92.63% <100.00%> (-0.30%) :arrow_down:
crates/storage/db/src/tables/raw.rs 52.27% <100.00%> (ø)

... and 8 files with indirect coverage changes

codecov-commenter avatar May 31 '23 20:05 codecov-commenter

@onbjerg I have unified all table macros for CLI, also moved list command to separate module to make it clear.

Majchrzak avatar Jun 13 '23 20:06 Majchrzak

agree, overallg lgtm.

would appreciate some additional docs @Majchrzak

mattsse avatar Jun 20 '23 14:06 mattsse

@onbjerg, @mattsse I have added additional comments for TableViewer bd88549f1d50c469680acdcf2745c1e3899efc63

Majchrzak avatar Jun 21 '23 20:06 Majchrzak