pub use icydb_core::db::{EntityKey, EntityKeyBytes, EntityKeyBytesError};
pub use icydb_core::entity::{
EntityCreateInput, EntityCreateType, EntityDeclaration, EntityKind, EntityPlacement,
SingletonEntity,
};
pub use icydb_core::traits::{CanisterKind, FieldTypeMeta, Inner, Kind, Path, StoreKind, TypeKind};
pub use icydb_core::types::NumericValue;
pub use icydb_core::value::{Collection, MapCollection};
pub use icydb_core::visitor::{
Sanitize, SanitizeAuto, SanitizeCustom, Sanitizer, Validate, ValidateAuto, ValidateCustom,
Validator, Visitable,
};
pub trait Entity: icydb_core::db::PersistedRow {}
impl<T> Entity for T where T: icydb_core::db::PersistedRow {}
pub trait EntityFor<C: CanisterKind>: Entity<Canister = C> {}
impl<T, C> EntityFor<C> for T
where
T: Entity<Canister = C>,
C: CanisterKind,
{
}
pub trait CreateInput: EntityCreateInput
where
Self::Entity: Entity,
{
}
impl<T> CreateInput for T
where
T: EntityCreateInput,
T::Entity: Entity,
{
}
pub trait CreateInputFor<C: CanisterKind>: CreateInput
where
Self::Entity: EntityFor<C>,
{
}
impl<T, C> CreateInputFor<C> for T
where
T: CreateInput,
T::Entity: EntityFor<C>,
C: CanisterKind,
{
}