8000 Find the columns of the system tables by one function, and read their rows in functions of their own by dominion525 · Pull Request #131 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content

Find the columns of the system tables by one function, and read their rows in functions of their own - #131

Merged
dominion525 merged 6 commits into
mainfrom
refactor/column-lookup
Oct 25, 2026
Merged

dominion525 merged 6 commits into
mainfrom
refactor/column-lookup

Conversation

@dominion525
@dominion525 dominion525 commented Oct 25, 2026 •
Copy link
Copy Markdown
Owner

Summary

  • MSysRelationships, MSysObjects (twice), MSysAccessStorage, MSysAccessObjects and MSysQueries each found their columns with the same match over the columns and the same "missing … column" errors, and read each value of a row with the same match. These are now table::column_index, table::required_column and Value::as_text, as_long and as_binary, and each reader turns a row into its value in a function of its own. The errors, their messages, and which rows are passed over are unchanged.
  • read_storage_entries read the catalog, and then MSysAccessObjects read it again for the Access 2000 format. It now passes the catalog it has read. The rows of MSysAccessObjects are joined without copying each of them first.
  • The joining of the parts of the compound file, the parent and name of each of its entries, and the end and contents of a DirData entry are functions of their own. The first commit adds tests of the paths of parse_dir_data that no test took: an entry whose declared length is too short, an empty name, another marker, a name not in UTF-16LE, and a declared length that reaches the end of the data without a null. They pass before and after.
  • A finding not fixed here: when the declared length of a DirData entry reaches the end of the data and its last two bytes are not a null, the end is taken to be one past the data, and the name is read one byte off. parse_dir_data_with_a_length_to_the_end_without_a_null keeps that behavior.
  • Functions above the thresholds: 107 → 100. Tests: 1108 → 1114. prop::read_properties is still above them, for the parsing of the properties.
Function Before (CC / Cog / SLOC) After, the function of the largest CC
relationship read_relationships_in 42 / 30 / 150 9 / 0 / 18
catalog read_catalog 33 / 19 / 83 9 / 1 / 38
storage read_storage_entries 32 / 17 / 84 9 / 2 / 23
storage read_access_objects_cfb 23 / 14 / 59 9 / 1 / 31
storage parse_dir_data 16 / 22 / 68 8 / 9 / 28
storage entries_from_cfb 14 / 8 / 43 9 / 7 / 29
query resolve_query_columns 13 / 3 / 42 4 / 0 / 21
prop read_properties 19 / 7 / 55 14 / 4 / 42

🤖 Generated with Claude Code

dominion525 and others added 6 commits October 25, 2026 12:22
- Test a plain DirData, an entry whose declared length is too short, an empty name, another marker, a name not in UTF-16LE, and a declared length that reaches the end of the data without a null

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… row

- Add table::column_index, and table::required_column, which gives the error it is passed when the column is absent
- Add Value::as_text, as_long and as_binary

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Find the columns with required_column, read a row into a pair of columns, group the rows and make each relationship in functions of their own
- Drop the check of an empty group, which a group, made of at least one row, never is

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tion of its own

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Find the columns with required_column and read a row of MSysAccessStorage by a function of its own
- Pass the catalog that read_storage_entries has read to the reading of MSysAccessObjects, rather than read it again, and join its rows without copying them first
- Make the joining of the parts of the compound file, the parent and name of an entry, the reading of a stream, and the end and contents of a DirData entry functions

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ions

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Coverage

For 14f5af9.

Filename                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
jetdb-cli/src/export.rs            108                11    89.81%           5                 0   100.00%          66                 6    90.91%           0                 0         -
jetdb-cli/src/form.rs              254                24    90.55%          19                 5    73.68%         152                 9    94.08%           0                 0         -
jetdb-cli/src/macro_cmd.rs         151                11    92.72%          11                 2    81.82%          81                 5    93.83%           0                 0         -
jetdb-cli/src/main.rs              864                38    95.60%          70                 2    97.14%         549                25    95.45%           0                 0         -
jetdb-cli/src/prop.rs              308                15    95.13%          33                 2    93.94%         186                10    94.62%           0                 0         -
jetdb-cli/src/query.rs              80                 4    95.00%           5                 0   100.00%          51                 1    98.04%           0                 0         -
jetdb-cli/src/vba.rs                74                 4    94.59%           5                 0   100.00%          47                 1    97.87%           0                 0         -
jetdb-wasm/src/lib.rs             3871                95    97.55%         252                 4    98.41%        2031                22    98.92%           0                 0         -
jetdb/src/catalog.rs               509                14    97.25%          46                 0   100.00%         299                 3    99.00%           0                 0         -
jetdb/src/complex.rs               917                32    96.51%          73                 0   100.00%         607                15    97.53%           0                 0         -
jetdb/src/crypto.rs               2300               112    95.13%         127                10    92.13%        1315                60    95.44%           0                 0         -
jetdb/src/csv.rs                   810                23    97.16%          65                 0   100.00%         453                 6    98.68%           0                 0         -
jetdb/src/data.rs                 4560               179    96.07%         257                 3    98.83%        2564               110    95.71%           0                 0         -
jetdb/src/ddl/access.rs             70                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/mod.rs              2777                 8    99.71%         199                 2    98.99%        1503                 6    99.60%           0                 0         -
jetdb/src/ddl/mysql.rs              70                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/postgres.rs           71                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/sqlite.rs             69                 0   100.00%           7                 0   100.00%          48                 0   100.00%           0                 0         -
jetdb/src/encoding.rs              284                 0   100.00%          30                 0   100.00%         153                 0   100.00%           0                 0         -
jetdb/src/file.rs                 1914                67    96.50%         110                 0   100.00%        1042                26    97.50%           0                 0         -
jetdb/src/form.rs                 3273               150    95.42%         233                10    95.71%        1773                69    96.11%           0                 0         -
jetdb/src/form2000.rs              762                21    97.24%          56                 1    98.21%         402                 4    99.00%           0                 0         -
jetdb/src/format.rs                620                 2    99.68%          41                 0   100.00%         408                 2    99.51%           0                 0         -
jetdb/src/lib.rs                     3                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
jetdb/src/macro_action.rs          299                19    93.65%          27                 3    88.89%         165                24    85.45%           0                 0         -
jetdb/src/macro_def.rs            2350                98    95.83%         179                 9    94.97%        1522                46    96.98%           0                 0         -
jetdb/src/macro_text.rs            783                24    96.93%          49                 2    95.92%         437                20    95.42%           0                 0         -
jetdb/src/map.rs                   416                13    96.88%          27                 0   100.00%         221                 5    97.74%           0                 0         -
jetdb/src/money.rs                 286                 0   100.00%          26                 0   100.00%         189                 0   100.00%           0                 0         -
jetdb/src/prop.rs                 1398                56    95.99%          88                 8    90.91%         735                63    91.43%           0                 0         -
jetdb/src/query.rs                2587                71    97.26%         188                 1    99.47%        1625                35    97.85%           0                 0         -
jetdb/src/relationship.rs          249                26    89.56%          22                 0   100.00%         177                10    94.35%           0                 0         -
jetdb/src/save_as_text.rs          574                27    95.30%          52                 3    94.23%         341                27    92.08%           0                 0         -
jetdb/src/storage.rs               683                31    95.46%          46                 0   100.00%         376                 6    98.40%           0                 0         -
jetdb/src/table.rs                1632                61    96.26%         100                 2    98.00%         965                18    98.13%           0                 0         -
jetdb/src/timestamp.rs             413                 0   100.00%          43                 0   100.00%         232                 0   100.00%           0                 0         -
jetdb/src/vba.rs                   634                65    89.75%          54                16    70.37%         361                60    83.38%           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                            37023              1301    96.49%        2567                85    96.69%       21217               694    96.73%           0                 0         -

@dominion525
dominion525 merged commit 7ab0453 into main Oct 25, 2026
11 checks passed
@dominion525
dominion525 deleted the refactor/column-lookup branch October 25, 2026 03:37
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.

1 participant

0