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: add DataStore.writeRaw method #334

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Conversation

tomasciccola
Copy link
Contributor

closes #332

@tomasciccola tomasciccola self-assigned this Oct 9, 2023
This was referenced Oct 9, 2023
Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

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

Looks good to me!

async readRaw(versionId) {
const { coreDiscoveryKey, index } = parseVersionId(versionId)
const core = this.#coreManager.getCoreByDiscoveryKey(coreDiscoveryKey)
if (!core) throw new Error('Invalid versionId')
Copy link
Member

Choose a reason for hiding this comment

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

This is actually a not found error, because the versionId parsed ok so it is valid.

Copy link
Member

Choose a reason for hiding this comment

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

This would happen when a peer has not synced the core that has the data.

@tomasciccola tomasciccola merged commit c9b135d into main Oct 9, 2023
7 checks passed
@tomasciccola tomasciccola deleted the feat/dataStore.writeRaw branch October 9, 2023 18:15
gmaclennan added a commit that referenced this pull request Oct 20, 2023
* main:
  feat: NamespaceSyncState improvements (#339)
  chore: update better-sqlite3 to 8.7.0 (#337)
  chore: update @mapeo/crypto to latest (#336)
  fix: write own device info when creating and adding projects (#297)
  Feat: add DataStore.writeRaw method (#334)
  feat: Add NamespaceSyncState (#313)
  chore: run CI on PRs against any branch (#330)
  feat: add capabilities.getAll() (#326)
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.

add DataStore .writeRaw and readRaw methods
2 participants