diff --git a/crates/lib/src/filterable_value.rs b/crates/lib/src/filterable_value.rs index d0039823d09..6b23035b914 100644 --- a/crates/lib/src/filterable_value.rs +++ b/crates/lib/src/filterable_value.rs @@ -1,4 +1,4 @@ -use crate::{ConnectionId, Identity}; +use crate::{ConnectionId, Identity, Uuid}; use core::ops; use spacetimedb_sats::bsatn; use spacetimedb_sats::{hash::Hash, i256, u256, Serialize}; @@ -15,6 +15,7 @@ use spacetimedb_sats::{hash::Hash, i256, u256, Serialize}; /// - [`bool`]. /// - [`String`], which is also filterable with `&str`. /// - [`Identity`]. +/// - [`Uuid`]. /// - [`ConnectionId`]. /// - [`Hash`](struct@Hash). /// - No-payload enums annotated with `#[derive(SpacetimeType)]`. @@ -37,8 +38,8 @@ use spacetimedb_sats::{hash::Hash, i256, u256, Serialize}; // E.g. `&str: FilterableValue` is desirable. #[diagnostic::on_unimplemented( message = "`{Self}` cannot appear as an argument to an index filtering operation", - label = "should be an integer type, `bool`, `String`, `&str`, `Identity`, `ConnectionId`, `Hash` or a no-payload enum which derives `SpacetimeType`, not `{Self}`", - note = "The allowed set of types are limited to integers, bool, strings, `Identity`, `ConnectionId`, `Hash` and no-payload enums which derive `SpacetimeType`," + label = "should be an integer type, `bool`, `String`, `&str`, `Identity` , `Uuid`, `ConnectionId`, `Hash` or a no-payload enum which derives `SpacetimeType`, not `{Self}`", + note = "The allowed set of types are limited to integers, bool, strings, `Identity`, `Uuid`, `ConnectionId`, `Hash` and no-payload enums which derive `SpacetimeType`," )] pub trait FilterableValue: Serialize + Private { type Column; @@ -94,6 +95,7 @@ impl_filterable_value! { &str => String, Identity: Copy, + Uuid: Copy, ConnectionId: Copy, Hash: Copy,