Trait lightspeed_cms::repository::SchemaRepository [−][src]
pub trait SchemaRepository: Clone + Send + Sync { type Conn; #[must_use] fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn exists_by_name_and_project_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait; #[must_use] fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn delete_by_project_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<u64, LightSpeedError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; }
Associated Types
Required methods
#[must_use]fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]#[must_use]fn exists_by_name_and_project_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn exists_by_name_and_project_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]#[must_use]fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]#[must_use]fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]#[must_use]fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: SchemaModel
) -> Pin<Box<dyn Future<Output = Result<SchemaModel, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Implementors
impl SchemaRepository for PgSchemaRepository
[src]
impl SchemaRepository for PgSchemaRepository
[src]type Conn = PgConnection
fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn exists_by_name_and_project_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: Model<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
model: Model<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: Model<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
model: Model<SchemaData>
) -> Pin<Box<dyn Future<Output = Result<Model<SchemaData>, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn delete_by_project_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<u64, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut Self::Conn,
project_id: i64
) -> Pin<Box<dyn Future<Output = Result<u64, LightSpeedError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,