helper

package module
v0.0.0-...-5e203e8 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToInt

func BoolToInt(v bool) int

func Float64ToTypesNullDecimal

func Float64ToTypesNullDecimal(v float64) types.NullDecimal

func GetInputFromContext

func GetInputFromContext(ctx context.Context, key string) map[string]interface{}

func GetNestedPreloads

func GetNestedPreloads(ctx *graphql.RequestContext, fields []graphql.CollectedField, prefix string) (preloads []string)

func GetPreloadMods

func GetPreloadMods(ctx context.Context, preloadColumnMap map[string]ColumnSetting) (queryMods []qm.QueryMod)

func GetPreloadModsWithLevel

func GetPreloadModsWithLevel(ctx context.Context, preloadColumnMap map[string]ColumnSetting, level string) (queryMods []qm.QueryMod)

func GetPreloadString

func GetPreloadString(prefix, name string) string

func GetPreloadsFromContext

func GetPreloadsFromContext(ctx context.Context, level string) []string

func IDToBoiler

func IDToBoiler(ID string) uint

func IDToGraphQL

func IDToGraphQL(id uint, tableName string) string

func IDToNullBoiler

func IDToNullBoiler(ID string) null.Uint

func IDsToBoiler

func IDsToBoiler(ids []string) []uint

func IDsToBoilerInterfaces

func IDsToBoilerInterfaces(ids []string) []interface{}

func IDsToGraphQL

func IDsToGraphQL(ids []uint, tableName string) []string

func Int8ToInt

func Int8ToInt(v int8) int

func IntIsFilled

func IntIsFilled(v int) bool

func IntToBool

func IntToBool(v int) bool

func IntToInt8

func IntToInt8(v int) int8

func IntToTimeTime

func IntToTimeTime(v int) time.Time

func IntToUint

func IntToUint(v int) uint

func IntsToInterfaces

func IntsToInterfaces(ints []int) []interface{}

func NullDotBoolToPointerBool

func NullDotBoolToPointerBool(v null.Bool) *bool

func NullDotBoolToPointerInt

func NullDotBoolToPointerInt(v null.Bool) *int

func NullDotFloat64ToPointerFloat64

func NullDotFloat64ToPointerFloat64(v null.Float64) *float64

func NullDotIntIsFilled

func NullDotIntIsFilled(v null.Int) bool

func NullDotIntToPointerInt

func NullDotIntToPointerInt(v null.Int) *int

func NullDotIntToUint

func NullDotIntToUint(v null.Int) uint

func NullDotStringToPointerString

func NullDotStringToPointerString(v null.String) *string

func NullDotStringToString

func NullDotStringToString(v null.String) string

func NullDotTimeToPointerInt

func NullDotTimeToPointerInt(v null.Time) *int

func NullDotUintIsFilled

func NullDotUintIsFilled(v null.Uint) bool

func NullDotUintToPointerInt

func NullDotUintToPointerInt(v null.Uint) *int

func NullDotUintToUint

func NullDotUintToUint(v null.Uint) uint

func PointerBoolToNullDotBool

func PointerBoolToNullDotBool(v *bool) null.Bool

func PointerFloat64ToNullDotFloat64

func PointerFloat64ToNullDotFloat64(v *float64) null.Float64

func PointerIntToInt

func PointerIntToInt(v *int) int

func PointerIntToNullDotBool

func PointerIntToNullDotBool(v *int) null.Bool

func PointerIntToNullDotInt

func PointerIntToNullDotInt(v *int) null.Int

func PointerIntToNullDotTime

func PointerIntToNullDotTime(v *int) null.Time

func PointerIntToNullDotUint

func PointerIntToNullDotUint(v *int) null.Uint

func PointerStringToNullDotString

func PointerStringToNullDotString(v *string) null.String

func PointerStringToString

func PointerStringToString(v *string) string

func PointerStringToTypesNullDecimal

func PointerStringToTypesNullDecimal(v *string) types.NullDecimal

func PreloadsContain

func PreloadsContain(a []string, v string) bool

func PreloadsContainMoreThanId

func PreloadsContainMoreThanId(a []string, v string) bool

func RemovedIDsToUint

func RemovedIDsToUint(removedIds []RemovedID) []uint

func StringToNullDotString

func StringToNullDotString(v string) null.String

func StripPreloads

func StripPreloads(preloads []string, prefix string) []string

e.g. sometimes input is deeper and we want createdFlowBlock.block.blockChoice => when we fetch block in database we want to strip flowBlock

func TimeTimeToInt

func TimeTimeToInt(v time.Time) int

func TypesNullDecimalToFloat64

func TypesNullDecimalToFloat64(v types.NullDecimal) float64

func TypesNullDecimalToPointerString

func TypesNullDecimalToPointerString(v types.NullDecimal) *string

func UintIsFilled

func UintIsFilled(v uint) bool

func UintToInt

func UintToInt(v uint) int

Types

type ColumnSetting

type ColumnSetting struct {
	Name        string
	IDAvailable bool // ID is available without preloading
}

type RemovedID

type RemovedID struct {
	ID uint
}

Jump to

Keyboard shortcuts

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