ProjectsModule · library/model/src/repos/model-promotions.ts:14

ModelPromotionsRepo

component

No JSDoc comment in source yet.

API

@Component()
export class ModelPromotionsRepo implements ModelPromotions {
  @Use() private readonly db!: Db;
  get(projectId: string, provider: string, modelId: string): number | undefined;
  list(projectId: string): ModelPromotion[];
  replaceAll(projectId: string, rows: readonly ModelPromotion[]): void;
  replaceProvider(projectId: string, provider: string, rows: readonly ModelPromotion[]): void;
}

Dependencies & Wiring

Extracted from class decorators
implementsinterfaces
@Userequires (1)
db: Db

Methods (4)

get

get(projectId: string, provider: string, modelId: string): number | undefined
@paramprojectIdstring
@paramproviderstring
@parammodelIdstring
@returnsnumber | undefined

list

list(projectId: string): ModelPromotion[]
@paramprojectIdstring
@returnsModelPromotion[]

replaceAll

replaceAll(projectId: string, rows: readonly ModelPromotion[]): void
@paramprojectIdstring
@paramrowsreadonly ModelPromotion[]
@returnsvoid

replaceProvider

replaceProvider(projectId: string, provider: string, rows: readonly ModelPromotion[]): void
@paramprojectIdstring
@paramproviderstring
@paramrowsreadonly ModelPromotion[]
@returnsvoid