mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-09-24 07:25:06 +02:00
clean up deprecation warnings in pqxx
This commit is contained in:
parent
012443acfa
commit
7aa451bec1
1 changed files with 131 additions and 89 deletions
|
@ -475,26 +475,28 @@ AuthInfo CentralDB::getSSOAuthInfo(const nlohmann::json& member, const std::stri
|
||||||
std::string nonce = "";
|
std::string nonce = "";
|
||||||
|
|
||||||
// check if the member exists first.
|
// check if the member exists first.
|
||||||
pqxx::row count = w.exec_params1(
|
pqxx::row count =
|
||||||
"SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2 AND deleted = false", memberId,
|
w.exec(
|
||||||
networkId);
|
"SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2 AND deleted = false",
|
||||||
|
pqxx::params { memberId, networkId })
|
||||||
|
.one_row();
|
||||||
if (count[0].as<int>() == 1) {
|
if (count[0].as<int>() == 1) {
|
||||||
// get active nonce, if exists.
|
// get active nonce, if exists.
|
||||||
pqxx::result r = w.exec_params(
|
pqxx::result r = w.exec(
|
||||||
"SELECT nonce FROM ztc_sso_expiry "
|
"SELECT nonce FROM ztc_sso_expiry "
|
||||||
"WHERE network_id = $1 AND member_id = $2 "
|
"WHERE network_id = $1 AND member_id = $2 "
|
||||||
"AND ((NOW() AT TIME ZONE 'UTC') <= authentication_expiry_time) AND ((NOW() AT TIME ZONE 'UTC') <= "
|
"AND ((NOW() AT TIME ZONE 'UTC') <= authentication_expiry_time) AND ((NOW() AT TIME ZONE 'UTC') <= "
|
||||||
"nonce_expiration)",
|
"nonce_expiration)",
|
||||||
networkId, memberId);
|
pqxx::params { networkId, memberId });
|
||||||
|
|
||||||
if (r.size() == 0) {
|
if (r.size() == 0) {
|
||||||
// no active nonce.
|
// no active nonce.
|
||||||
// find an unused nonce, if one exists.
|
// find an unused nonce, if one exists.
|
||||||
pqxx::result r = w.exec_params(
|
pqxx::result r = w.exec(
|
||||||
"SELECT nonce FROM ztc_sso_expiry "
|
"SELECT nonce FROM ztc_sso_expiry "
|
||||||
"WHERE network_id = $1 AND member_id = $2 "
|
"WHERE network_id = $1 AND member_id = $2 "
|
||||||
"AND authentication_expiry_time IS NULL AND ((NOW() AT TIME ZONE 'UTC') <= nonce_expiration)",
|
"AND authentication_expiry_time IS NULL AND ((NOW() AT TIME ZONE 'UTC') <= nonce_expiration)",
|
||||||
networkId, memberId);
|
pqxx::params { networkId, memberId });
|
||||||
|
|
||||||
if (r.size() == 1) {
|
if (r.size() == 1) {
|
||||||
// we have an existing nonce. Use it
|
// we have an existing nonce. Use it
|
||||||
|
@ -508,11 +510,11 @@ AuthInfo CentralDB::getSSOAuthInfo(const nlohmann::json& member, const std::stri
|
||||||
Utils::hex(nonceBytes, sizeof(nonceBytes), nonceBuf);
|
Utils::hex(nonceBytes, sizeof(nonceBytes), nonceBuf);
|
||||||
nonce = std::string(nonceBuf);
|
nonce = std::string(nonceBuf);
|
||||||
|
|
||||||
pqxx::result ir = w.exec_params0(
|
pqxx::result ir = w.exec(
|
||||||
"INSERT INTO ztc_sso_expiry "
|
"INSERT INTO ztc_sso_expiry "
|
||||||
"(nonce, nonce_expiration, network_id, member_id) VALUES "
|
"(nonce, nonce_expiration, network_id, member_id) VALUES "
|
||||||
"($1, TO_TIMESTAMP($2::double precision/1000), $3, $4)",
|
"($1, TO_TIMESTAMP($2::double precision/1000), $3, $4)",
|
||||||
nonce, OSUtils::now() + 300000, networkId, memberId);
|
pqxx::params { nonce, OSUtils::now() + 300000, networkId, memberId });
|
||||||
|
|
||||||
w.commit();
|
w.commit();
|
||||||
}
|
}
|
||||||
|
@ -532,7 +534,7 @@ AuthInfo CentralDB::getSSOAuthInfo(const nlohmann::json& member, const std::stri
|
||||||
exit(7);
|
exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = w.exec_params(
|
r = w.exec(
|
||||||
"SELECT oc.client_id, oc.authorization_endpoint, oc.issuer, oc.provider, oc.sso_impl_version "
|
"SELECT oc.client_id, oc.authorization_endpoint, oc.issuer, oc.provider, oc.sso_impl_version "
|
||||||
"FROM ztc_network AS n "
|
"FROM ztc_network AS n "
|
||||||
"INNER JOIN ztc_org o "
|
"INNER JOIN ztc_org o "
|
||||||
|
@ -542,7 +544,7 @@ AuthInfo CentralDB::getSSOAuthInfo(const nlohmann::json& member, const std::stri
|
||||||
"LEFT OUTER JOIN ztc_oidc_config oc "
|
"LEFT OUTER JOIN ztc_oidc_config oc "
|
||||||
" ON noc.client_id = oc.client_id AND oc.org_id = o.org_id "
|
" ON noc.client_id = oc.client_id AND oc.org_id = o.org_id "
|
||||||
"WHERE n.id = $1 AND n.sso_enabled = true",
|
"WHERE n.id = $1 AND n.sso_enabled = true",
|
||||||
networkId);
|
pqxx::params { networkId });
|
||||||
|
|
||||||
std::string client_id = "";
|
std::string client_id = "";
|
||||||
std::string authorization_endpoint = "";
|
std::string authorization_endpoint = "";
|
||||||
|
@ -1055,13 +1057,14 @@ void CentralDB::heartbeat()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pqxx::work w { *c->c };
|
pqxx::work w { *c->c };
|
||||||
w.exec_params0(
|
w.exec(
|
||||||
"INSERT INTO controllers_ctl (id, hostname, last_heartbeat, public_identity, version) VALUES "
|
"INSERT INTO controllers_ctl (id, hostname, last_heartbeat, public_identity, version) VALUES "
|
||||||
"($1, $2, TO_TIMESTAMP($3::double precision/1000), $4, $5) "
|
"($1, $2, TO_TIMESTAMP($3::double precision/1000), $4, $5) "
|
||||||
"ON CONFLICT (id) DO UPDATE SET hostname = EXCLUDED.hostname, last_heartbeat = "
|
"ON CONFLICT (id) DO UPDATE SET hostname = EXCLUDED.hostname, last_heartbeat = "
|
||||||
"EXCLUDED.last_heartbeat, "
|
"EXCLUDED.last_heartbeat, "
|
||||||
"public_identity = EXCLUDED.public_identity, version = EXCLUDED.version",
|
"public_identity = EXCLUDED.public_identity, version = EXCLUDED.version",
|
||||||
controllerId, hostname, ts, publicIdentity, versionStr);
|
pqxx::params { controllerId, hostname, ts, publicIdentity, versionStr })
|
||||||
|
.no_rows();
|
||||||
w.commit();
|
w.commit();
|
||||||
}
|
}
|
||||||
catch (std::exception& e) {
|
catch (std::exception& e) {
|
||||||
|
@ -1147,8 +1150,11 @@ void CentralDB::commitThread()
|
||||||
|
|
||||||
// get network and the frontend it is assigned to
|
// get network and the frontend it is assigned to
|
||||||
// if network does not exist, skip member update
|
// if network does not exist, skip member update
|
||||||
pqxx::row nwrow = w.exec_params1(
|
pqxx::row nwrow =
|
||||||
"SELECT COUNT(id), frontend FROM networks_ctl WHERE id = $1 GROUP BY frontend", networkId);
|
w.exec(
|
||||||
|
"SELECT COUNT(id), frontend FROM networks_ctl WHERE id = $1 GROUP BY frontend",
|
||||||
|
pqxx::params { networkId })
|
||||||
|
.one_row();
|
||||||
int nwcount = nwrow[0].as<int>();
|
int nwcount = nwrow[0].as<int>();
|
||||||
std::string frontend = nwrow[1].as<std::string>();
|
std::string frontend = nwrow[1].as<std::string>();
|
||||||
|
|
||||||
|
@ -1159,13 +1165,18 @@ void CentralDB::commitThread()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pqxx::row mrow = w.exec_params1(
|
pqxx::row mrow = w.exec(
|
||||||
"SELECT COUNT(device_id) FROM network_memberships_ctl WHERE device_id = $1 AND network_id = $2",
|
"SELECT COUNT(device_id) FROM network_memberships_ctl WHERE device_id = $1 "
|
||||||
memberId, networkId);
|
"AND network_id = $2",
|
||||||
|
pqxx::params { memberId, networkId })
|
||||||
|
.one_row();
|
||||||
int membercount = mrow[0].as<int>();
|
int membercount = mrow[0].as<int>();
|
||||||
bool isNewMember = (membercount == 0);
|
bool isNewMember = (membercount == 0);
|
||||||
|
|
||||||
std::string change_source = config["change_source"];
|
std::string change_source;
|
||||||
|
if (! config["change_source"].is_null()) {
|
||||||
|
change_source = config["change_source"];
|
||||||
|
}
|
||||||
if (! isNewMember && change_source != "controller" && frontend != change_source) {
|
if (! isNewMember && change_source != "controller" && frontend != change_source) {
|
||||||
// if it is not a new member and the change source is not the controller and doesn't match the
|
// if it is not a new member and the change source is not the controller and doesn't match the
|
||||||
// frontend, don't apply the change.
|
// frontend, don't apply the change.
|
||||||
|
@ -1185,7 +1196,8 @@ void CentralDB::commitThread()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pqxx::result res = w.exec_params0(
|
pqxx::result res =
|
||||||
|
w.exec(
|
||||||
"INSERT INTO network_memberships_ctl (device_id, network_id, authorized, active_bridge, "
|
"INSERT INTO network_memberships_ctl (device_id, network_id, authorized, active_bridge, "
|
||||||
"ip_assignments, "
|
"ip_assignments, "
|
||||||
"no_auto_assign_ips, sso_exempt, authentication_expiry_time, capabilities, creation_time, "
|
"no_auto_assign_ips, sso_exempt, authentication_expiry_time, capabilities, creation_time, "
|
||||||
|
@ -1197,7 +1209,8 @@ void CentralDB::commitThread()
|
||||||
"TO_TIMESTAMP($13::double precision/1000), $14, $15, $16, $17, $18, $19, $20, $21) "
|
"TO_TIMESTAMP($13::double precision/1000), $14, $15, $16, $17, $18, $19, $20, $21) "
|
||||||
"ON CONFLICT (device_id, network_id) DO UPDATE SET "
|
"ON CONFLICT (device_id, network_id) DO UPDATE SET "
|
||||||
"authorized = EXCLUDED.authorized, active_bridge = EXCLUDED.active_bridge, "
|
"authorized = EXCLUDED.authorized, active_bridge = EXCLUDED.active_bridge, "
|
||||||
"ip_assignments = EXCLUDED.ip_assignments, no_auto_assign_ips = EXCLUDED.no_auto_assign_ips, "
|
"ip_assignments = EXCLUDED.ip_assignments, no_auto_assign_ips = "
|
||||||
|
"EXCLUDED.no_auto_assign_ips, "
|
||||||
"sso_exempt = EXCLUDED.sso_exempt, authentication_expiry_time = "
|
"sso_exempt = EXCLUDED.sso_exempt, authentication_expiry_time = "
|
||||||
"EXCLUDED.authentication_expiry_time, "
|
"EXCLUDED.authentication_expiry_time, "
|
||||||
"capabilities = EXCLUDED.capabilities, creation_time = EXCLUDED.creation_time, "
|
"capabilities = EXCLUDED.capabilities, creation_time = EXCLUDED.creation_time, "
|
||||||
|
@ -1205,17 +1218,32 @@ void CentralDB::commitThread()
|
||||||
"last_deauthorized_time = EXCLUDED.last_deauthorized_time, "
|
"last_deauthorized_time = EXCLUDED.last_deauthorized_time, "
|
||||||
"remote_trace_level = EXCLUDED.remote_trace_level, remote_trace_target = "
|
"remote_trace_level = EXCLUDED.remote_trace_level, remote_trace_target = "
|
||||||
"EXCLUDED.remote_trace_target, "
|
"EXCLUDED.remote_trace_target, "
|
||||||
"revision = EXCLUDED.revision, tags = EXCLUDED.tags, version_major = EXCLUDED.version_major, "
|
"revision = EXCLUDED.revision, tags = EXCLUDED.tags, version_major = "
|
||||||
|
"EXCLUDED.version_major, "
|
||||||
"version_minor = EXCLUDED.version_minor, version_revision = EXCLUDED.version_revision, "
|
"version_minor = EXCLUDED.version_minor, version_revision = EXCLUDED.version_revision, "
|
||||||
"version_protocol = EXCLUDED.version_protocol",
|
"version_protocol = EXCLUDED.version_protocol",
|
||||||
memberId, networkId, (bool)config["authorized"], (bool)config["activeBridge"],
|
pqxx::params { memberId,
|
||||||
config["ipAssignments"].get<std::vector<std::string> >(), (bool)config["noAutoAssignIps"],
|
networkId,
|
||||||
(bool)config["ssoExempt"], (uint64_t)config["authenticationExpiryTime"],
|
(bool)config["authorized"],
|
||||||
OSUtils::jsonDump(config["capabilities"], -1), (uint64_t)config["creationTime"],
|
(bool)config["activeBridge"],
|
||||||
OSUtils::jsonString(config["identity"], ""), (uint64_t)config["lastAuthorizedTime"],
|
config["ipAssignments"].get<std::vector<std::string> >(),
|
||||||
(uint64_t)config["lastDeauthorizedTime"], (int)config["remoteTraceLevel"], target,
|
(bool)config["noAutoAssignIps"],
|
||||||
(uint64_t)config["revision"], OSUtils::jsonDump(config["tags"], -1), (int)config["vMajor"],
|
(bool)config["ssoExempt"],
|
||||||
(int)config["vMinor"], (int)config["vRev"], (int)config["vProto"]);
|
(uint64_t)config["authenticationExpiryTime"],
|
||||||
|
OSUtils::jsonDump(config["capabilities"], -1),
|
||||||
|
(uint64_t)config["creationTime"],
|
||||||
|
OSUtils::jsonString(config["identity"], ""),
|
||||||
|
(uint64_t)config["lastAuthorizedTime"],
|
||||||
|
(uint64_t)config["lastDeauthorizedTime"],
|
||||||
|
(int)config["remoteTraceLevel"],
|
||||||
|
target,
|
||||||
|
(uint64_t)config["revision"],
|
||||||
|
OSUtils::jsonDump(config["tags"], -1),
|
||||||
|
(int)config["vMajor"],
|
||||||
|
(int)config["vMinor"],
|
||||||
|
(int)config["vRev"],
|
||||||
|
(int)config["vProto"] })
|
||||||
|
.no_rows();
|
||||||
|
|
||||||
w.commit();
|
w.commit();
|
||||||
|
|
||||||
|
@ -1272,13 +1300,19 @@ void CentralDB::commitThread()
|
||||||
|
|
||||||
std::string id = config["id"];
|
std::string id = config["id"];
|
||||||
|
|
||||||
pqxx::row nwrow = w.exec_params1(
|
pqxx::row nwrow =
|
||||||
"SELECT COUNT(id), frontend FROM networks_ctl WHERE id = $1 GROUP BY frontend", id);
|
w.exec(
|
||||||
|
"SELECT COUNT(id), frontend FROM networks_ctl WHERE id = $1 GROUP BY frontend",
|
||||||
|
pqxx::params { id })
|
||||||
|
.one_row();
|
||||||
int nwcount = nwrow[0].as<int>();
|
int nwcount = nwrow[0].as<int>();
|
||||||
std::string frontend = nwrow[1].as<std::string>();
|
std::string frontend = nwrow[1].as<std::string>();
|
||||||
bool isNewNetwork = (nwcount == 0);
|
bool isNewNetwork = (nwcount == 0);
|
||||||
|
|
||||||
std::string change_source = config["change_source"];
|
std::string change_source;
|
||||||
|
if (! config["change_source"].is_null()) {
|
||||||
|
change_source = config["change_source"];
|
||||||
|
}
|
||||||
if (! isNewNetwork && change_source != "controller" && frontend != change_source) {
|
if (! isNewNetwork && change_source != "controller" && frontend != change_source) {
|
||||||
// if it is not a new network and the change source is not the controller and doesn't match the
|
// if it is not a new network and the change source is not the controller and doesn't match the
|
||||||
// frontend, don't apply the change.
|
// frontend, don't apply the change.
|
||||||
|
@ -1297,14 +1331,14 @@ void CentralDB::commitThread()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pqxx::result res = w.exec_params0(
|
pqxx::result res = w.exec(
|
||||||
"INSERT INTO networks_ctl (id, name, configuration, controller_id, revision, frontend) "
|
"INSERT INTO networks_ctl (id, name, configuration, controller_id, revision, frontend) "
|
||||||
"VALUES ($1, $2, $3, $4, $5, $6) "
|
"VALUES ($1, $2, $3, $4, $5, $6) "
|
||||||
"ON CONFLICT (id) DO UPDATE SET "
|
"ON CONFLICT (id) DO UPDATE SET "
|
||||||
"name = EXCLUDED.name, configuration = EXCLUDED.configuration, revision = EXCLUDED.revision+1, "
|
"name = EXCLUDED.name, configuration = EXCLUDED.configuration, revision = EXCLUDED.revision+1, "
|
||||||
"frontend = EXCLUDED.frontend",
|
"frontend = EXCLUDED.frontend",
|
||||||
id, OSUtils::jsonString(config["name"], ""), OSUtils::jsonDump(config, -1), _myAddressStr,
|
pqxx::params { id, OSUtils::jsonString(config["name"], ""), OSUtils::jsonDump(config, -1),
|
||||||
((uint64_t)config["revision"]), change_source);
|
_myAddressStr, ((uint64_t)config["revision"]), change_source });
|
||||||
|
|
||||||
w.commit();
|
w.commit();
|
||||||
|
|
||||||
|
@ -1354,8 +1388,8 @@ void CentralDB::commitThread()
|
||||||
pqxx::work w(*c->c);
|
pqxx::work w(*c->c);
|
||||||
std::string networkId = config["id"];
|
std::string networkId = config["id"];
|
||||||
fprintf(stderr, "Deleting network %s\n", networkId.c_str());
|
fprintf(stderr, "Deleting network %s\n", networkId.c_str());
|
||||||
w.exec_params0("DELETE FROM network_memberships_ctl WHERE network_id = $1", networkId);
|
w.exec("DELETE FROM network_memberships_ctl WHERE network_id = $1", pqxx::params { networkId });
|
||||||
w.exec_params0("DELETE FROM networks_ctl WHERE id = $1", networkId);
|
w.exec("DELETE FROM networks_ctl WHERE id = $1", pqxx::params { networkId });
|
||||||
|
|
||||||
w.commit();
|
w.commit();
|
||||||
|
|
||||||
|
@ -1400,9 +1434,11 @@ void CentralDB::commitThread()
|
||||||
std::string memberId = config["id"];
|
std::string memberId = config["id"];
|
||||||
std::string networkId = config["nwid"];
|
std::string networkId = config["nwid"];
|
||||||
|
|
||||||
pqxx::result res = w.exec_params0(
|
pqxx::result res =
|
||||||
"DELETE FROM network_memberships_ctl WHERE device_id = $1 AND network_id = $2", memberId,
|
w.exec(
|
||||||
networkId);
|
"DELETE FROM network_memberships_ctl WHERE device_id = $1 AND network_id = $2",
|
||||||
|
pqxx::params { memberId, networkId })
|
||||||
|
.no_rows();
|
||||||
|
|
||||||
w.commit();
|
w.commit();
|
||||||
|
|
||||||
|
@ -1507,10 +1543,12 @@ void CentralDB::onlineNotificationThread()
|
||||||
//
|
//
|
||||||
// exec_params1 will throw pqxx::unexpected_rows if not exactly one row is returned. If that's the
|
// exec_params1 will throw pqxx::unexpected_rows if not exactly one row is returned. If that's the
|
||||||
// case, skip this record and move on.
|
// case, skip this record and move on.
|
||||||
pqxx::row r = w.exec_params1(
|
pqxx::row r = w.exec(
|
||||||
"SELECT device_id, network_id FROM network_memberships_ctl WHERE network_id = $1 AND device_id "
|
"SELECT device_id, network_id FROM network_memberships_ctl WHERE network_id = "
|
||||||
|
"$1 AND device_id "
|
||||||
"= $2",
|
"= $2",
|
||||||
networkId, memberId);
|
pqxx::params { networkId, memberId })
|
||||||
|
.one_row();
|
||||||
}
|
}
|
||||||
catch (pqxx::unexpected_rows& e) {
|
catch (pqxx::unexpected_rows& e) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -1554,7 +1592,8 @@ nlohmann::json CentralDB::_getNetworkMember(pqxx::work& tx, const std::string ne
|
||||||
nlohmann::json out;
|
nlohmann::json out;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pqxx::row row = tx.exec_params1(
|
pqxx::row row =
|
||||||
|
tx.exec(
|
||||||
"SELECT nm.device_id, nm.network_id, nm.authorized, nm.active_bridge, nm.ip_assignments, "
|
"SELECT nm.device_id, nm.network_id, nm.authorized, nm.active_bridge, nm.ip_assignments, "
|
||||||
"nm.no_auto_assign_ips, "
|
"nm.no_auto_assign_ips, "
|
||||||
"nm.sso_exempt, (EXTRACT(EPOCH FROM nm.authentication_expiry_time AT TIME ZONE 'UTC')*1000)::bigint, "
|
"nm.sso_exempt, (EXTRACT(EPOCH FROM nm.authentication_expiry_time AT TIME ZONE 'UTC')*1000)::bigint, "
|
||||||
|
@ -1567,7 +1606,8 @@ nlohmann::json CentralDB::_getNetworkMember(pqxx::work& tx, const std::string ne
|
||||||
"INNER JOIN networks_ctl n "
|
"INNER JOIN networks_ctl n "
|
||||||
" ON nm.network_id = n.id "
|
" ON nm.network_id = n.id "
|
||||||
"WHERE nm.network_id = $1 AND nm.device_id = $2",
|
"WHERE nm.network_id = $1 AND nm.device_id = $2",
|
||||||
networkID, memberID);
|
pqxx::params { networkID, memberID })
|
||||||
|
.one_row();
|
||||||
|
|
||||||
bool authorized = row[2].as<bool>();
|
bool authorized = row[2].as<bool>();
|
||||||
std::optional<bool> active_bridge =
|
std::optional<bool> active_bridge =
|
||||||
|
@ -1647,11 +1687,13 @@ nlohmann::json CentralDB::_getNetwork(pqxx::work& tx, const std::string networkI
|
||||||
std::optional<uint64_t> revision;
|
std::optional<uint64_t> revision;
|
||||||
std::string frontend;
|
std::string frontend;
|
||||||
|
|
||||||
pqxx::row row = tx.exec_params1(
|
pqxx::row row = tx.exec(
|
||||||
"SELECT id, name, configuration , (EXTRACT(EPOCH FROM creation_time AT TIME ZONE 'UTC')*1000)::bigint, "
|
"SELECT id, name, configuration , (EXTRACT(EPOCH FROM creation_time AT TIME ZONE "
|
||||||
|
"'UTC')*1000)::bigint, "
|
||||||
"(EXTRACT(EPOCH FROM last_modified AT TIME ZONE 'UTC')*1000)::bigint, revision, frontend "
|
"(EXTRACT(EPOCH FROM last_modified AT TIME ZONE 'UTC')*1000)::bigint, revision, frontend "
|
||||||
"FROM networks_ctl WHERE id = $1",
|
"FROM networks_ctl WHERE id = $1",
|
||||||
networkID);
|
pqxx::params { networkID })
|
||||||
|
.one_row();
|
||||||
|
|
||||||
cfg = row[2].as<std::string>();
|
cfg = row[2].as<std::string>();
|
||||||
creation_time = row[3].is_null() ? std::optional<uint64_t>() : std::optional<uint64_t>(row[3].as<uint64_t>());
|
creation_time = row[3].is_null() ? std::optional<uint64_t>() : std::optional<uint64_t>(row[3].as<uint64_t>());
|
||||||
|
|
Loading…
Add table
Reference in a new issue