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

Document serialization needs strong typing #935

Closed
jsimnz opened this issue Nov 12, 2022 · 3 comments · Fixed by #2161
Closed

Document serialization needs strong typing #935

jsimnz opened this issue Nov 12, 2022 · 3 comments · Fixed by #2161
Assignees
Labels
area/db-system Related to the core system related components of the DB bug Something isn't working refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Milestone

Comments

@jsimnz
Copy link
Member

jsimnz commented Nov 12, 2022

Broken out from https://github.com/sourcenetwork/defradb/pull/931/files#r1017152428

At the moment, there isn't enforced type validation/safety when creating documents, only on updating docs.

This causes various issues, but it came to light while working on #931 because DateTime fields are getting serialized as strings, and there's no entry point to conviently handle this atm.

@jsimnz jsimnz added the area/db-system Related to the core system related components of the DB label Nov 12, 2022
@jsimnz jsimnz added the refactor This issue specific to or requires *notable* refactoring of existing codebases and components label Nov 15, 2022
@AndrewSisley AndrewSisley self-assigned this Aug 30, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.7 milestone Aug 30, 2023
@AndrewSisley AndrewSisley added the bug Something isn't working label Aug 30, 2023
@AndrewSisley AndrewSisley removed their assignment Aug 30, 2023
@AndrewSisley
Copy link
Contributor

AndrewSisley commented Aug 30, 2023

Suggest doing this after #1830 and #1832

@AndrewSisley
Copy link
Contributor

Also blocked by #1847

@AndrewSisley AndrewSisley removed their assignment Sep 7, 2023
@AndrewSisley AndrewSisley removed this from the DefraDB v0.7 milestone Sep 18, 2023
@AndrewSisley AndrewSisley self-assigned this Sep 18, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.8 milestone Sep 18, 2023
@AndrewSisley
Copy link
Contributor

I have started this, branch name: 935-mutation-type-enforcement

@AndrewSisley AndrewSisley removed their assignment Nov 6, 2023
@AndrewSisley AndrewSisley removed this from the DefraDB v0.8 milestone Nov 6, 2023
@fredcarle fredcarle self-assigned this Jan 2, 2024
@fredcarle fredcarle added this to the DefraDB v0.9 milestone Jan 2, 2024
fredcarle added a commit that referenced this issue Jan 5, 2024
## Relevant issue(s)

Resolves #935 
Resolves #1703 

## Description

This PR adds strong document typing to document creation by using the
field descriptions to determine Go types. Datetime is now properly
supported and formatting is enforced.

Note that a lot of docIDs have changed as a result of this refactor.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Jan 22, 2024
## Relevant issue(s)

Resolves sourcenetwork#935 
Resolves sourcenetwork#1703 

## Description

This PR adds strong document typing to document creation by using the
field descriptions to determine Go types. Datetime is now properly
supported and formatting is enforced.

Note that a lot of docIDs have changed as a result of this refactor.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#935 
Resolves sourcenetwork#1703 

## Description

This PR adds strong document typing to document creation by using the
field descriptions to determine Go types. Datetime is now properly
supported and formatting is enforced.

Note that a lot of docIDs have changed as a result of this refactor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-system Related to the core system related components of the DB bug Something isn't working refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants