Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oryx/networkx/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ func (p Network) TableName() string {

func NewNetwork() *Network {
return &Network{
ID: uuid.Must(uuid.NewV4()),
ID: uuid.Must(uuid.NewV7()),
}
}
2 changes: 1 addition & 1 deletion oryx/sqlxx/batch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func buildInsertQueryValues[T any](dialect string, mapper *reflectx.Mapper, colu
continue // break switch, not for
}

id, err := uuid.NewV4()
id, err := uuid.NewV7()
if err != nil {
return nil, err
}
Expand Down
4 changes: 4 additions & 0 deletions oryx/uuidx/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ import "github.com/gofrs/uuid"
func NewV4() uuid.UUID {
return uuid.Must(uuid.NewV4())
}

func NewV7() uuid.UUID {
return uuid.Must(uuid.NewV7())
}
2 changes: 1 addition & 1 deletion persistence/sql/batch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func buildInsertQueryValues[T any](columns []string, models []*T, opts *createOp
continue // break switch, not for
}

id, err := uuid.NewV4()
id, err := uuid.NewV7()
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion persistence/sql/identity/persister_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (p *IdentityPersister) createIdentityCredentials(ctx context.Context, ident
return err
}

cred.ID, err = uuid.NewV4()
cred.ID, err = uuid.NewV7()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion persistence/sql/persister_courier.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (p *Persister) RecordDispatch(ctx context.Context, msgID uuid.UUID, status
defer otelx.End(span, &err)

dispatch := courier.MessageDispatch{
ID: uuidx.NewV4(),
ID: uuidx.NewV7(),
MessageID: msgID,
Status: status,
NID: p.NetworkID(ctx),
Expand Down
2 changes: 1 addition & 1 deletion x/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var EmptyUUID uuid.UUID

func NewUUID() uuid.UUID {
return uuid.Must(uuid.NewV4())
return uuid.Must(uuid.NewV7())
}

func ParseUUID(in string) uuid.UUID {
Expand Down
Loading