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

lightningnetwork / lnd / 15205900426

23 May 2025 08:29AM UTC coverage: 58.583% (-10.4%) from 68.996%
15205900426

push

github

web-flow
Merge pull request #9692 from lightningnetwork/elle-graph

[graph-work-side-branch]: side branch for graph work

263 of 460 new or added lines in 35 files covered. (57.17%)

28151 existing lines in 452 files now uncovered.

97503 of 166436 relevant lines covered (58.58%)

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