MCPcopy Create free account
hub / github.com/ElementsProject/lightning / add_deprecated

Function add_deprecated

plugins/sql.c:1928–1950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1926}
1927
1928static bool add_deprecated(const char *buffer, const jsmntok_t *tok,
1929 struct column *col)
1930{
1931 const char *err;
1932 u32 vnum;
1933
1934 col->depr_start = col->depr_end = NULL;
1935 err = json_scan(tmpctx, schemas, tok,
1936 "{deprecated?:[0:%,1:%]}",
1937 JSON_SCAN_TAL(col, json_strdup, &col->depr_start),
1938 JSON_SCAN_TAL(col, json_strdup, &col->depr_end));
1939 assert(!err);
1940 if (!col->depr_start)
1941 return true;
1942
1943 /* If it was deprecated before our release, we don't want it at all. */
1944 vnum = version_to_number(col->depr_start);
1945 assert(vnum);
1946 if (vnum <= version_to_number("v23.02"))
1947 return false;
1948
1949 return true;
1950}
1951
1952static void add_table_properties(tablemap *tablemap,
1953 struct table_desc *td,

Callers 1

add_table_propertiesFunction · 0.85

Calls 2

version_to_numberFunction · 0.85
json_scanFunction · 0.50

Tested by

no test coverage detected