mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-28 18:24:20 +01:00
wallet: Add tooling to extract SQL queries and generate driver info
This is the counterpart of the annotations we did in the last few commits. It extracts queries, passes them through a driver-specific query rewriter and dumps them into a driver-specific query-list, along with some metadata to facilitate processing later on. The generated query list is then registered as a `db_config` and will be loaded by the driver upon instantiation. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
803007ecdf
commit
e4ab98459c
13
wallet/db_sqlite3.c
Normal file
13
wallet/db_sqlite3.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <wallet/db_common.h>
|
||||
#include "gen_db_sqlite3.c"
|
||||
#if HAVE_SQLITE3
|
||||
|
||||
struct db_config db_sqlite3_config = {
|
||||
.name = "sqlite3",
|
||||
.queries = db_sqlite3_queries,
|
||||
.num_queries = DB_SQLITE3_QUERY_COUNT,
|
||||
};
|
||||
|
||||
AUTODATA(db_backends, &db_sqlite3_config);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user