default: {
    checkIfCourseTopicRelationExists(
        courseId: number,
        topicId: number,
    ): Promise<RowDataPacket[]>;
    insertCourseTopic(
        courseId: number,
        topicId: number,
    ): Promise<[QueryResult, FieldPacket[]]>;
} = ...

Type declaration

  • checkIfCourseTopicRelationExists:function
    • Checks if a course-topic relation exists.

      Parameters

      • courseId: number

        The ID of the course.

      • topicId: number

        The ID of the topic.

      Returns Promise<RowDataPacket[]>

      A promise that resolves to the existing course-topic relation, if found.

  • insertCourseTopic:function
    • Inserts a new course-topic relation.

      Parameters

      • courseId: number

        The ID of the course.

      • topicId: number

        The ID of the topic.

      Returns Promise<[QueryResult, FieldPacket[]]>

      A promise that resolves to the result of the insertion.