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

Consider track/crate "id" struct suitable for high-level API #93

Open
mr-smidge opened this issue Jun 6, 2023 · 1 comment
Open

Consider track/crate "id" struct suitable for high-level API #93

mr-smidge opened this issue Jun 6, 2023 · 1 comment

Comments

@mr-smidge
Copy link
Contributor

Tracks and crates need a means of identification in the high-level API, but the actual nature of a unique identifier may vary between database formats (integer id, UUID, so on). As such, a combination of database type and vendor-specific identifier may be needed.

One approach could be to have a std::variant of all types of identifier, and an enum of all supported database types. Other implementations may also be suitable.

This will the current assumption that all unique track/crate identifiers will fit into a int64_t.

@mr-smidge
Copy link
Contributor Author

An alternative way of thinking of this could be that the track, crate, etc. objects in the high-level API actually are the aforementioned 'id' structs. They should follow rule-of-five.

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

No branches or pull requests

1 participant