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

Convert all instances of ds.Key to core.Key in both internal and external APIs #17

Closed
1 task
jsimnz opened this issue Oct 25, 2021 · 1 comment · Fixed by #84
Closed
1 task

Convert all instances of ds.Key to core.Key in both internal and external APIs #17

jsimnz opened this issue Oct 25, 2021 · 1 comment · Fixed by #84
Assignees
Labels
area/db-system Related to the core system related components of the DB refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Milestone

Comments

@jsimnz
Copy link
Member

jsimnz commented Oct 25, 2021

The ds.Datastore interface, along with the core.DSReaderWriter require the use of ds.Key, however all the interfaces and APIs of Defra should operate soley on our core.Key implementation.

The final serialization/conversion to ds.Key should happen right before the Key/Value operations related to ds.Datastore, and should happen in the function code itself.

@jsimnz jsimnz added this to the DefraDB v0.2 milestone Nov 11, 2021
@jsimnz jsimnz added the refactor This issue specific to or requires *notable* refactoring of existing codebases and components label Nov 13, 2021
@jsimnz
Copy link
Member Author

jsimnz commented Nov 17, 2021

Blocked by #30

@jsimnz jsimnz linked a pull request Nov 17, 2021 that will close this issue
@jsimnz jsimnz added the area/db-system Related to the core system related components of the DB label Nov 17, 2021
@AndrewSisley AndrewSisley linked a pull request Dec 8, 2021 that will close this issue
@jsimnz jsimnz modified the milestones: DefraDB v0.2, DefraDB v0.3 Feb 4, 2022
AndrewSisley added a commit that referenced this issue Mar 4, 2022
* Reference correct Key type in documentation

* Remove commented out import

* Remove commented out import

* Remove commented out code

* Remove commented out import

* Replace references to ds.Key with core.Key

* Replace ds.Key with structured data type

* Remove duplicate call

WithPriorityFlag is called within reg.getPriority and should not be the responsibility of the caller

* Remove DataStoreKey from Collection struct

Is not needed and complicates the code

* Remove duplicate call

WithValueFlag is called in writeObjectMarker

* Take docKey string as param instead of DataStoreKey

Is wasteful taking the whole struct (and initing one in most cases)

* Documet commit key changes
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
* Reference correct Key type in documentation

* Remove commented out import

* Remove commented out import

* Remove commented out code

* Remove commented out import

* Replace references to ds.Key with core.Key

* Replace ds.Key with structured data type

* Remove duplicate call

WithPriorityFlag is called within reg.getPriority and should not be the responsibility of the caller

* Remove DataStoreKey from Collection struct

Is not needed and complicates the code

* Remove duplicate call

WithValueFlag is called in writeObjectMarker

* Take docKey string as param instead of DataStoreKey

Is wasteful taking the whole struct (and initing one in most cases)

* Documet commit key changes
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 refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
2 participants