-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: database duplicate key error handling
- Loading branch information
1 parent
d92498d
commit a692846
Showing
38 changed files
with
2,112 additions
and
1,752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
libs/foodfolio-domain/src/lib/repositories/company.repository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
import { Repository } from '@toxictoast/azkaban-base-domain'; | ||
import { CompanyAnemic } from '../anemics'; | ||
import { Chainable } from '@toxictoast/azkaban-base-types'; | ||
|
||
export type CompanyRepository = Repository<CompanyAnemic>; | ||
interface CompanyAdditions { | ||
findByTitle(title: string): Promise<CompanyAnemic>; | ||
} | ||
|
||
export type CompanyRepository = Chainable< | ||
CompanyAdditions, | ||
Repository<CompanyAnemic> | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import { Repository } from '@toxictoast/azkaban-base-domain'; | ||
import { ItemAnemic } from '../anemics'; | ||
import { Chainable } from '@toxictoast/azkaban-base-types'; | ||
|
||
export type ItemRepository = Repository<ItemAnemic>; | ||
interface ItemAdditions { | ||
findByTitle(title: string): Promise<ItemAnemic>; | ||
} | ||
|
||
export type ItemRepository = Chainable<ItemAdditions, Repository<ItemAnemic>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import { Repository } from '@toxictoast/azkaban-base-domain'; | ||
import { SizeAnemic } from '../anemics'; | ||
import { Chainable } from '@toxictoast/azkaban-base-types'; | ||
|
||
export type SizeRepository = Repository<SizeAnemic>; | ||
interface SizeAdditions { | ||
findByTitle(title: string): Promise<SizeAnemic>; | ||
} | ||
|
||
export type SizeRepository = Chainable<SizeAdditions, Repository<SizeAnemic>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import { Repository } from '@toxictoast/azkaban-base-domain'; | ||
import { TypeAnemic } from '../anemics'; | ||
import { Chainable } from '@toxictoast/azkaban-base-types'; | ||
|
||
export type TypeRepository = Repository<TypeAnemic>; | ||
interface TypeAdditions { | ||
findByTitle(title: string): Promise<TypeAnemic>; | ||
} | ||
|
||
export type TypeRepository = Chainable<TypeAdditions, Repository<TypeAnemic>>; |
10 changes: 9 additions & 1 deletion
10
libs/foodfolio-domain/src/lib/repositories/warehouse.repository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
import { Repository } from '@toxictoast/azkaban-base-domain'; | ||
import { WarehouseAnemic } from '../anemics'; | ||
import { Chainable } from '@toxictoast/azkaban-base-types'; | ||
|
||
export type WarehouseRepository = Repository<WarehouseAnemic>; | ||
interface WarehouseAdditions { | ||
findByTitle(title: string): Promise<WarehouseAnemic>; | ||
} | ||
|
||
export type WarehouseRepository = Chainable< | ||
WarehouseAdditions, | ||
Repository<WarehouseAnemic> | ||
>; |
Oops, something went wrong.