Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace AccessMode in API with boolean flag read_only #2357

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Conversation

ray6080
Copy link
Contributor

@ray6080 ray6080 commented Nov 6, 2023

Exposing customized num in API is not user-friendly. Instead, native boolean flag is easier to use from users' perspective. Thus, this PR proposes to change AccessMode accessMode to bool readOnly in various language bindings in similar fashion.

TODO:

  • Update our API doc on access mode.

@ray6080 ray6080 requested a review from mewim November 6, 2023 19:01
@Riolku Riolku force-pushed the access-mode branch 3 times, most recently from 994b292 to cd34302 Compare November 9, 2023 20:52
Everywhere now uses a `readOnly` boolean instead of the AccessMode enum.
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc7f6ac) 90.99% compared to head (4036b64) 90.94%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2357      +/-   ##
==========================================
- Coverage   90.99%   90.94%   -0.05%     
==========================================
  Files        1012     1012              
  Lines       35895    35897       +2     
==========================================
- Hits        32661    32647      -14     
- Misses       3234     3250      +16     
Files Coverage Δ
src/c_api/database.cpp 85.00% <100.00%> (ø)
src/include/storage/index/hash_index.h 95.55% <100.00%> (ø)
src/include/storage/storage_manager.h 100.00% <ø> (ø)
...ude/storage/storage_structure/disk_overflow_file.h 87.50% <ø> (ø)
src/include/storage/store/column.h 84.21% <ø> (ø)
src/include/storage/store/node_table.h 100.00% <ø> (ø)
src/include/storage/wal/wal.h 100.00% <ø> (ø)
src/main/connection.cpp 90.44% <100.00%> (-0.13%) ⬇️
src/main/database.cpp 100.00% <100.00%> (ø)
src/storage/index/hash_index.cpp 96.89% <100.00%> (-0.03%) ⬇️
... and 11 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Riolku Riolku marked this pull request as ready for review November 9, 2023 21:32
@Riolku Riolku changed the title Draft: replace AccessMode in API with boolean flag read_only Replace AccessMode in API with boolean flag read_only Nov 9, 2023
@mewim
Copy link
Member

mewim commented Nov 10, 2023

API changes LGTM

@Riolku Riolku merged commit 5408d83 into master Nov 13, 2023
12 checks passed
@Riolku Riolku deleted the access-mode branch November 13, 2023 15:16
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.

None yet

3 participants