database

package
v0.0.0-...-3b4fc3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatrixRepository

type MatrixRepository struct {
	// contains filtered or unexported fields
}

func NewMatrixRepository

func NewMatrixRepository(db *sqlx.DB) (MatrixRepository, error)

NewMatrixRepository creates the matrix MatrixRepository.

func (MatrixRepository) AddSubject

func (r MatrixRepository) AddSubject(ms *domain.MatrixSubject) error

AddSubject adds the subject to the matrix.

func (MatrixRepository) CourseMatrix

func (r MatrixRepository) CourseMatrix(courseUUID uuid.UUID, matrixUUID uuid.UUID) (domain.Matrix, error)

func (MatrixRepository) CreateMatrix

func (r MatrixRepository) CreateMatrix(m *domain.Matrix) error

CreateMatrix create a new matrix.

func (MatrixRepository) DeleteMatrix

func (r MatrixRepository) DeleteMatrix(id uuid.UUID) error

DeleteMatrix delete the given matrix by uuid.

func (MatrixRepository) Matrices

func (r MatrixRepository) Matrices() ([]domain.Matrix, error)

Matrices get the list of matrices.

func (MatrixRepository) Matrix

func (r MatrixRepository) Matrix(id uuid.UUID) (domain.Matrix, error)

Matrix get the matrix by given id.

func (MatrixRepository) RemoveSubject

func (r MatrixRepository) RemoveSubject(matrixID, subjectID uuid.UUID) error

RemoveSubject removes the subject from the matrix.

func (MatrixRepository) UpdateMatrix

func (r MatrixRepository) UpdateMatrix(m *domain.Matrix) error

UpdateMatrix updates the given matrix.

type SubjectRepository

type SubjectRepository struct {
	// contains filtered or unexported fields
}

func NewSubjectRepository

func NewSubjectRepository(db *sqlx.DB) (SubjectRepository, error)

NewSubjectRepository creates the subject SubjectRepository.

func (SubjectRepository) CreateSubject

func (r SubjectRepository) CreateSubject(sub *domain.Subject) error

func (SubjectRepository) DeleteSubject

func (r SubjectRepository) DeleteSubject(id uuid.UUID) error

func (SubjectRepository) Subject

func (r SubjectRepository) Subject(id uuid.UUID) (domain.Subject, error)

func (SubjectRepository) Subjects

func (r SubjectRepository) Subjects() ([]domain.Subject, error)

func (SubjectRepository) UpdateSubject

func (r SubjectRepository) UpdateSubject(sub *domain.Subject) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL