-
Notifications
You must be signed in to change notification settings - Fork 511
Plain enums as index keys with specialized indices #2506
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
Conversation
Requested reviews from:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed only the parts you asked for, namely the SDK tests (both module and client parts) and the stuff in the table
crate.
Minor style nits. Otherwise looks good!
I wonder if we should even bother to use unique BTree indices for simple enums, or if we should just impl a unique index on a simple enum column as a direct index. I wonder the same thing about u8 and i8 columns. This is idle speculation, though.
ea92071
to
3abc61d
Compare
I sorta tried this direction but decided that the user might want to express "this index likely doesn't use all elements" so I skipped that change. It's worth exploring in the future though. |
4fa1f58
to
c533311
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Includes references to changes made by clockworklabs/SpacetimeDB#2506 , which as of writing has not merged. We should not push this commit live until after that PR is released.
2b508d0
to
8cdac9a
Compare
8cdac9a
to
9b3758b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C# side of this generally makes sense. I would prefer to implement IEquatable
for plain enums marked with [SpacetimeDB.Type]
and keep the bounds on various interfaces -- I think I missed implementing IEquatable
for plain enums in my IEquatable PR.
Includes references to changes made by clockworklabs/SpacetimeDB#2506 , which as of writing has not merged. We should not push this commit live until after that PR is released.
Description of Changes
Commits:
FilterableValue
is impld when derivingSpacetimeType
.API and ABI breaking changes
None
Expected complexity level and risk
2?
Testing
SDK tests are added exercising both the host, the modules, and the sdk. New tests are also added for the new fixed capacity direct index type.