Make `Timestamp` implement `FilterableValue`
In both Rust and C#. This will require modifications to the C#, Rust and TypeScript client SDKs to ensure their client-side index implementations are compatible with Timestamp.
Might as well do TimeDuration too.
I'm attempting this one, implementing it on the rust backend was very simple, I'll make the changes to C# as well soon. @gefjon would you explain what would change from the client SDKs perspective? It's not super clear to me why we would need to change the client SDKs, I'm thinking this impacts the backend only.
would you explain what would change from the client SDKs perspective? It's not super clear to me why we would need to change the client SDKs, I'm thinking this impacts the backend only.
Unique and primary-key indexes declared in the module are included in codegen so that client code can use the same filtering methods to look up values. In the C# client SDK, non-unique BTree indexes are also included in client codegen. This means that each client SDK has its own implementation of unique indexes, and the C# client SDK also has an implementation of non-unique sorted indexes. The trait FilterableValue encodes the set of types which are supported by all of these client-side index implementations. Implementing FilterableValue for a type requires confirming (and adding tests) that each client index implementation does actually correctly compare instances of the type. My suspicion is that at least the TypeScript client SDK actually does not correctly compare Timestamp and TimeDuration values as-is, and will need some modifications. The Rust client SDK should basically just work. I am not sure about the status of C#.
Any updates on this? Please see https://github.com/clockworklabs/SpacetimeDB/pull/2695#issuecomment-3165870549 for priority notes