Skip to content

Commit 730d8ef

Browse files
authored
Add PostgreSQLQueue and DelayedPostgreSQL Pub/Sub (#34)
* Added `PostgreSQLQueueSchema` and `PostgreSQLQueueOffsetsAdapter`. * This schema is similar to the original one, except it allows filtering messages with a custom `WHERE` clause. * It doesn't support customer groups. * It allows deleting messages from the table after acking (optional). * Added `NewDelayedPostgreSQLPublisher` and `NewDelayedPostgresSQLSubscriber` * They work on top of the conditional schema and use the `delay` component implemented in ThreeDotsLabs/watermill#469 * The idea is to receive messages with a delay or at a given time in a simple way. * Reworked the `SchemaAdapter` and `OffsetsAdapter` interfaces **(Breaking change -> will bump the major to v4)**. * We had a few instances where some details have been missing from one of the interface methods. It makes it difficult to extend this library with new features, as each will require a major version bump, and we want to avoid it if possible. * To mitigate this, we're moving to a `params` struct passed to the methods instead of raw arguments. It adds some verbosity but allows extending the params if needed with no breaking changes to the library. * The methods now also return errors. * Migration: if you don't use a custom schema/offsets adapter, you don't need to do anything. If you do, change the methods to implement the new interfaces. Use values from the `params` argument and return errors.
1 parent c35e7e4 commit 730d8ef

24 files changed

+1190
-114
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ test_reconnect:
2323

2424
wait:
2525
go run github.com/ThreeDotsLabs/wait-for@latest localhost:3306 localhost:5432
26+
go run ./internal/wait-for
2627

2728
build:
2829
go build ./...

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
mysql:
77
image: mysql:8.0
88
restart: unless-stopped
9-
command: [ "--max_connections=500" ]
9+
command: [ "--max_connections=5000" ]
1010
ports:
1111
- 3306:3306
1212
environment:
@@ -16,7 +16,7 @@ services:
1616
postgres:
1717
image: postgres:15.3
1818
restart: unless-stopped
19-
command: postgres -c 'max_connections=500'
19+
command: postgres -c 'max_connections=5000'
2020
ports:
2121
- 5432:5432
2222
environment:

go.mod

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
module github.com/ThreeDotsLabs/watermill-sql/v3
1+
module github.com/ThreeDotsLabs/watermill-sql/v4
22

3-
go 1.20
3+
go 1.21
4+
5+
toolchain go1.23.0
46

57
require (
6-
github.com/ThreeDotsLabs/watermill v1.2.0
8+
github.com/ThreeDotsLabs/watermill v1.4.0-rc.2
79
github.com/go-sql-driver/mysql v1.4.1
810
github.com/jackc/pgx/v4 v4.18.2
911
github.com/lib/pq v1.10.2
1012
github.com/oklog/ulid v1.3.1
11-
github.com/stretchr/testify v1.8.1
13+
github.com/stretchr/testify v1.9.0
1214
)
1315

1416
require (
17+
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
1518
github.com/davecgh/go-spew v1.1.1 // indirect
16-
github.com/google/uuid v1.3.0 // indirect
19+
github.com/google/uuid v1.6.0 // indirect
1720
github.com/hashicorp/errwrap v1.1.0 // indirect
1821
github.com/hashicorp/go-multierror v1.1.1 // indirect
1922
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
@@ -26,7 +29,7 @@ require (
2629
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
2730
github.com/pkg/errors v0.9.1 // indirect
2831
github.com/pmezard/go-difflib v1.0.0 // indirect
29-
github.com/rogpeppe/go-internal v1.10.0 // indirect
32+
github.com/sony/gobreaker v1.0.0 // indirect
3033
golang.org/x/crypto v0.20.0 // indirect
3134
golang.org/x/text v0.14.0 // indirect
3235
google.golang.org/appengine v1.6.7 // indirect

go.sum

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
22
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
33
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
4-
github.com/ThreeDotsLabs/watermill v1.2.0 h1:TU3TML1dnQ/ifK09F2+4JQk2EKhmhXe7Qv7eb5ZpTS8=
5-
github.com/ThreeDotsLabs/watermill v1.2.0/go.mod h1:IuVxGk/kgCN0cex2S94BLglUiB0PwOm8hbUhm6g2Nx4=
4+
github.com/ThreeDotsLabs/watermill v1.4.0-rc.2 h1:K62uIAKOkCHTXtAwY+Nj95vyLR0y25UMBsbf/FuWCeQ=
5+
github.com/ThreeDotsLabs/watermill v1.4.0-rc.2/go.mod h1:lBnrLbxOjeMRgcJbv+UiZr8Ylz8RkJ4m6i/VN/Nk+to=
6+
github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M=
7+
github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs=
68
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
79
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
810
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
@@ -21,8 +23,8 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
2123
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
2224
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
2325
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
24-
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
25-
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
26+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
27+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
2628
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
2729
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
2830
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -78,12 +80,13 @@ github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv
7880
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
7981
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
8082
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
83+
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
8184
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
82-
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
8385
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
8486
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
85-
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
8687
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
88+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
89+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
8790
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
8891
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
8992
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -104,8 +107,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
104107
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
105108
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
106109
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
107-
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
108-
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
109110
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
110111
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
111112
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
@@ -115,20 +116,18 @@ github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXY
115116
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
116117
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
117118
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
119+
github.com/sony/gobreaker v1.0.0 h1:feX5fGGXSl3dYd4aHZItw+FpHLvvoaqkawKjVNiFMNQ=
120+
github.com/sony/gobreaker v1.0.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
118121
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
119122
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
120123
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
121-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
122-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
123124
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
124125
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
125126
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
126127
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
127128
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
128-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
129-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
130-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
131-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
129+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
130+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
132131
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
133132
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
134133
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

internal/wait-for/main.go

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
package main
2+
3+
import (
4+
stdSQL "database/sql"
5+
"fmt"
6+
"os"
7+
"time"
8+
9+
driver "github.com/go-sql-driver/mysql"
10+
_ "github.com/lib/pq"
11+
)
12+
13+
func main() {
14+
for i := 0; i < 10; i++ {
15+
err := tryConnecting()
16+
if err == nil {
17+
os.Exit(0)
18+
}
19+
20+
time.Sleep(1 * time.Second)
21+
}
22+
23+
fmt.Println("Failed to connect")
24+
os.Exit(1)
25+
}
26+
27+
func tryConnecting() error {
28+
err := connectToMySQL()
29+
if err != nil {
30+
return err
31+
}
32+
33+
err = connectToPostgreSQL()
34+
if err != nil {
35+
return err
36+
}
37+
38+
return nil
39+
}
40+
41+
func connectToMySQL() error {
42+
addr := os.Getenv("WATERMILL_TEST_MYSQL_HOST")
43+
if addr == "" {
44+
addr = "localhost"
45+
}
46+
conf := driver.NewConfig()
47+
conf.Net = "tcp"
48+
conf.User = "root"
49+
conf.Addr = addr
50+
51+
conf.DBName = "watermill"
52+
53+
db, err := stdSQL.Open("mysql", conf.FormatDSN())
54+
if err != nil {
55+
return err
56+
}
57+
58+
err = db.Ping()
59+
if err != nil {
60+
return err
61+
}
62+
63+
return nil
64+
}
65+
66+
func connectToPostgreSQL() error {
67+
addr := os.Getenv("WATERMILL_TEST_POSTGRES_HOST")
68+
if addr == "" {
69+
addr = "localhost"
70+
}
71+
72+
connStr := fmt.Sprintf("postgres://watermill:password@%s/watermill?sslmode=disable", addr)
73+
db, err := stdSQL.Open("postgres", connStr)
74+
if err != nil {
75+
return err
76+
}
77+
78+
err = db.Ping()
79+
if err != nil {
80+
return err
81+
}
82+
83+
return nil
84+
}

pkg/sql/delayed_postgresql.go

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
package sql
2+
3+
import (
4+
"database/sql"
5+
"fmt"
6+
"strings"
7+
8+
"github.com/ThreeDotsLabs/watermill"
9+
"github.com/ThreeDotsLabs/watermill/components/delay"
10+
"github.com/ThreeDotsLabs/watermill/message"
11+
)
12+
13+
type DelayedPostgreSQLPublisherConfig struct {
14+
// DelayPublisherConfig is a configuration for the delay.Publisher.
15+
DelayPublisherConfig delay.PublisherConfig
16+
17+
// OverridePublisherConfig allows overriding the default PublisherConfig.
18+
OverridePublisherConfig func(config *PublisherConfig) error
19+
20+
Logger watermill.LoggerAdapter
21+
}
22+
23+
func (c *DelayedPostgreSQLPublisherConfig) setDefaults() {
24+
if c.Logger == nil {
25+
c.Logger = watermill.NopLogger{}
26+
}
27+
}
28+
29+
// NewDelayedPostgreSQLPublisher creates a new Publisher that stores messages in PostgreSQL with a delay.
30+
// The delay can be set per message with the Watermill's components/delay metadata.
31+
func NewDelayedPostgreSQLPublisher(db *sql.DB, config DelayedPostgreSQLPublisherConfig) (message.Publisher, error) {
32+
config.setDefaults()
33+
34+
publisherConfig := PublisherConfig{
35+
SchemaAdapter: PostgreSQLQueueSchema{},
36+
AutoInitializeSchema: true,
37+
}
38+
39+
if config.OverridePublisherConfig != nil {
40+
err := config.OverridePublisherConfig(&publisherConfig)
41+
if err != nil {
42+
return nil, err
43+
}
44+
}
45+
46+
var publisher message.Publisher
47+
var err error
48+
49+
publisher, err = NewPublisher(db, publisherConfig, config.Logger)
50+
if err != nil {
51+
return nil, err
52+
}
53+
54+
publisher, err = delay.NewPublisher(publisher, config.DelayPublisherConfig)
55+
if err != nil {
56+
return nil, err
57+
}
58+
59+
return publisher, nil
60+
}
61+
62+
type DelayedPostgreSQLSubscriberConfig struct {
63+
// OverrideSubscriberConfig allows overriding the default SubscriberConfig.
64+
OverrideSubscriberConfig func(config *SubscriberConfig) error
65+
66+
// DeleteOnAck deletes the message from the queue when it's acknowledged.
67+
DeleteOnAck bool
68+
69+
// AllowNoDelay allows receiving messages without the delay metadata.
70+
// By default, such messages will be skipped.
71+
// If set to true, messages without delay metadata will be received immediately.
72+
AllowNoDelay bool
73+
74+
Logger watermill.LoggerAdapter
75+
}
76+
77+
func (c *DelayedPostgreSQLSubscriberConfig) setDefaults() {
78+
if c.Logger == nil {
79+
c.Logger = watermill.NopLogger{}
80+
}
81+
}
82+
83+
// NewDelayedPostgreSQLSubscriber creates a new Subscriber that reads messages from PostgreSQL with a delay.
84+
// The delay can be set per message with the Watermill's components/delay metadata.
85+
func NewDelayedPostgreSQLSubscriber(db *sql.DB, config DelayedPostgreSQLSubscriberConfig) (message.Subscriber, error) {
86+
config.setDefaults()
87+
88+
where := fmt.Sprintf("(metadata->>'%v')::timestamptz < NOW() AT TIME ZONE 'UTC'", delay.DelayedUntilKey)
89+
90+
if config.AllowNoDelay {
91+
where += fmt.Sprintf(` OR (metadata->>'%s') IS NULL`, delay.DelayedUntilKey)
92+
}
93+
94+
schemaAdapter := delayedPostgreSQLSchemaAdapter{
95+
PostgreSQLQueueSchema: PostgreSQLQueueSchema{
96+
GenerateWhereClause: func(params GenerateWhereClauseParams) (string, []any) {
97+
return where, nil
98+
},
99+
},
100+
}
101+
102+
subscriberConfig := SubscriberConfig{
103+
SchemaAdapter: schemaAdapter,
104+
OffsetsAdapter: PostgreSQLQueueOffsetsAdapter{
105+
DeleteOnAck: config.DeleteOnAck,
106+
},
107+
InitializeSchema: true,
108+
}
109+
110+
if config.OverrideSubscriberConfig != nil {
111+
err := config.OverrideSubscriberConfig(&subscriberConfig)
112+
if err != nil {
113+
return nil, err
114+
}
115+
}
116+
117+
sub, err := NewSubscriber(db, subscriberConfig, config.Logger)
118+
if err != nil {
119+
return nil, err
120+
}
121+
122+
return sub, nil
123+
}
124+
125+
type delayedPostgreSQLSchemaAdapter struct {
126+
PostgreSQLQueueSchema
127+
}
128+
129+
func (a delayedPostgreSQLSchemaAdapter) SchemaInitializingQueries(params SchemaInitializingQueriesParams) ([]Query, error) {
130+
queries, err := a.PostgreSQLQueueSchema.SchemaInitializingQueries(params)
131+
if err != nil {
132+
return nil, err
133+
}
134+
135+
table := a.MessagesTable(params.Topic)
136+
index := fmt.Sprintf(`"%s_delayed_until_idx"`, strings.ReplaceAll(table, `"`, ""))
137+
138+
queries = append(queries, Query{
139+
Query: fmt.Sprintf(`CREATE INDEX IF NOT EXISTS %s ON %s ((metadata->>'%s'))`, index, table, delay.DelayedUntilKey),
140+
})
141+
142+
return queries, nil
143+
}

0 commit comments

Comments
 (0)