Repo/db fn name refactor.
This commit is contained in:
@@ -46,7 +46,7 @@ pub async fn list<'e, E>(executor: E, query: Query) -> Result<Vec<Transaction>,
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
let transactions = db::query(executor, query.try_into()?)
|
||||
let transactions = db::list(executor, query.try_into()?)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(decode)
|
||||
@@ -55,7 +55,7 @@ where
|
||||
Ok(transactions)
|
||||
}
|
||||
|
||||
pub async fn get<'e, E>(executor: E, id: Uuid) -> Result<Option<Transaction>, RepositoryError>
|
||||
pub async fn get_by_id<'e, E>(executor: E, id: Uuid) -> Result<Option<Transaction>, RepositoryError>
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
@@ -93,7 +93,7 @@ fn classify_upsert_error(error: DatabaseError) -> RepositoryError {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn delete<'e, E>(executor: E, id: Uuid) -> Result<Delete, RepositoryError>
|
||||
pub async fn delete_by_id<'e, E>(executor: E, id: Uuid) -> Result<Delete, RepositoryError>
|
||||
where
|
||||
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user