10 Commits

Author SHA1 Message Date
contact
8b44d4ce3c Add Prometheus instrumentation for the database
git-svn-id: file:///srv/svn/repo/suika/trunk@712 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-11-17 14:58:19 +00:00
contact
70a12fc286 Make Network.Nick optional
Make Network.Nick optional, default to the user's username. This
will allow adding a global setting to set the nickname in the
future, just like we have for the real name.

References: https://todo.sr.ht/~emersion/soju/110

git-svn-id: file:///srv/svn/repo/suika/trunk@664 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-11-02 22:33:17 +00:00
contact
2748715183 Add context args to Database interface
This is a mecanical change, which just lifts up the context.TODO()
calls from inside the DB implementations to the callers.

Future work involves properly wiring up the contexts when it makes
sense.

git-svn-id: file:///srv/svn/repo/suika/trunk@652 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-18 17:15:15 +00:00
hubert
753f1704e5 Set hard timeouts on DB transactions
git-svn-id: file:///srv/svn/repo/suika/trunk@645 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-15 20:39:14 +00:00
contact
58dc869a21 db_postgres: remove unnecessary DEFAULT NULL in schema
git-svn-id: file:///srv/svn/repo/suika/trunk@640 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-14 08:09:01 +00:00
contact
1c5ea5026a db_postgres: use tx for all queries in StoreClientDeliveryReceipts
git-svn-id: file:///srv/svn/repo/suika/trunk@639 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-13 17:15:50 +00:00
contact
090e469fd2 db_postgres: quote table name in StoreClientDeliveryReceipts
git-svn-id: file:///srv/svn/repo/suika/trunk@638 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-13 15:38:20 +00:00
contact
75cc0231be db_postgres: fix constraints errors
Stop using ON CONFLICT DO UPDATE.

Closes: https://todo.sr.ht/~emersion/soju/138

git-svn-id: file:///srv/svn/repo/suika/trunk@635 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-13 08:12:14 +00:00
hubert
3a20033cc7 db_postgres: handle both constraints on network updates
Closes: https://todo.sr.ht/~emersion/soju/138

git-svn-id: file:///srv/svn/repo/suika/trunk@634 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-13 06:53:49 +00:00
hubert
bbe15df672 PostgreSQL support
git-svn-id: file:///srv/svn/repo/suika/trunk@620 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-10-11 13:21:04 +00:00