Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/osoc

Index

Functions

  • createOsoc(year: number): Promise<osoc>
  • deleteOsoc(osocId: number): Promise<osoc>
  • Parameters

    • osocId: number

      the osoc edition we are deleting from the osoc-table

    Returns Promise<osoc>

    the deleted osoc record

  • deleteOsocByYear(year: number): Promise<osoc>
  • Parameters

    • year: number

      the year we are deleting from the osoc-table

    Returns Promise<osoc>

    the deleted osoc record

  • deleteOsocFromDB(osocId: number): Promise<void>
  • filterOsocs(pagination: DBPagination, yearFilter: FilterNumber, yearSort: FilterSort, userId: number): Promise<{ data: (osoc & { _count: { project: number } })[]; pagination: { count: number; page: number } }>
  • Parameters

    • pagination: DBPagination
    • yearFilter: FilterNumber

      year that we are filtering on (or undefined if not filtering on year)

    • yearSort: FilterSort

      asc or desc if we are sorting on year, undefined if we are not sorting on year

    • userId: number

      the userId of the user that is searching

    Returns Promise<{ data: (osoc & { _count: { project: number } })[]; pagination: { count: number; page: number } }>

    the filtered osoc editions with their project count in a promise

  • getAllOsoc(): Promise<(osoc & { _count: { project: number } })[]>
  • Returns Promise<(osoc & { _count: { project: number } })[]>

    a list of all the osoc objects in the database

  • getLatestOsoc(): Promise<null | osoc>
  • getNewestOsoc(): Promise<null | osoc>
  • getOsocAfterYear(year: number): Promise<osoc[]>
  • returns:

    all the osoc objects that took place after the supplied year

    Parameters

    • year: number

    Returns Promise<osoc[]>

  • getOsocBeforeYear(year: number): Promise<osoc[]>
  • returns:

    all the osoc objects that took place before the supplied year

    Parameters

    • year: number

    Returns Promise<osoc[]>

  • getOsocById(osocId: number): Promise<null | osoc>
  • getOsocByYear(year: number): Promise<null | osoc>

Generated using TypeDoc