backbone-integrations 0.6.0

Integration registry: connectors, integration accounts and an idempotent inbound event lane, with one OAuth flow (HMAC-bound state, PKCE)
Documentation
//! Repository for Example entities
//!
//! Generated by backbone-schema. Do not edit manually.
//!
//! Thin newtype over `backbone_orm::GenericCrudRepository<Example, backbone_orm::SoftDelete>`.
//! All standard CRUD methods are available via `Deref`.

use sqlx::PgPool;

use crate::domain::entity::Example;

/// Table name for Example entities
pub const TABLE_NAME: &str = "examples";

/// Repository for Example entities.
///
/// All standard CRUD, soft-delete, pagination, and bulk methods are
/// provided automatically via `Deref` to `backbone_orm::GenericCrudRepository`.
pub struct ExampleRepository(
    backbone_orm::GenericCrudRepository<Example, backbone_orm::SoftDelete>,
);

impl std::ops::Deref for ExampleRepository {
    type Target = backbone_orm::GenericCrudRepository<Example, backbone_orm::SoftDelete>;
    fn deref(&self) -> &Self::Target { &self.0 }
}

impl ExampleRepository {
    /// Create a new repository instance.
    pub fn new(pool: PgPool) -> Self {
        Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
    }
}

backbone_core::impl_crud_repository!(ExampleRepository, Example, soft_delete);

// <<< CUSTOM
// END CUSTOM