• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 15020907116

14 May 2025 12:39PM UTC coverage: 58.588% (-10.4%) from 68.997%
15020907116

Pull #9692

github

web-flow
Merge b857ae5e6 into b0cba7dd0
Pull Request #9692: [graph-work-side-branch]: temp side branch for graph work

198 of 378 new or added lines in 33 files covered. (52.38%)

28145 existing lines in 451 files now uncovered.

97454 of 166338 relevant lines covered (58.59%)

1.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/graph/db/sql_store.go
1
package graphdb
2

3
import (
4
        "github.com/lightningnetwork/lnd/sqldb"
5
)
6

7
// SQLQueries is a subset of the sqlc.Querier interface that can be used to
8
// execute queries against the SQL graph tables.
9
type SQLQueries interface {
10
}
11

12
// BatchedSQLQueries is a version of SQLQueries that's capable of batched
13
// database operations.
14
type BatchedSQLQueries interface {
15
        SQLQueries
16
        sqldb.BatchedTx[SQLQueries]
17
}
18

19
// SQLStore is an implementation of the V1Store interface that uses a SQL
20
// database as the backend.
21
//
22
// NOTE: currently, this temporarily embeds the KVStore struct so that we can
23
// implement the V1Store interface incrementally. For any method not
24
// implemented,  things will fall back to the KVStore. This is ONLY the case
25
// for the time being while this struct is purely used in unit tests only.
26
type SQLStore struct {
27
        db BatchedSQLQueries
28

29
        // Temporary fall-back to the KVStore so that we can implement the
30
        // interface incrementally.
31
        *KVStore
32
}
33

34
// A compile-time assertion to ensure that SQLStore implements the V1Store
35
// interface.
36
var _ V1Store = (*SQLStore)(nil)
37

38
// NewSQLStore creates a new SQLStore instance given an open BatchedSQLQueries
39
// storage backend.
NEW
40
func NewSQLStore(db BatchedSQLQueries, kvStore *KVStore) *SQLStore {
×
NEW
41
        return &SQLStore{
×
NEW
42
                db:      db,
×
NEW
43
                KVStore: kvStore,
×
NEW
44
        }
×
NEW
45
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc