v0.0.377 fix sq.ConverterBoolToBit
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m12s

This commit is contained in:
2024-01-14 17:06:42 +01:00
parent b69a082bb1
commit 295a098eb4
4 changed files with 8 additions and 6 deletions

View File

@@ -18,9 +18,9 @@ type DBTypeConverter interface {
DBToModel(v any) (any, error)
}
var ConverterBoolToBit = NewDBTypeConverter[bool, int](func(v bool) (int, error) {
return langext.Conditional(v, 1, 0), nil
}, func(v int) (bool, error) {
var ConverterBoolToBit = NewDBTypeConverter[bool, int64](func(v bool) (int64, error) {
return langext.Conditional(v, int64(1), int64(0)), nil
}, func(v int64) (bool, error) {
if v == 0 {
return false, nil
}