mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:07:32 +00:00
fix(eventstore): use decimal, correct mirror (#9905)
back port #9812, #9878, #9881, #9884 --------- Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"reflect"
|
||||
|
||||
pgxdecimal "github.com/jackc/pgx-shopspring-decimal"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
@@ -23,7 +24,12 @@ type ConnectionConfig struct {
|
||||
AfterRelease []func(c *pgx.Conn) error
|
||||
}
|
||||
|
||||
var afterConnectFuncs []func(ctx context.Context, c *pgx.Conn) error
|
||||
var afterConnectFuncs = []func(ctx context.Context, c *pgx.Conn) error{
|
||||
func(ctx context.Context, c *pgx.Conn) error {
|
||||
pgxdecimal.Register(c.TypeMap())
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
func RegisterAfterConnect(f func(ctx context.Context, c *pgx.Conn) error) {
|
||||
afterConnectFuncs = append(afterConnectFuncs, f)
|
||||
|
Reference in New Issue
Block a user