Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/role

Index

Functions

  • createRole(name: string): Promise<role>
  • deleteRole(roleId: number): Promise<role>
  • Parameters

    • roleId: number

      the role we are deleting from the role-table

    Returns Promise<role>

    a promise with the deleted record inside

  • deleteRoleByName(name: string): Promise<role>
  • Parameters

    • name: string

      the name of the role we are deleting from the role-table

    Returns Promise<role>

    a promise with the deleted record inside

  • getAllRoles(): Promise<role[]>
  • getProjectRoleWithRoleName(name: string, projectId: number): Promise<null | project_role>
  • Parameters

    • name: string

      the name of the role

    • projectId: number

    Returns Promise<null | project_role>

    the project_role or an error from the database

  • getRole(roleId: number): Promise<null | role>
  • returns:

    object with the name of the role

    Parameters

    • roleId: number

    Returns Promise<null | role>

  • getRolesByName(name: string): Promise<null | role>
  • returns:

    all the role objects with a matching name

    Parameters

    • name: string

    Returns Promise<null | role>

Generated using TypeDoc