pub struct StockMoveRepository(/* private fields */);Expand description
Repository for StockMove entities.
All standard CRUD, soft-delete, pagination, and bulk methods are
provided automatically via Deref to backbone_orm::GenericCrudRepository.
Implementations§
Source§impl StockMoveRepository
Hand-written stock-move SQL — the lifecycle writes. Guarded: state transitions carry the
expected source state in their WHERE clause, so a stale read cannot silently overwrite a move
another caller already advanced (the optimistic guard behind the declared state machine in
schema/hooks/stock.hook.yaml; ADR-0015 service pre-check + the WHERE clause as the backstop).
impl StockMoveRepository
Hand-written stock-move SQL — the lifecycle writes. Guarded: state transitions carry the expected source state in their WHERE clause, so a stale read cannot silently overwrite a move another caller already advanced (the optimistic guard behind the declared state machine in schema/hooks/stock.hook.yaml; ADR-0015 service pre-check + the WHERE clause as the backstop).
Sourcepub async fn insert_move(
&self,
conn: &mut PgConnection,
m: &NewMoveRow<'_>,
) -> Result<(), Error>
pub async fn insert_move( &self, conn: &mut PgConnection, m: &NewMoveRow<'_>, ) -> Result<(), Error>
Insert a draft move.
Sourcepub async fn fetch_move(
&self,
conn: &mut PgConnection,
move_id: Uuid,
) -> Result<Option<MoveRow>, Error>
pub async fn fetch_move( &self, conn: &mut PgConnection, move_id: Uuid, ) -> Result<Option<MoveRow>, Error>
Fetch one move. Returns None when absent or soft-deleted.
Sourcepub async fn fetch_moves(
&self,
conn: &mut PgConnection,
move_ids: &[Uuid],
) -> Result<Vec<MoveRow>, Error>
pub async fn fetch_moves( &self, conn: &mut PgConnection, move_ids: &[Uuid], ) -> Result<Vec<MoveRow>, Error>
Fetch several moves by id (chain propagation). Order follows the input ids.
Sourcepub async fn fetch_moves_by_origin(
&self,
conn: &mut PgConnection,
origin: &str,
) -> Result<Vec<MoveRow>, Error>
pub async fn fetch_moves_by_origin( &self, conn: &mut PgConnection, origin: &str, ) -> Result<Vec<MoveRow>, Error>
Fetch the moves minted for one voucher (origin — voucher doors stamp the
voucher number there so a crashed submit can find and resume its line moves).
Sourcepub async fn transition_state(
&self,
conn: &mut PgConnection,
move_id: Uuid,
expected_from: &str,
to: &str,
) -> Result<bool, Error>
pub async fn transition_state( &self, conn: &mut PgConnection, move_id: Uuid, expected_from: &str, to: &str, ) -> Result<bool, Error>
Guarded state transition: UPDATE ... WHERE id=$1 AND state=$expected. Returns Ok(false)
when zero rows matched — the move is not in the expected state (the caller maps that to a
domain error). This is the declared state machine’s write valve: states only move through
here with their declared source.
Sourcepub async fn mark_done(
&self,
conn: &mut PgConnection,
move_id: Uuid,
expected_from: &str,
done_qty: Decimal,
when: DateTime<Utc>,
) -> Result<bool, Error>
pub async fn mark_done( &self, conn: &mut PgConnection, move_id: Uuid, expected_from: &str, done_qty: Decimal, when: DateTime<Utc>, ) -> Result<bool, Error>
The done write: state='done', the done quantity, and the effective-date stamp (the
date column is the schema’s effective-date surface — set to the processing instant on
done; there is no separate date_done column on moves). Guarded on the expected source
state like Self::transition_state.
Sourcepub async fn set_picking(
&self,
conn: &mut PgConnection,
move_id: Uuid,
picking_id: Uuid,
) -> Result<(), Error>
pub async fn set_picking( &self, conn: &mut PgConnection, move_id: Uuid, picking_id: Uuid, ) -> Result<(), Error>
Attach a move to its grouping transfer (the picking-assignment write: the move’s
picking_id is set, and the projection re-derives on the caller’s next reproject —
this write only moves the pointer). Runs inside the caller’s transaction; the ambient
org scope is already relayed onto it by the service that resolved the group.
Sourcepub async fn link_chain(
&self,
conn: &mut PgConnection,
parent_id: Uuid,
child_id: Uuid,
) -> Result<(), Error>
pub async fn link_chain( &self, conn: &mut PgConnection, parent_id: Uuid, child_id: Uuid, ) -> Result<(), Error>
Link a backorder child to its parent: the parent’s move_dest_ids gains the child, the
child’s move_orig_ids gains the parent (the chain vocabulary move_orig_ids/
move_dest_ids — spec §1/§4; done-qty propagation and waiting release walk these).
Source§impl StockMoveRepository
The GL-leg settlement writes (the move’s OWN AccountingPost outcome — the same posture the
voucher doors keep on their headers). The pending marker is written INSIDE the done
transaction, atomically with the physical movement; the posted/failed reconciles run on
the pool AFTER the movement commits (the GL leg is eventually consistent — a crash between
commit and the reconcile leaves pending, which the repost verb re-drives; accounting
dedupes on (source_type, source_id, posting_type) so a re-drive can never double post).
impl StockMoveRepository
The GL-leg settlement writes (the move’s OWN AccountingPost outcome — the same posture the
voucher doors keep on their headers). The pending marker is written INSIDE the done
transaction, atomically with the physical movement; the posted/failed reconciles run on
the pool AFTER the movement commits (the GL leg is eventually consistent — a crash between
commit and the reconcile leaves pending, which the repost verb re-drives; accounting
dedupes on (source_type, source_id, posting_type) so a re-drive can never double post).
Sourcepub async fn set_posting_pending(
&self,
conn: &mut PgConnection,
move_id: Uuid,
) -> Result<(), Error>
pub async fn set_posting_pending( &self, conn: &mut PgConnection, move_id: Uuid, ) -> Result<(), Error>
Arm the GL leg: posting_state = pending, inside the movement’s own transaction. Called
by the done path only when it actually built an envelope for this move — moves that post
no GL of their own never leave not_applicable.
Sourcepub async fn mark_posting_posted(
&self,
pool: &PgPool,
move_id: Uuid,
) -> Result<(), Error>
pub async fn mark_posting_posted( &self, pool: &PgPool, move_id: Uuid, ) -> Result<(), Error>
The pending→posted reconcile from the accounting ack. Guarded on
posting_state <> 'posted' so a re-drive that accounting answered from its dedupe
(returning the ORIGINAL journal) can never flip a settled state.
Runs org_scope::execute_scoped on the pool: the write rides the ambient org scope’s
request-dedicated connection (the composing service sets it per request) so it passes
the decorator’s fence (ADR-0029).
Sourcepub async fn mark_posting_failed(
&self,
pool: &PgPool,
move_id: Uuid,
) -> Result<(), Error>
pub async fn mark_posting_failed( &self, pool: &PgPool, move_id: Uuid, ) -> Result<(), Error>
Record a GL rejection. The physical movement is NOT rolled back — it really happened;
the move parks in failed and is re-drivable via repost_move_gl.
Same org-scoped pool write as Self::mark_posting_posted.
Sourcepub async fn mark_posting_not_applicable(
&self,
pool: &PgPool,
move_id: Uuid,
) -> Result<(), Error>
pub async fn mark_posting_not_applicable( &self, pool: &PgPool, move_id: Uuid, ) -> Result<(), Error>
Retire an unsettled GL leg back to not_applicable — used by the repost verb when the
envelope can no longer be built (the directive no longer supplies the accounts the leg
shape needs), so a stuck pending/failed move whose GL is genuinely not postable under
the current configuration settles instead of living on the sweep worklist forever. Never
touches a posted move.
Source§impl StockMoveRepository
Location reads the move pipeline owns (guards R9/R13 + the bin-warehouse resolution in
_action_done’s valuation core). One round trip for both endpoints.
impl StockMoveRepository
Location reads the move pipeline owns (guards R9/R13 + the bin-warehouse resolution in
_action_done’s valuation core). One round trip for both endpoints.
Sourcepub async fn fetch_move_locations(
&self,
conn: &mut PgConnection,
location_id: Uuid,
location_dest_id: Uuid,
) -> Result<(Option<LocationFacts>, Option<LocationFacts>), Error>
pub async fn fetch_move_locations( &self, conn: &mut PgConnection, location_id: Uuid, location_dest_id: Uuid, ) -> Result<(Option<LocationFacts>, Option<LocationFacts>), Error>
Fetch a move’s two endpoint locations. Returns (src, dest) as read; None for an absent
or soft-deleted endpoint (the caller maps that to LocationNotFound).
Source§impl StockMoveRepository
The T1 picking-state projection (spec §2, ADR-0016 projection shape).
impl StockMoveRepository
The T1 picking-state projection (spec §2, ADR-0016 projection shape).
transfers.state is a STORED COMPUTE over its moves — _get_relevant_state_among_moves: the
LEAST-advanced non-cancelled move state (cancelled moves drop out of the aggregation entirely;
all-cancelled shows cancel). The picking has no state machine of its own anywhere; every
move-state change re-runs this recompute. The SQL lives on the MOVE repository because the
projection derives entirely from move rows — the transfer merely receives the result.
Sourcepub async fn reproject_picking(
&self,
conn: &mut PgConnection,
picking_id: Uuid,
) -> Result<Option<String>, Error>
pub async fn reproject_picking( &self, conn: &mut PgConnection, picking_id: Uuid, ) -> Result<Option<String>, Error>
Recompute + write one transfer’s projected state from its moves. Returns the new projected
state (text), or None when the transfer has no live moves. Also stamps the transfer’s
date_done when the projection first reaches done.
Methods from Deref<Target = GenericCrudRepository<StockMove, SoftDelete>>§
pub fn pool(&self) -> &Pool<Postgres>
pub fn table_name(&self) -> &str
Sourcepub async fn create(&self, entity: &T) -> Result<T, Error>
pub async fn create(&self, entity: &T) -> Result<T, Error>
Insert a new entity row and return the created row.
Sourcepub async fn bulk_create(&self, entities: &[T]) -> Result<Vec<T>, Error>
pub async fn bulk_create(&self, entities: &[T]) -> Result<Vec<T>, Error>
Insert multiple entity rows inside a single transaction.
Sourcepub async fn run_filtered_query(
&self,
pagination: PaginationParams,
base_condition: Option<&str>,
filters: &HashMap<String, String>,
column_types: &HashMap<String, String>,
search_fields: &[&str],
) -> Result<PaginatedResult<T>, Error>
pub async fn run_filtered_query( &self, pagination: PaginationParams, base_condition: Option<&str>, filters: &HashMap<String, String>, column_types: &HashMap<String, String>, search_fields: &[&str], ) -> Result<PaginatedResult<T>, Error>
Execute a filtered / paginated query against this entity’s table.
base_condition — when Some, it is inserted as the __base_condition
filter key which the ORM injects verbatim into the WHERE clause. Use
this to add soft-delete guards without touching the caller-supplied
filters.
NOTE: prefer the *_scoped entry points for anything a client can reach —
they compose the company fence into this condition. This raw form applies no
fence and is for internal/job callers that have already established scope.
Sourcepub async fn run_aggregate_query(
&self,
spec: &AggregateSpec,
base_condition: Option<&str>,
filters: &HashMap<String, String>,
column_types: &HashMap<String, String>,
search_fields: &[&str],
) -> Result<AggregateResult, Error>
pub async fn run_aggregate_query( &self, spec: &AggregateSpec, base_condition: Option<&str>, filters: &HashMap<String, String>, column_types: &HashMap<String, String>, search_fields: &[&str], ) -> Result<AggregateResult, Error>
The aggregate twin of Self::run_filtered_query.
Takes the same base_condition so an aggregate is computed over exactly
the row set the matching list would return — a total that counted
soft-deleted rows, or another tenant’s, would be wrong in a way no
caller could see.
Sourcepub async fn find_by_text_field(
&self,
field: &str,
value: &str,
) -> Result<Option<T>, Error>
pub async fn find_by_text_field( &self, field: &str, value: &str, ) -> Result<Option<T>, Error>
Find an active entity by a unique text field.
Filters metadata->>'deleted_at' IS NULL automatically.
Sourcepub async fn exists_by_text_field(
&self,
field: &str,
value: &str,
) -> Result<bool, Error>
pub async fn exists_by_text_field( &self, field: &str, value: &str, ) -> Result<bool, Error>
Check existence by a unique text field (active records only).
Sourcepub async fn find_by_uuid_field(
&self,
field: &str,
value: Uuid,
) -> Result<Option<T>, Error>
pub async fn find_by_uuid_field( &self, field: &str, value: Uuid, ) -> Result<Option<T>, Error>
Find an active entity by a unique UUID field.
Sourcepub async fn exists_by_uuid_field(
&self,
field: &str,
value: Uuid,
) -> Result<bool, Error>
pub async fn exists_by_uuid_field( &self, field: &str, value: Uuid, ) -> Result<bool, Error>
Check existence by a unique UUID field (active records only).
Sourcepub async fn list_paginated_filtered(
&self,
pagination: PaginationParams,
filters: Option<&HashMap<String, String>>,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_paginated_filtered( &self, pagination: PaginationParams, filters: Option<&HashMap<String, String>>, ) -> Result<PaginatedResult<T>, Error>
Paginate active entities with filter and search support.
Requires T: EntityRepoMeta for column type hints and search fields.
Sourcepub async fn aggregate_filtered(
&self,
spec: &AggregateSpec,
filters: Option<&HashMap<String, String>>,
) -> Result<AggregateResult, Error>
pub async fn aggregate_filtered( &self, spec: &AggregateSpec, filters: Option<&HashMap<String, String>>, ) -> Result<AggregateResult, Error>
Group and reduce active entities, skipping the soft-deleted.
Sourcepub async fn list_paginated_filtered_scoped(
&self,
pagination: PaginationParams,
filters: Option<&HashMap<String, String>>,
company: Option<Uuid>,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_paginated_filtered_scoped( &self, pagination: PaginationParams, filters: Option<&HashMap<String, String>>, company: Option<Uuid>, ) -> Result<PaginatedResult<T>, Error>
Paginate active entities, fenced to company.
The company-scoped counterpart of Self::list_paginated_filtered and the one any
client-reachable read should use. Fails closed: a fenced entity with no company
returns MissingCompanyScope rather than every company’s rows.
The fence is ANDed into the same __base_condition the soft-delete guard uses, so
it lands in SQL — which is what keeps total honest. A post-filter in the handler
would fetch limit rows and return the survivors, leaving callers unable to tell
“end of data” from “filtered”, and could not fix COUNT at all.
Sourcepub async fn list_deleted_filtered_scoped(
&self,
pagination: PaginationParams,
filters: Option<&HashMap<String, String>>,
company: Option<Uuid>,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_deleted_filtered_scoped( &self, pagination: PaginationParams, filters: Option<&HashMap<String, String>>, company: Option<Uuid>, ) -> Result<PaginatedResult<T>, Error>
Paginate soft-deleted entities, fenced to company.
/trash is the worse leak of the two: it serves rows whose owners were told the
data is gone. Same fence, same fail-closed contract.
Sourcepub async fn list_deleted_filtered(
&self,
pagination: PaginationParams,
filters: Option<&HashMap<String, String>>,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_deleted_filtered( &self, pagination: PaginationParams, filters: Option<&HashMap<String, String>>, ) -> Result<PaginatedResult<T>, Error>
Paginate soft-deleted entities with filter support.
Sourcepub async fn find_by_id(&self, id: &str) -> Result<Option<T>, Error>
pub async fn find_by_id(&self, id: &str) -> Result<Option<T>, Error>
Find an active (non-deleted) entity by primary key.
Sourcepub async fn find_all(&self) -> Result<Vec<T>, Error>
pub async fn find_all(&self) -> Result<Vec<T>, Error>
Return all active (non-deleted) entities.
Sourcepub async fn update(&self, id: &str, entity: &T) -> Result<Option<T>, Error>
pub async fn update(&self, id: &str, entity: &T) -> Result<Option<T>, Error>
Full update — skips silently if the record is already soft-deleted.
Sourcepub async fn delete(&self, id: &str) -> Result<bool, Error>
pub async fn delete(&self, id: &str) -> Result<bool, Error>
Soft-delete an entity (sets metadata.deleted_at).
Sourcepub async fn exists(&self, id: &str) -> Result<bool, Error>
pub async fn exists(&self, id: &str) -> Result<bool, Error>
Return true if an active entity with the given ID exists.
Sourcepub async fn list_paginated(
&self,
pagination: PaginationParams,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_paginated( &self, pagination: PaginationParams, ) -> Result<PaginatedResult<T>, Error>
Paginate active entities (most-recent-first by ID).
Sourcepub async fn soft_delete(&self, id: &str) -> Result<bool, Error>
pub async fn soft_delete(&self, id: &str) -> Result<bool, Error>
Set metadata.deleted_at to NOW() (soft delete).
Sourcepub async fn restore(&self, id: &str) -> Result<Option<T>, Error>
pub async fn restore(&self, id: &str) -> Result<Option<T>, Error>
Remove deleted_at from metadata, restoring the entity.
Sourcepub async fn list_deleted(
&self,
pagination: PaginationParams,
) -> Result<PaginatedResult<T>, Error>
pub async fn list_deleted( &self, pagination: PaginationParams, ) -> Result<PaginatedResult<T>, Error>
Paginate soft-deleted entities (trash view).
Sourcepub async fn empty_trash(&self) -> Result<u64, Error>
pub async fn empty_trash(&self) -> Result<u64, Error>
Permanently delete all soft-deleted rows (empty trash).
Sourcepub async fn find_deleted_by_id(&self, id: &str) -> Result<Option<T>, Error>
pub async fn find_deleted_by_id(&self, id: &str) -> Result<Option<T>, Error>
Find a soft-deleted entity by primary key.
Sourcepub async fn permanent_delete(&self, id: &str) -> Result<bool, Error>
pub async fn permanent_delete(&self, id: &str) -> Result<bool, Error>
Permanently delete a soft-deleted entity by primary key.
Sourcepub async fn count_active(&self) -> Result<u64, Error>
pub async fn count_active(&self) -> Result<u64, Error>
Count active (non-deleted) entities.
Sourcepub async fn count_deleted(&self) -> Result<u64, Error>
pub async fn count_deleted(&self) -> Result<u64, Error>
Count soft-deleted entities.
Sourcepub async fn bulk_soft_delete(&self, ids: &[String]) -> Result<u64, Error>
pub async fn bulk_soft_delete(&self, ids: &[String]) -> Result<u64, Error>
Soft-delete many active rows atomically.
Sourcepub async fn bulk_restore(&self, ids: &[String]) -> Result<Vec<T>, Error>
pub async fn bulk_restore(&self, ids: &[String]) -> Result<Vec<T>, Error>
Restore many soft-deleted rows atomically, returning the restored rows.
Sourcepub async fn bulk_permanent_delete(&self, ids: &[String]) -> Result<u64, Error>
pub async fn bulk_permanent_delete(&self, ids: &[String]) -> Result<u64, Error>
Permanently delete many soft-deleted rows atomically.
Sourcepub async fn restore_all(&self) -> Result<Vec<T>, Error>
pub async fn restore_all(&self) -> Result<Vec<T>, Error>
Restore every soft-deleted row, returning the restored rows. A single
UPDATE ... RETURNING is atomic, and the returned rows let the service
layer emit a Restored event per entity.
Trait Implementations§
Source§impl CrudRepository<StockMove> for StockMoveRepository
impl CrudRepository<StockMove> for StockMoveRepository
?include= relations: fetch rows from table by id list, as JSON
(raw row_to_json). table comes from EntityRepoMeta::relations()
(generator-emitted), never client input. Default: no expansion. The
Postgres-backed generated repos override this via impl_crud_repository!.Source§fn create<'life0, 'async_trait>(
&'life0 self,
entity: StockMove,
) -> Pin<Box<dyn Future<Output = Result<StockMove, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
entity: StockMove,
) -> Pin<Box<dyn Future<Output = Result<StockMove, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn find_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn find_by_id_including_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_id_including_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update<'life0, 'async_trait>(
&'life0 self,
entity: StockMove,
) -> Pin<Box<dyn Future<Output = Result<StockMove, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
entity: StockMove,
) -> Pin<Box<dyn Future<Output = Result<StockMove, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn soft_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn soft_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn hard_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn hard_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn list<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_filtered<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
filters: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_filtered<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
filters: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_filtered_with_info<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
filters: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, PaginationInfo), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_filtered_with_info<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
filters: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, PaginationInfo), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
list_filtered, carrying the pagination info (cursor positions
included) so the HTTP layer can surface keyset paging. Default: the
tuple form with the cursor fields absent; the generated Postgres
repositories override this with the real keyset walk.Source§fn table_name(&self) -> Option<&str>
fn table_name(&self) -> Option<&str>
list_filtered. Read morefn aggregate_filtered<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 AggregateSpec,
filters: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<AggregateResult, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn list_deleted<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_deleted<'life0, 'async_trait>(
&'life0 self,
page: u32,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<(Vec<StockMove>, u64), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn count_deleted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_deleted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn bulk_create<'life0, 'async_trait>(
&'life0 self,
entities: Vec<StockMove>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bulk_create<'life0, 'async_trait>(
&'life0 self,
entities: Vec<StockMove>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn empty_trash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn empty_trash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn bulk_soft_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bulk_soft_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn bulk_restore<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bulk_restore<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn bulk_hard_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bulk_hard_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn restore_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<StockMove>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for StockMoveRepository
impl !UnwindSafe for StockMoveRepository
impl Freeze for StockMoveRepository
impl Send for StockMoveRepository
impl Sync for StockMoveRepository
impl Unpin for StockMoveRepository
impl UnsafeUnpin for StockMoveRepository
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more