Commit graph

6 commits

Author SHA1 Message Date
Slyghtning
9af205de09
instantout: assign chaincfg in sql store 2024-07-16 19:41:51 +02:00
Boris Nagaev
1947b90842
multi: typed callback in ExecTx
Provide a wrapped store type, exposing ExecTx method with a subset
interface in the callback argument. BaseDB interfaces in instantout,
reservation and sweepbatcher use ExecTx with their subset Querier
instead of whole sqlc.Querier (*sqlc.Queries).

This is needed to make the packages more reusable, so they don't
depend on methods of *sqlc.Queries they don't use.
2024-06-19 10:38:55 -03:00
Boris Nagaev
2847e83fcf
multi: separate Querier from BaseDB interfaces
A Querier holds the methods of sqlc.Querier interface relevant for a package.
BaseDB has Querier + ExecTx method.

This change is needed to simplify further rework of ExecTx.
2024-06-19 10:38:55 -03:00
Boris Nagaev
3fd3fab8d1
loopdb: provide function NewSqlWriteOpts
It returns transaction options resulting in full (read+write) tx.

Use it in loopdb and instantout stores.
2024-06-17 12:26:37 -03:00
sputn1ck
f3919d976c
instantout: export value and expiry 2024-03-04 12:25:52 +01:00
sputn1ck
ee0309f942
instantout: add instantout store 2024-02-06 15:07:57 +01:00