From 295a098eb4e5fa0ec81c48aa9d563b0bce260c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sun, 14 Jan 2024 17:06:42 +0100 Subject: [PATCH] v0.0.377 fix sq.ConverterBoolToBit --- go.mod | 2 +- go.sum | 2 ++ goextVersion.go | 4 ++-- sq/converter.go | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 766dd27..c9db924 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.16.0 // indirect + github.com/go-playground/validator/v10 v10.17.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.5.0 // indirect diff --git a/go.sum b/go.sum index 1b208d1..377d8e4 100644 --- a/go.sum +++ b/go.sum @@ -31,6 +31,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= +github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= diff --git a/goextVersion.go b/goextVersion.go index 1adcfa5..b636733 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.376" +const GoextVersion = "0.0.377" -const GoextVersionTimestamp = "2024-01-14T01:52:52+0100" +const GoextVersionTimestamp = "2024-01-14T17:06:42+0100" diff --git a/sq/converter.go b/sq/converter.go index dea7cc6..942948a 100644 --- a/sq/converter.go +++ b/sq/converter.go @@ -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 }