support GetUint64
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
This commit is contained in:
parent
af20211629
commit
31069ae4f2
13
vendor/github.com/outbrain/golib/sqlutils/sqlutils.go
generated
vendored
13
vendor/github.com/outbrain/golib/sqlutils/sqlutils.go
generated
vendored
@ -117,6 +117,19 @@ func (this *RowMap) GetUintD(key string, def uint) uint {
|
||||
return uint(res)
|
||||
}
|
||||
|
||||
func (this *RowMap) GetUint64(key string) uint64 {
|
||||
res, _ := strconv.ParseUint(this.GetString(key), 10, 0)
|
||||
return res
|
||||
}
|
||||
|
||||
func (this *RowMap) GetUint64D(key string, def uint64) uint64 {
|
||||
res, err := strconv.ParseUint(this.GetString(key), 10, 0)
|
||||
if err != nil {
|
||||
return def
|
||||
}
|
||||
return uint64(res)
|
||||
}
|
||||
|
||||
func (this *RowMap) GetBool(key string) bool {
|
||||
return this.GetInt(key) != 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user