pub struct PostgresBackend { /* private fields */ }Expand description
PostgreSQL backend for FHIR resource storage.
Implementations§
Source§impl PostgresBackend
impl PostgresBackend
Sourcepub async fn new(config: PostgresConfig) -> StorageResult<Self>
pub async fn new(config: PostgresConfig) -> StorageResult<Self>
Creates a new PostgreSQL backend with the given configuration.
Sourcepub async fn from_connection_string(url: &str) -> StorageResult<Self>
pub async fn from_connection_string(url: &str) -> StorageResult<Self>
Creates a backend from a connection string.
Sourcepub async fn from_env() -> StorageResult<Self>
pub async fn from_env() -> StorageResult<Self>
Creates a backend from environment variables.
Reads the following environment variables:
HFS_PG_HOST(default: “localhost”)HFS_PG_PORT(default: 5432)HFS_PG_DBNAME(default: “helios”)HFS_PG_USER(default: “helios”)HFS_PG_PASSWORDHFS_PG_MAX_CONNECTIONS(default: 10)
Sourcepub async fn init_schema(&self) -> StorageResult<()>
pub async fn init_schema(&self) -> StorageResult<()>
Initialize the database schema.
Sourcepub fn config(&self) -> &PostgresConfig
pub fn config(&self) -> &PostgresConfig
Returns the backend configuration.
Sourcepub fn search_registry(&self) -> &Arc<RwLock<SearchParameterRegistry>> ⓘ
pub fn search_registry(&self) -> &Arc<RwLock<SearchParameterRegistry>> ⓘ
Returns a reference to the search parameter registry.
Sourcepub fn search_extractor(&self) -> &Arc<SearchParameterExtractor>
pub fn search_extractor(&self) -> &Arc<SearchParameterExtractor>
Returns a reference to the search parameter extractor.
Sourcepub fn is_search_offloaded(&self) -> bool
pub fn is_search_offloaded(&self) -> bool
Returns whether search indexing is offloaded to a secondary backend.
Sourcepub fn set_search_offloaded(&mut self, offloaded: bool)
pub fn set_search_offloaded(&mut self, offloaded: bool)
Sets the search offloaded flag.
Trait Implementations§
Source§impl Backend for PostgresBackend
impl Backend for PostgresBackend
Source§type Connection = PostgresConnection
type Connection = PostgresConnection
The type of raw connection used by this backend.
Source§fn kind(&self) -> BackendKind
fn kind(&self) -> BackendKind
Returns the kind of backend.
Source§fn supports(&self, capability: BackendCapability) -> bool
fn supports(&self, capability: BackendCapability) -> bool
Checks if this backend supports the given capability.
Source§fn capabilities(&self) -> Vec<BackendCapability>
fn capabilities(&self) -> Vec<BackendCapability>
Returns all capabilities supported by this backend.
Source§fn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acquire<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquires a connection from the pool.
Source§fn release<'life0, 'async_trait>(
&'life0 self,
_conn: Self::Connection,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn release<'life0, 'async_trait>(
&'life0 self,
_conn: Self::Connection,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the connection back to the pool.
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if the backend is healthy and accepting connections.
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initializes the database schema if needed.
Source§impl BulkExportStorage for PostgresBackend
impl BulkExportStorage for PostgresBackend
Source§fn start_export<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportJobId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_export<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportJobId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Starts a new export job. Read more
Source§fn get_export_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_export_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets the current status of an export job. Read more
Source§fn cancel_export<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_export<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Cancels an in-progress export job. Read more
Source§fn delete_export<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_export<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes an export job and its output files. Read more
Source§fn get_export_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportManifest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_export_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
job_id: &'life2 ExportJobId,
) -> Pin<Box<dyn Future<Output = StorageResult<ExportManifest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets the manifest for a completed export. Read more
Source§fn list_exports<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
include_completed: bool,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<ExportProgress>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_exports<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
include_completed: bool,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<ExportProgress>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists export jobs for a tenant. Read more
Source§impl BulkSubmitProvider for PostgresBackend
impl BulkSubmitProvider for PostgresBackend
Source§fn create_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
metadata: Option<Value>,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
metadata: Option<Value>,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Creates a new submission. Read more
Source§fn get_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SubmissionSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SubmissionSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets a submission by ID. Read more
Source§fn list_submissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submitter: Option<&'life2 str>,
status: Option<SubmissionStatus>,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_submissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submitter: Option<&'life2 str>,
status: Option<SubmissionStatus>,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists submissions. Read more
Source§fn complete_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Marks a submission as complete. Read more
Source§fn abort_submission<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
_reason: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn abort_submission<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
id: &'life2 SubmissionId,
_reason: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Aborts a submission. Read more
Source§fn add_manifest<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_url: Option<&'life3 str>,
replaces_manifest_url: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionManifest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn add_manifest<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_url: Option<&'life3 str>,
replaces_manifest_url: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = StorageResult<SubmissionManifest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Adds a manifest to a submission. Read more
Source§fn get_manifest<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SubmissionManifest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_manifest<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<SubmissionManifest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets a manifest by ID. Read more
Source§fn list_manifests<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionManifest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_manifests<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionManifest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists manifests in a submission. Read more
Source§fn process_entries<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
entries: Vec<NdjsonEntry>,
options: &'life4 BulkProcessingOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<BulkEntryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn process_entries<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
entries: Vec<NdjsonEntry>,
options: &'life4 BulkProcessingOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<BulkEntryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Processes entries from a manifest. Read more
Source§fn get_entry_results<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
outcome_filter: Option<BulkEntryOutcome>,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<BulkEntryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_entry_results<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
outcome_filter: Option<BulkEntryOutcome>,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<BulkEntryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets entry results for a manifest. Read more
Source§fn get_entry_counts<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<EntryCountSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_entry_counts<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<EntryCountSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets entry counts for a manifest. Read more
Source§impl BulkSubmitRollbackProvider for PostgresBackend
impl BulkSubmitRollbackProvider for PostgresBackend
Source§fn record_change<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
change: &'life3 SubmissionChange,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn record_change<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
change: &'life3 SubmissionChange,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Records a change for potential rollback. Read more
Source§fn list_changes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_changes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
limit: u32,
offset: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<SubmissionChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists recorded changes for a submission. Read more
Source§fn rollback_change<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
_submission_id: &'life2 SubmissionId,
change: &'life3 SubmissionChange,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn rollback_change<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
_submission_id: &'life2 SubmissionId,
change: &'life3 SubmissionChange,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Rolls back a single change. Read more
Source§impl BundleProvider for PostgresBackend
impl BundleProvider for PostgresBackend
Source§fn process_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
entries: Vec<BundleEntry>,
) -> Pin<Box<dyn Future<Output = Result<BundleResult, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
entries: Vec<BundleEntry>,
) -> Pin<Box<dyn Future<Output = Result<BundleResult, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Processes a transaction bundle (all-or-nothing). Read more
Source§fn process_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
entries: Vec<BundleEntry>,
) -> Pin<Box<dyn Future<Output = StorageResult<BundleResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
entries: Vec<BundleEntry>,
) -> Pin<Box<dyn Future<Output = StorageResult<BundleResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Processes a batch bundle (independent operations). Read more
Source§impl ChainedSearchProvider for PostgresBackend
impl ChainedSearchProvider for PostgresBackend
Source§fn resolve_chain<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
base_type: &'life2 str,
chain: &'life3 str,
value: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn resolve_chain<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
base_type: &'life2 str,
chain: &'life3 str,
value: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Evaluates a chained search and returns matching resource IDs. Read more
Source§fn resolve_reverse_chain<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
base_type: &'life2 str,
reverse_chain: &'life3 ReverseChainedParameter,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve_reverse_chain<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
base_type: &'life2 str,
reverse_chain: &'life3 ReverseChainedParameter,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Evaluates a reverse chain (_has) and returns matching resource IDs. Read more
Source§impl ConditionalStorage for PostgresBackend
impl ConditionalStorage for PostgresBackend
Source§fn conditional_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
search_params: &'life3 str,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalCreateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn conditional_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
search_params: &'life3 str,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalCreateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Creates a resource only if no matching resource exists. Read more
Source§fn conditional_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
search_params: &'life3 str,
upsert: bool,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalUpdateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn conditional_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
search_params: &'life3 str,
upsert: bool,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalUpdateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Updates a resource based on search criteria. Read more
Source§fn conditional_delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
search_params: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalDeleteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn conditional_delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
search_params: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalDeleteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Deletes a resource based on search criteria. Read more
Source§fn conditional_patch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
search_params: &'life3 str,
patch: &'life4 PatchFormat,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalPatchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn conditional_patch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
search_params: &'life3 str,
patch: &'life4 PatchFormat,
) -> Pin<Box<dyn Future<Output = StorageResult<ConditionalPatchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Patches a resource based on search criteria. Read more
Source§impl Debug for PostgresBackend
impl Debug for PostgresBackend
Source§impl DifferentialHistoryProvider for PostgresBackend
impl DifferentialHistoryProvider for PostgresBackend
Source§fn modified_since<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: Option<&'life2 str>,
since: DateTime<Utc>,
pagination: &'life3 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn modified_since<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: Option<&'life2 str>,
since: DateTime<Utc>,
pagination: &'life3 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<Page<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets resources modified since a given timestamp. Read more
Source§impl ExportDataProvider for PostgresBackend
impl ExportDataProvider for PostgresBackend
Source§fn list_export_types<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_export_types<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists resource types available for export. Read more
Source§fn count_export_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn count_export_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Counts resources of a type for export. Read more
Source§fn fetch_export_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
cursor: Option<&'life4 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn fetch_export_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
cursor: Option<&'life4 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Fetches a batch of resources for export. Read more
Source§impl GroupExportProvider for PostgresBackend
impl GroupExportProvider for PostgresBackend
Source§fn get_group_members<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
group_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_group_members<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
group_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets the members of a group. Read more
Source§fn resolve_group_patient_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
group_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_group_patient_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
group_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolves group members to patient IDs. Read more
Source§impl IncludeProvider for PostgresBackend
impl IncludeProvider for PostgresBackend
Source§fn resolve_includes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resources: &'life2 [StoredResource],
includes: &'life3 [IncludeDirective],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve_includes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resources: &'life2 [StoredResource],
includes: &'life3 [IncludeDirective],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolves _include directives for search results. Read more
Source§impl InstanceHistoryProvider for PostgresBackend
impl InstanceHistoryProvider for PostgresBackend
Source§fn history_instance<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
params: &'life4 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn history_instance<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
params: &'life4 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Gets the history for a specific resource instance. Read more
Source§fn history_instance_count<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn history_instance_count<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets the total number of versions for a resource.
Source§fn delete_instance_history<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_instance_history<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Deletes all history for a specific resource instance. Read more
Source§fn delete_version<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
version_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn delete_version<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
version_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Deletes a specific version from a resource’s history. Read more
Source§impl MultiTypeSearchProvider for PostgresBackend
impl MultiTypeSearchProvider for PostgresBackend
Source§fn search_multi<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_types: &'life2 [&'life3 str],
query: &'life4 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn search_multi<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_types: &'life2 [&'life3 str],
query: &'life4 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Searches across multiple resource types. Read more
Source§impl PatientExportProvider for PostgresBackend
impl PatientExportProvider for PostgresBackend
Source§fn list_patient_ids<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
cursor: Option<&'life3 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<(Vec<String>, Option<String>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_patient_ids<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
cursor: Option<&'life3 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<(Vec<String>, Option<String>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Lists patient IDs to include in the export. Read more
Source§fn fetch_patient_compartment_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
patient_ids: &'life4 [String],
cursor: Option<&'life5 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn fetch_patient_compartment_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
patient_ids: &'life4 [String],
cursor: Option<&'life5 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Fetches a batch of resources from the patient compartment. Read more
Source§impl PurgableStorage for PostgresBackend
impl PurgableStorage for PostgresBackend
Source§fn purge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn purge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Permanently deletes a resource and all its history. Read more
Source§fn purge_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn purge_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Permanently deletes all resources of a type for a tenant. Read more
Source§impl ReindexableStorage for PostgresBackend
impl ReindexableStorage for PostgresBackend
Source§fn list_resource_types<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_resource_types<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists all resource types that have resources in the tenant.
Source§fn count_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Counts resources of a specific type.
Source§fn fetch_resources_page<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
cursor: Option<&'life3 str>,
limit: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<ResourcePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fetch_resources_page<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
cursor: Option<&'life3 str>,
limit: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<ResourcePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Fetches a page of resources for reindexing. Read more
Source§fn delete_search_entries<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_search_entries<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Deletes search index entries for a resource.
Source§fn write_search_entries<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource_id: &'life3 str,
resource: &'life4 Value,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn write_search_entries<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource_id: &'life3 str,
resource: &'life4 Value,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Writes search index entries for a resource.
Source§fn clear_search_index<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_search_index<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Clears all search index entries for a tenant.
Source§impl ResourceStorage for PostgresBackend
impl ResourceStorage for PostgresBackend
Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Returns a human-readable name for this storage backend.
Source§fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
resource: Value,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Creates a new resource. Read more
Source§fn create_or_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
resource: Value,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<(StoredResource, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_or_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
resource: Value,
fhir_version: FhirVersion,
) -> Pin<Box<dyn Future<Output = StorageResult<(StoredResource, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Creates a resource with a specific ID (PUT semantics). Read more
Source§fn read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reads a resource by type and ID. Read more
Source§fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
current: &'life2 StoredResource,
resource: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
current: &'life2 StoredResource,
resource: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates an existing resource. Read more
Source§fn delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Deletes a resource (soft delete). Read more
Source§fn count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Counts the total number of resources of a given type. Read more
Source§fn exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Checks if a resource exists. Read more
Source§fn read_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
ids: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn read_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
ids: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Reads multiple resources by their IDs. Read more
Source§impl RevincludeProvider for PostgresBackend
impl RevincludeProvider for PostgresBackend
Source§fn resolve_revincludes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resources: &'life2 [StoredResource],
revincludes: &'life3 [IncludeDirective],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve_revincludes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resources: &'life2 [StoredResource],
revincludes: &'life3 [IncludeDirective],
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolves _revinclude directives for search results. Read more
Source§impl SearchCapabilityProvider for PostgresBackend
impl SearchCapabilityProvider for PostgresBackend
Source§fn resource_search_capabilities(
&self,
resource_type: &str,
) -> Option<ResourceSearchCapabilities>
fn resource_search_capabilities( &self, resource_type: &str, ) -> Option<ResourceSearchCapabilities>
Returns detailed search capabilities for a resource type. Read more
Source§fn global_search_capabilities(&self) -> GlobalSearchCapabilities
fn global_search_capabilities(&self) -> GlobalSearchCapabilities
Returns global search capabilities that apply to all resource types.
Source§fn validate_search_query(
&self,
query: &SearchQuery,
) -> Result<(), UnsupportedSearchFeature>
fn validate_search_query( &self, query: &SearchQuery, ) -> Result<(), UnsupportedSearchFeature>
Validates a search query against the backend’s capabilities. Read more
Source§impl SearchProvider for PostgresBackend
impl SearchProvider for PostgresBackend
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
query: &'life2 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
query: &'life2 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Searches for resources matching the query. Read more
Source§fn search_count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
query: &'life2 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search_count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
query: &'life2 SearchQuery,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Counts resources matching the query without returning them. Read more
Source§impl StreamingBulkSubmitProvider for PostgresBackend
impl StreamingBulkSubmitProvider for PostgresBackend
Source§fn process_ndjson_stream<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
resource_type: &'life4 str,
reader: Box<dyn AsyncBufRead + Send + Unpin>,
options: &'life5 BulkProcessingOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<StreamProcessingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn process_ndjson_stream<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
submission_id: &'life2 SubmissionId,
manifest_id: &'life3 str,
resource_type: &'life4 str,
reader: Box<dyn AsyncBufRead + Send + Unpin>,
options: &'life5 BulkProcessingOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<StreamProcessingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Processes NDJSON data from a stream. Read more
Source§impl SystemHistoryProvider for PostgresBackend
impl SystemHistoryProvider for PostgresBackend
Source§fn history_system<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
params: &'life2 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn history_system<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
params: &'life2 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets the history for all resources in the system. Read more
Source§fn history_system_count<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn history_system_count<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the total number of history entries in the system.
Source§impl TextSearchProvider for PostgresBackend
impl TextSearchProvider for PostgresBackend
Source§fn search_text<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
text: &'life3 str,
pagination: &'life4 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn search_text<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
text: &'life3 str,
pagination: &'life4 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Performs a full-text search on resource narratives. Read more
Source§fn search_content<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
content: &'life3 str,
pagination: &'life4 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn search_content<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
content: &'life3 str,
pagination: &'life4 Pagination,
) -> Pin<Box<dyn Future<Output = StorageResult<SearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Performs a full-text search on entire resource content. Read more
Source§impl TransactionProvider for PostgresBackend
impl TransactionProvider for PostgresBackend
Source§type Transaction = PostgresTransaction
type Transaction = PostgresTransaction
The transaction type returned by this provider.
Source§fn begin_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
_options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Self::Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
_options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = StorageResult<Self::Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Begins a new transaction. Read more
Source§fn with_transaction<'life0, 'life1, 'async_trait, F, Fut, R>(
&'life0 self,
tenant: &'life1 TenantContext,
options: TransactionOptions,
f: F,
) -> Pin<Box<dyn Future<Output = StorageResult<R>> + Send + 'async_trait>>where
F: FnOnce(Self::Transaction) -> Fut + Send + 'async_trait,
Fut: Future<Output = StorageResult<R>> + Send + 'async_trait,
R: Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn with_transaction<'life0, 'life1, 'async_trait, F, Fut, R>(
&'life0 self,
tenant: &'life1 TenantContext,
options: TransactionOptions,
f: F,
) -> Pin<Box<dyn Future<Output = StorageResult<R>> + Send + 'async_trait>>where
F: FnOnce(Self::Transaction) -> Fut + Send + 'async_trait,
Fut: Future<Output = StorageResult<R>> + Send + 'async_trait,
R: Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes a function within a transaction. Read more
Source§impl TypeHistoryProvider for PostgresBackend
impl TypeHistoryProvider for PostgresBackend
Source§fn history_type<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
params: &'life3 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn history_type<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
params: &'life3 HistoryParams,
) -> Pin<Box<dyn Future<Output = StorageResult<HistoryPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets the history for all resources of a type. Read more
Source§fn history_type_count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn history_type_count<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets the total number of history entries for a resource type.
Source§impl VersionedStorage for PostgresBackend
impl VersionedStorage for PostgresBackend
Source§fn vread<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
version_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn vread<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
version_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredResource>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Reads a specific version of a resource (vread). Read more
Source§fn update_with_match<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
expected_version: &'life4 str,
resource: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn update_with_match<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
expected_version: &'life4 str,
resource: Value,
) -> Pin<Box<dyn Future<Output = StorageResult<StoredResource>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Updates a resource with optimistic locking (If-Match). Read more
Source§fn delete_with_match<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
expected_version: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn delete_with_match<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
expected_version: &'life4 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Deletes a resource with optimistic locking (If-Match). Read more
Source§fn list_versions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_versions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Lists all version IDs for a resource. Read more
Source§fn current_version<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<String>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn current_version<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
resource_type: &'life2 str,
id: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<String>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Gets the current version ID of a resource without reading the full content. Read more
Auto Trait Implementations§
impl Freeze for PostgresBackend
impl !RefUnwindSafe for PostgresBackend
impl Send for PostgresBackend
impl Sync for PostgresBackend
impl Unpin for PostgresBackend
impl UnsafeUnpin for PostgresBackend
impl !UnwindSafe for PostgresBackend
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
Mutably borrows from an owned value. Read more
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.