pub struct SubscribableEntity {
pub entity_type: String,
pub tables: Vec<String>,
}Expand description
A @subscribable declaration in the compiled schema (#366).
Maps a GraphQL type to the physical base table(s) whose external writes
(a raw INSERT/UPDATE/DELETE from psql / a migration / a third-party
tool) should be captured onto the Change Spine by the shipped fallback trigger
core.fn_entity_change_log_capture. The compiler aggregates one of these per
type carrying @subscribable(tables=[...]); the
generate_capture_trigger_ddl
generator turns them into per-table statement-level triggers that stamp
object_type = entity_type — the GraphQL type name the reader and the
subscription matcher key on, never the table name — so a captured external
write fans out through the existing poller with no table→type lookup.
Fields§
§entity_type: StringThe GraphQL type name (e.g. "Post") stamped as object_type on every
captured change-log row.
tables: Vec<String>The physical base table(s) backing entity_type (e.g. ["tb_post"],
optionally schema-qualified ["public.tb_post"]). A capture trigger is
installed on each.
Trait Implementations§
Source§impl Clone for SubscribableEntity
impl Clone for SubscribableEntity
Source§fn clone(&self) -> SubscribableEntity
fn clone(&self) -> SubscribableEntity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubscribableEntity
impl Debug for SubscribableEntity
Source§impl<'de> Deserialize<'de> for SubscribableEntity
impl<'de> Deserialize<'de> for SubscribableEntity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SubscribableEntity
Source§impl PartialEq for SubscribableEntity
impl PartialEq for SubscribableEntity
Source§fn eq(&self, other: &SubscribableEntity) -> bool
fn eq(&self, other: &SubscribableEntity) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SubscribableEntity
impl Serialize for SubscribableEntity
impl StructuralPartialEq for SubscribableEntity
Auto Trait Implementations§
impl Freeze for SubscribableEntity
impl RefUnwindSafe for SubscribableEntity
impl Send for SubscribableEntity
impl Sync for SubscribableEntity
impl Unpin for SubscribableEntity
impl UnsafeUnpin for SubscribableEntity
impl UnwindSafe for SubscribableEntity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.