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: SuperCamo static class #22

Closed
10 tasks done
AlexStormwood opened this issue Sep 2, 2024 · 1 comment · Fixed by #18
Closed
10 tasks done

feat: SuperCamo static class #22

AlexStormwood opened this issue Sep 2, 2024 · 1 comment · Fixed by #18
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@AlexStormwood
Copy link
Contributor

AlexStormwood commented Sep 2, 2024

This feature mostly already exists in v0.4.4. This issue is for tracking progress for this feature in the TypeScript rewrite of this package.

Tests to confirm this feature should be:

Golden Path Tests

  • A SuperCamo static method should be able to create and connect to a new database, returning a NedbClient instance.
  • A SuperCamo static method should be able to connect to a previously-created database, returning a NedbClient instance.
  • A SuperCamo static method should be able to retrieve a list of names of all databases currently connected.
  • A SuperCamo static method should be able to retrieve a singular NedbClient instance representing a connected database, just from a provided database name.
  • A SuperCamo static property should exist as an object representing connected databases, with the name of each of the databases as the key for each connected database's NedbClient instance.
  • A SuperCamo static method should be able to disconnect from a connected database.
  • A SuperCamo static method should be able to disconnect from and delete a connected database.

Error-Handling Tests

  • A SuperCamo static method won't connect to a database (and thus create a database client instance) if that database is already connected (is already an instance in the SuperCamo connected client list). This should throw an error.
  • A SuperCamo static "clientDelete" method won't delete any databases or database data if no database matches a given name. This should NOT throw an error, but just return 0 (for "0 databases deleted").
  • A SuperCamo static "clientDisconnect" method won't disconnect from any databases if no database matches a given name. This should NOT throw an error, but just return 0 (for "0 databases disconnected").
@AlexStormwood AlexStormwood added this to the v1.0.0 milestone Sep 2, 2024
@AlexStormwood AlexStormwood self-assigned this Sep 2, 2024
@AlexStormwood AlexStormwood linked a pull request Sep 2, 2024 that will close this issue
@AlexStormwood AlexStormwood added the enhancement New feature or request label Sep 2, 2024
@AlexStormwood
Copy link
Contributor Author

Closing as I can't think of anything else to add into this class right now, treating it as done & ready in the TypeScript rewrite branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant