Skip to content

Commit

Permalink
Bug: turn deterministic off (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Pastro committed Jun 8, 2023
1 parent b371db9 commit 9d979e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ $ make
$ sqlite3
> .load uuidv7.so
> select uuid_generate_v7();
018898f3-3067-703b-8292-e2def527c6b4
> select quote(uuid_generate_v7_bytes());
X'018898F33745703BA7618E0C33AECF3E'
01889914-efa9-7ec3-997b-c2b1de310c56
> select hex(uuid_generate_v7_bytes());
0188991513087EC3B78D3FD9361C5B32
> .quit
```
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
type v7String struct{}

func (*v7String) Args() int { return 0 }
func (*v7String) Deterministic() bool { return true }
func (*v7String) Deterministic() bool { return false }
func (*v7String) Apply(ctx *sqlite.Context, values ...sqlite.Value) {
u, err := uuid.NewV7()
if err != nil {
Expand All @@ -24,7 +24,7 @@ func (*v7String) Apply(ctx *sqlite.Context, values ...sqlite.Value) {
type v7Byte struct{}

func (*v7Byte) Args() int { return 0 }
func (*v7Byte) Deterministic() bool { return true }
func (*v7Byte) Deterministic() bool { return false }
func (*v7Byte) Apply(ctx *sqlite.Context, values ...sqlite.Value) {
u, err := uuid.NewV7()
if err != nil {
Expand Down

0 comments on commit 9d979e1

Please sign in to comment.