graph/db: let ForEachNode take a context
This commit is contained in:
8 files changed
+14
-14
No files matched your search
@@ -783,12 +783,10 @@ func (s *SQLStore) ForEachSourceNodeChannel(ctx context.Context,
|
||||
// _MUST_ only be called from within the call-back.
|
||||
//
|
||||
// NOTE: part of the V1Store interface.
|
||||
func (s *SQLStore) ForEachNode(cb func(tx NodeRTx) error) error {
|
||||
var (
|
||||
ctx = context.TODO()
|
||||
lastID int64 = 0
|
||||
)
|
||||
func (s *SQLStore) ForEachNode(ctx context.Context,
|
||||
cb func(tx NodeRTx) error) error {
|
||||
|
||||
var lastID int64 = 0
|
||||
handleNode := func(db SQLQueries, dbNode sqlc.Node) error {
|
||||
node, err := buildNode(ctx, db, &dbNode)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user