Skip to main content

coven_database/
followed_tables.rs

1//! The tables an app's local triggers may follow, for an app's test that
2//! runs its own schema outside any store (api.md E4).
3
4/// The SQL that makes each table the app's local triggers may follow, as
5/// every store makes it, `coven_sync_status` and `coven_retry_effect` with
6/// their one row. An app's test that runs its own schema on a connection it
7/// opened itself, outside any store, runs these first, so its triggers on
8/// them apply and fire as in a store. Nothing of coven's writes the tables
9/// there: the test writes the rows coven would.
10pub fn followed_tables_sql() -> impl Iterator<Item = &'static str> {
11    crate::internal_schema::FOLLOWED.into_iter().map(|followed| followed.table)
12}
13
14#[cfg(test)]
15#[path = "followed_tables_tests.rs"]
16mod tests;