wallet: add datastore for plugins to use.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-08-25 12:19:46 +09:30
committed by Christian Decker
parent 720a4d7ae7
commit df17387e05
4 changed files with 49 additions and 27 deletions

View File

@@ -1022,6 +1022,12 @@ struct db_query db_postgres_queries[] = {
.placeholders = 0,
.readonly = false,
},
{
.name = "CREATE TABLE datastore ( key TEXT, data BLOB, PRIMARY KEY (key));",
.query = "CREATE TABLE datastore ( key TEXT, data BYTEA, PRIMARY KEY (key));",
.placeholders = 0,
.readonly = false,
},
{
.name = "UPDATE vars SET intval = intval + 1 WHERE name = 'data_version' AND intval = ?",
.query = "UPDATE vars SET intval = intval + 1 WHERE name = 'data_version' AND intval = $1",
@@ -2026,10 +2032,10 @@ struct db_query db_postgres_queries[] = {
},
};
#define DB_POSTGRES_QUERY_COUNT 336
#define DB_POSTGRES_QUERY_COUNT 337
#endif /* HAVE_POSTGRES */
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
// SHA256STAMP:411593f0957475d832c02cd75a8b0eed30b00fc6178797262ae7dd697de22383
// SHA256STAMP:765ebe6f1bf58b1d492d8d1715e423fbe0764e3440c8bd2be8d0a09dccc95a5c