-
Notifications
You must be signed in to change notification settings - Fork 597
Make Timestamp, TimeDuration,Vec<u8> implement FilterableValue #3008
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
base: master
Are you sure you want to change the base?
Conversation
390f24c
to
0c0e262
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.
What are the implications of being a filterable value? Does that mean tables can have indexes on fields of that type, or just that sql queries can filter on those fields?
/** | ||
* Compares the current instance with another object of the same type. | ||
*/ | ||
interface Comparable<T> { |
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.
Is this used?
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.
What are the implications of being a filterable value?
It means a Filter
functions is generated for this field, but you can filter with sql
any field.
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.
Is this used?
Is removed now, was before agreement to not mirror yet the filterable trait
@@ -1,6 +1,8 @@ | |||
use crate::{ConnectionId, Identity}; | |||
use core::ops; | |||
use spacetimedb_sats::bsatn; | |||
use spacetimedb_sats::time_duration::TimeDuration; | |||
use spacetimedb_sats::timestamp::Timestamp; | |||
use spacetimedb_sats::{hash::Hash, i256, u256, Serialize}; | |||
|
|||
/// Types which can appear as an argument to an index filtering operation |
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.
We should probably add Timestamp and TimeDuration to the of types specifically called out as having corresponding FilterableValue
implementations in this comment block.
@@ -171,6 +171,18 @@ public partial struct Player | |||
public string name; | |||
} | |||
|
|||
// Extra table for checking implementation of `FilterableValue` trait |
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.
If we are adding a table to specifically check for the FilterableValue
trait, we should add the other filterable types as well.
4e53b8a
to
e190de1
Compare
e190de1
to
4c9c51f
Compare
Description of Changes
As the title says.
Closes #2650
Expected complexity level and risk
1
Testing
NOTE : Need input in what other testing to add
Comparable
in theC#
side