repository

package
v0.0.0-...-487d63a Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(columnMapping map[string]string, filters map[string][]string, dateRangeFilters []domain.DateRangeFilter, searchText string, searchColumns []string) func(db *gorm.DB) *gorm.DB

func ComplementSearch

func ComplementSearch(r *Repository, sortBy string, sortDirection string, limit int64,
	offset int64, filters map[string][]string, dateRangeFilters []domain.DateRangeFilter,
	searchText string, searchColumns []string, columnMapping map[string]string) (query *gorm.DB, err error)

func IsZeroValue

func IsZeroValue(value any) bool

func UpdateFilterKeys

func UpdateFilterKeys(filters map[string][]string, columnMapping map[string]string) map[string][]string

Types

type Repository

type Repository struct {
	DB *gorm.DB
}

Repository is a struct that contains the database implementation for user entity

Directories

Path Synopsis
Package config provides the database connection
Package config provides the database connection
Package medicine contains the repository implementation for the medicine entity
Package medicine contains the repository implementation for the medicine entity
Package user contains the business logic for the user entity
Package user contains the business logic for the user entity

Jump to

Keyboard shortcuts

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