default: {
    closeLecture(lectureid: string): Promise<unknown>;
    getStudentsInLecture(
        lectureid: number,
    ): Promise<undefined | RowDataPacket[]>;
    insertIntoLecture(
        topicname: string,
        coursecode: string,
        start_date: string,
        end_date: string,
        timeofday: "am" | "pm",
        state: "open" | "closed",
        teacherid: undefined | number,
    ): Promise<undefined | { lectureid: number }>;
} = ...

Type declaration

  • closeLecture:function
    • Closes a lecture.

      Parameters

      • lectureid: string

        The ID of the lecture to close.

      Returns Promise<unknown>

      A promise that resolves to the result of the lecture closing operation.

  • getStudentsInLecture:function
    • Gets the students in a lecture.

      Parameters

      • lectureid: number

        The ID of the lecture.

      Returns Promise<undefined | RowDataPacket[]>

      An array of students in the lecture.

  • insertIntoLecture:function
    • Inserts a new lecture into the database.

      Parameters

      • topicname: string

        The name of the topic.

      • coursecode: string

        The code of the course.

      • start_date: string

        The start date of the lecture in ISO 8601 or MySQL format.

      • end_date: string

        The end date of the lecture in ISO 8601 or MySQL format.

      • timeofday: "am" | "pm"

        The time of day of the lecture.

      • state: "open" | "closed"

        The state of the lecture.

      • teacherid: undefined | number

        The ID of the teacher.

      Returns Promise<undefined | { lectureid: number }>

      The ID of the inserted lecture, or undefined if the insertion failed.