2 INSERT INTO subscription
3 (topic_id
, callback
, verified
, expires
, secret
, http_remote_addr
, http_from
)
5 ($
(topicId
), $
(callback
), now(), now() + ($
(leaseSeconds
) * INTERVAL '1 second'), $
(secret
), $
(httpRemoteAddr
), $
(httpFrom
))
6 ON CONFLICT (topic_id
, callback
) DO UPDATE
9 expires
= now() + ($
(leaseSeconds
) * INTERVAL '1 second'),
11 http_remote_addr
= $
(httpRemoteAddr
),
12 http_from
= $
(httpFrom
)