Skip to content

Conversation

@andrewosh
Copy link
Contributor

Updates the signature of HyperDB.from(schemaDir, dbDir) to HyperDB.from(dbDir) and adds a registerSchema method for registering a hyperschema instance after from.

This makes composition easier (hyperdb isn't responsible for persisting the schema anymore), and also lets us deduplicate messages.js files on disk.

@andrewosh
Copy link
Contributor Author

This doesn't work when reloading a spec from a JSON file, as that will immediately generate the collections/indexes in the constructor. We would need to either defer the creation of these, or pass the schema to from.

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