Skip to content

Conversation

KingSora
Copy link
Contributor

This PR contains:

  • A NEW FEATURE

Describe the problem you have without this PR

The problem is described and discussed here: #6988

This PR makes the DB8 error handling easier by introducing the closeDuplicates flag which will close all duplicate instances before initializing a new instance:

const db1 = await createRxDatabase({ name, storage });
const db2 = await createRxDatabase({ name, storage, closeDuplicates: true }); // would throw DB8 error without `closeDuplicates: true`

console.log(db1.closed); // true
console.log(db2.closed); // false

Todos

  • Tests
  • Documentation
  • Typings
  • Changelog

@KingSora KingSora changed the title fleat: closeDuplicates flag feat: closeDuplicates flag Mar 26, 2025
@pubkey pubkey merged commit 4c19b6b into pubkey:master Mar 31, 2025
21 of 22 checks passed
pubkey added a commit that referenced this pull request Mar 31, 2025
pubkey added a commit that referenced this pull request Mar 31, 2025
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.

2 participants