Skip to content

Conversation

@kistz
Copy link
Contributor

@kistz kistz commented Jan 10, 2026

Description of Changes

Uuid addad in the last update is not filterable even though it is Copy and (imo) obviously very suited to filter.
Promote it to a special FilterableValue in the same way as Identity and adjust the docs.

API and ABI breaking changes

None

Expected complexity level and risk

  1. Only copies the same strategy as Identity which is also a newtype wrapper around a integer like Uuid

Testing

Tested on my project.

After the change:
image

Before the change:
image

You can also test this yourself when adding:
spacetimedb = { version = "1.11.2", git = "https://github.com/kistz/SpacetimeDB.git", branch = "uuid-as-filter" } to your cargo.toml project

  • Tested before and after. Before it was a compiler error afterwards not.

@cloutiertyler
Copy link
Contributor

Thank you for the submission. Unfortunately this is not sufficient to be able to merge this. We would need to implement this in:

  • spacetime generate so the client can also filter
  • C# (server/client)
  • TypeScript (server/client)

It's important that we keep the various languages consistent with the features they support except in rare scenarios.

@kistz
Copy link
Contributor Author

kistz commented Jan 10, 2026

I can look into it today and/or tomorrow and let you know if i can get it to work :)
If not we can view this as an issue and close it/let someone from the team finish it 👍

@kistz
Copy link
Contributor Author

kistz commented Jan 17, 2026

@gefjon Thank you again for the list you provided in #4024

I believe Uuid was designed for this in the first place and no further changes are necessary in this case. Hence only Rust cant .filter() it at the moment cause of the minor trait bound missing.

Please let me know if the following argumentation is lacking and/or there is something missing still:

Ensure (with automated tests) can equality-compare and ordering-compare values of the column type

  1. C# Ordering Comparable Decl Comparable Impl

2.TS Ordering Comparable

3.RS Ordering and Equality

Extend our other supported module languages' bindings libraries.

  1. C# already can do this (Thanks @Lethalchip for testing!)
image image
  1. TS already can do this.
image
  1. Rust can also do it after this pr ;)

As i said before please let me know if this is still to little confidence in the pr preferably with concrete todo items :>
I would be really motivated to get this in ^^

Thanks for reading and considering guys <3

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

Successfully merging this pull request may close these issues.

2 participants