Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@afterdusk
Copy link
Member

@afterdusk afterdusk commented Jan 25, 2022

This PR makes two main changes:

  • Move the struct builders (e.g. build_azks) from the Storage trait to DbRecord. This is so that DbRecord can build structs without knowledge of the specific Storage implementor.
  • Move the MySqlStorable trait and impl into its own module. The idea is to separate the logic for the storage API and database handling (e.g. connection setup) from the struct handling logic (e.g. row deserialization). The separation is still not fully complete in this PR and some struct-specific logic is still left in the implementor of Storage, but this is a start.

Note: Since this PR changes logic and moves code across files, it'll be easier to review commit-by-commit rather than as a combined hunk.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 25, 2022
@slawlor
Copy link
Contributor

slawlor commented Jan 25, 2022

Hey @afterdusk this looks great! Thanks :)

One thing, can you bump the version numbers of the akd and akd_mysql crates? I'll trigger a publish after this merges in. (Just saves a separate PR)

Thanks!

@slawlor slawlor merged commit 98c92a5 into facebook:main Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants