Optimization of xldb_put

Added flags parameter to default functions
removed call to bind
This commit is contained in:
Olof hagsand 2024-02-06 09:27:51 +01:00
parent 23dcb58758
commit d660c01a58
16 changed files with 50 additions and 60 deletions

View file

@ -285,7 +285,7 @@ startup_common(clixon_handle h,
if (xml_global_defaults(h, xt, NULL, NULL, yspec, 0) < 0)
goto done;
/* Apply default values (removed in clear function) */
if (xml_default_recurse(xt, 0) < 0)
if (xml_default_recurse(xt, 0, 0) < 0)
goto done;
/* Handcraft transition with with only add tree */
@ -421,7 +421,7 @@ startup_commit(clixon_handle h,
if (plugin_transaction_commit_done_all(h, td) < 0)
goto done;
/* Remove global defaults and empty non-presence containers */
if (xml_defaults_nopresence(td->td_target, 2) < 0)
if (xml_default_nopresence(td->td_target, 2, 0) < 0)
goto done;
/* [Delete and] create running db */
if (xmldb_exists(h, "running") == 1){

View file

@ -950,7 +950,7 @@ get_common(clixon_handle h,
if (xml_global_defaults(h, xret, nsc, xpath, yspec, 1) < 0)
goto done;
/* Apply default values */
if (xml_default_recurse(xret, 1) < 0)
if (xml_default_recurse(xret, 1, 0) < 0)
goto done;
break;
}

View file

@ -389,7 +389,7 @@ clixon_plugin_statedata_all(clixon_handle h,
goto done;
/* Remove global defaults and empty non-presence containers */
/* XXX: only for state data and according to with-defaults setting */
if (xml_defaults_nopresence(x, 2) < 0)
if (xml_default_nopresence(x, 2, 0) < 0)
goto done;
if (xpath_first(x, nsc, "%s", xpath) != NULL){
if ((ret = netconf_trymerge(x, yspec, xret)) < 0)