mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
graph/db: add a framework for testing against SQL backends incrementally
In this commit, we implement the postgres and sqlite versions of the NewTestDB function. We add the various build flags so that only one of the three versions of this function can be active at a time. We also introduce the SQLStore struct which is the SQL implementation of the V1Store interface. NOTE: it currently temporarily embeds the KVStore struct so that we can implement the V1Store interface incrementally. For any method not implemented, things will fall back to the KVStore. This is ONLY the case for the time being while this struct is purely used in unit tests only. Once all the methods have been implemented, the KVStore field will be removed from the SQLStore struct.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build !test_db_sqlite && !test_db_postgres
|
||||
|
||||
package graphdb
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user