pub trait QueryConsentRecord {
// Required methods
fn get_consent_record(
&self,
entity: String,
entity_type: ConsentType,
) -> Result<Option<StoredConsentRecord>, ConnectionError>;
fn consent_records(
&self,
) -> Result<Vec<StoredConsentRecord>, ConnectionError>;
fn consent_records_paged(
&self,
limit: i64,
offset: i64,
) -> Result<Vec<StoredConsentRecord>, ConnectionError>;
fn insert_newer_consent_record(
&self,
record: StoredConsentRecord,
) -> Result<bool, ConnectionError>;
fn insert_or_replace_consent_records(
&self,
records: &[StoredConsentRecord],
) -> Result<Vec<StoredConsentRecord>, ConnectionError>;
fn maybe_insert_consent_record_return_existing(
&self,
record: &StoredConsentRecord,
) -> Result<Option<StoredConsentRecord>, ConnectionError>;
fn find_consent_by_dm_id(
&self,
dm_id: &str,
) -> Result<Vec<StoredConsentRecord>, ConnectionError>;
}Required Methods§
Sourcefn get_consent_record(
&self,
entity: String,
entity_type: ConsentType,
) -> Result<Option<StoredConsentRecord>, ConnectionError>
fn get_consent_record( &self, entity: String, entity_type: ConsentType, ) -> Result<Option<StoredConsentRecord>, ConnectionError>
Returns the consent_records for the given entity up
fn consent_records(&self) -> Result<Vec<StoredConsentRecord>, ConnectionError>
fn consent_records_paged( &self, limit: i64, offset: i64, ) -> Result<Vec<StoredConsentRecord>, ConnectionError>
Sourcefn insert_newer_consent_record(
&self,
record: StoredConsentRecord,
) -> Result<bool, ConnectionError>
fn insert_newer_consent_record( &self, record: StoredConsentRecord, ) -> Result<bool, ConnectionError>
Returns true if newer
Sourcefn insert_or_replace_consent_records(
&self,
records: &[StoredConsentRecord],
) -> Result<Vec<StoredConsentRecord>, ConnectionError>
fn insert_or_replace_consent_records( &self, records: &[StoredConsentRecord], ) -> Result<Vec<StoredConsentRecord>, ConnectionError>
Insert consent_records, and replace existing entries, returns records that are new or changed