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

refactor: Extract definition stuff from collection.go #2706

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

AndrewSisley
Copy link
Contributor

@AndrewSisley AndrewSisley commented Jun 10, 2024

Relevant issue(s)

Resolves #2407

Description

Extracts collection create and patch, schema patch, and validation from collection.go.

It was getting really messy in collection.go and this should hopefully be a little better. No code has changed, only moved.

Cut-paste, no code has changed
Cut-paste, no code has changed
Cut-paste, no code has changed
Cut-paste, no code has changed
@AndrewSisley AndrewSisley added area/schema Related to the schema system area/collections Related to the collections system refactor This issue specific to or requires *notable* refactoring of existing codebases and components code quality Related to improving code quality labels Jun 10, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.12 milestone Jun 10, 2024
@AndrewSisley AndrewSisley requested a review from a team June 10, 2024 19:53
@AndrewSisley AndrewSisley self-assigned this Jun 10, 2024
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 82.99817% with 93 lines in your changes missing coverage. Please review.

Project coverage is 77.85%. Comparing base (8d0c756) to head (55de3b5).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2706      +/-   ##
===========================================
- Coverage    77.95%   77.85%   -0.10%     
===========================================
  Files          308      310       +2     
  Lines        23125    23125              
===========================================
- Hits         18025    18002      -23     
- Misses        3715     3731      +16     
- Partials      1385     1392       +7     
Flag Coverage Δ
all-tests 77.85% <83.00%> (-0.10%) ⬇️

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

Files Coverage Δ
internal/db/collection.go 71.84% <ø> (-5.89%) ⬇️
internal/db/definition_validation.go 93.60% <93.60%> (ø)
internal/db/schema.go 80.75% <73.87%> (-4.96%) ⬇️
internal/db/collection_define.go 74.19% <74.19%> (ø)

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

Cheers thanks for the re-org! LGTM

@AndrewSisley AndrewSisley merged commit 05a0932 into sourcenetwork:develop Jun 10, 2024
40 of 41 checks passed
@AndrewSisley AndrewSisley deleted the 2407-re-org-col-go branch June 10, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system area/schema Related to the schema system code quality Related to improving code quality refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganize db/collection.go
2 participants