Documentation ¶
Index ¶
- func BuildQuery(tableName string, db *gorm.DB, query *types.Query) *gorm.DB
- func ChangeTypeToTypePointer[T comparable](typ T) *T
- func CheckSliceContain[T comparable](s []T, e T) bool
- func CountOffsetPagination(page, limit int) int
- func CountTotalPagePagination(countDataPerPage, totalData int) int
- func DefinePageLimitPagination(page, limit int) (pagePagination int, limitPagination int)
- func GenerateSQLGroupQueryString(tableAlias string, groups []types.GroupOperation) string
- func GenerateSQLOrderQueryString(tableAlias string, orders []types.OrderOperation) string
- func GenerateSQLSelectQuerySlice(tableAlias string, selects []types.SelectOperation) []string
- func GenerateSQLWhereQueryStringAndBindValues(tableAlias string, searches [][]types.SearchOperation) (string, []any)
- func GetMapKeys[K comparable, V any](m map[K]V) []K
- func GetMapValues[K comparable, V any](m map[K]V) []V
- func JSONMarshal(v any) (string, error)
- func JSONUnmarshal(s string, v any) error
- func MergeSlices[T comparable](withUnique bool, slices ...[]T) []T
- func MergeStructs[T comparable](withOverride bool, structs ...T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTypeToTypePointer ¶
func ChangeTypeToTypePointer[T comparable](typ T) *T
func CheckSliceContain ¶
func CheckSliceContain[T comparable](s []T, e T) bool
func CountOffsetPagination ¶
func GenerateSQLGroupQueryString ¶
func GenerateSQLGroupQueryString(tableAlias string, groups []types.GroupOperation) string
func GenerateSQLOrderQueryString ¶
func GenerateSQLOrderQueryString(tableAlias string, orders []types.OrderOperation) string
func GenerateSQLSelectQuerySlice ¶
func GenerateSQLSelectQuerySlice(tableAlias string, selects []types.SelectOperation) []string
func GenerateSQLWhereQueryStringAndBindValues ¶
func GenerateSQLWhereQueryStringAndBindValues(tableAlias string, searches [][]types.SearchOperation) (string, []any)
func GetMapKeys ¶
func GetMapKeys[K comparable, V any](m map[K]V) []K
func GetMapValues ¶
func GetMapValues[K comparable, V any](m map[K]V) []V
func JSONMarshal ¶
func JSONUnmarshal ¶
func MergeSlices ¶
func MergeSlices[T comparable](withUnique bool, slices ...[]T) []T
func MergeStructs ¶
func MergeStructs[T comparable](withOverride bool, structs ...T) T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.