mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:57:32 +00:00
(cherry picked from commit aeb379e7de
)
This commit is contained in:

committed by
Livio Spring

parent
f0ce5d537c
commit
6bd706be98
@@ -7,8 +7,6 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/zerrors"
|
||||
@@ -16,7 +14,7 @@ import (
|
||||
|
||||
type state struct {
|
||||
instanceID string
|
||||
position decimal.Decimal
|
||||
position float64
|
||||
eventTimestamp time.Time
|
||||
aggregateType eventstore.AggregateType
|
||||
aggregateID string
|
||||
@@ -47,7 +45,7 @@ func (h *Handler) currentState(ctx context.Context, tx *sql.Tx, config *triggerC
|
||||
aggregateType = new(sql.NullString)
|
||||
sequence = new(sql.NullInt64)
|
||||
timestamp = new(sql.NullTime)
|
||||
position = new(decimal.NullDecimal)
|
||||
position = new(sql.NullFloat64)
|
||||
offset = new(sql.NullInt64)
|
||||
)
|
||||
|
||||
@@ -77,7 +75,7 @@ func (h *Handler) currentState(ctx context.Context, tx *sql.Tx, config *triggerC
|
||||
currentState.aggregateType = eventstore.AggregateType(aggregateType.String)
|
||||
currentState.sequence = uint64(sequence.Int64)
|
||||
currentState.eventTimestamp = timestamp.Time
|
||||
currentState.position = position.Decimal
|
||||
currentState.position = position.Float64
|
||||
// psql does not provide unsigned numbers so we work around it
|
||||
currentState.offset = uint32(offset.Int64)
|
||||
return currentState, nil
|
||||
|
Reference in New Issue
Block a user