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

feat: ✨ convert availability string to binary rep #104

Merged
merged 1 commit into from
May 20, 2024

Conversation

KevinWu098
Copy link
Member

@KevinWu098 KevinWu098 commented May 20, 2024

Summary

  1. Converts "[true, false, true...]" representation to "101..."
  2. We convert availability strings in two places in the codebase: decoding from the DB and encoding (then inserting) into the DB, so this PR refactors the encoding/decoding
  • When reading, convert "101..." to an array of bools
  • When inserting, convert an array of bools to a string of 1s and 0s

Closes #100

@KevinWu098 KevinWu098 temporarily deployed to staging-104 May 20, 2024 19:46 — with GitHub Actions Inactive
Copy link
Member

@MinhxNguyen7 MinhxNguyen7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@MinhxNguyen7 MinhxNguyen7 merged commit 98e939f into main May 20, 2024
1 check passed
@KevinWu098 KevinWu098 deleted the kw/availability-binary-string branch October 17, 2024 17:57
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.

Availability binary string representation
2 participants