Skip to content

Commit

Permalink
Merge pull request #15 from web-ridge/int-64
Browse files Browse the repository at this point in the history
merge @prOOrc PR
  • Loading branch information
RichardLindhout authored Jan 18, 2024
2 parents 367e32d + 0690dc5 commit 7e3cd26
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions boilergql/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,3 +724,21 @@ func NullDotInt64ToPointerInt(v null.Int64) *int {
func Uint64ToString(v uint64) string {
return IntToString(int(v))
}

func IntToInt64(v int) int64 {
return int64(v)
}

func PointerIntToInt64(v *int) int64 {
if v == nil {
return 0
}
return int64(*v)
}

func PointerIntToNullDotInt64(v *int) null.Int64 {
if v == nil {
return null.Int64FromPtr(nil)
}
return null.Int64From(int64(*v))
}

0 comments on commit 7e3cd26

Please sign in to comment.