Returns `true` for single-replica backends (`SQLite`) where no lease coordination is needed, `false` for multi-replica backends (`Postgres`).
(&self)
| 169 | /// Returns `true` for single-replica backends (`SQLite`) where no lease |
| 170 | /// coordination is needed, `false` for multi-replica backends (`Postgres`). |
| 171 | pub fn is_single_replica(&self) -> bool { |
| 172 | matches!(self, Self::Sqlite(_)) |
| 173 | } |
| 174 | |
| 175 | /// Connect to a persistence store based on the database URL. |
| 176 | pub async fn connect(url: &str) -> CoreResult<Self> { |