Fix changed temporal type parser calls
This commit is contained in:
parent
848212f73e
commit
6f228ad1a1
@ -1225,7 +1225,7 @@ TypedValue LocalTime(const TypedValue *args, int64_t nargs, const FunctionContex
|
||||
}
|
||||
|
||||
if (args[0].IsString()) {
|
||||
const auto &[local_time_parameters, is_extended] = utils::ParseLocalTimeParameters(args[0].ValueString());
|
||||
const auto &[local_time_parameters, is_extended, _] = utils::ParseLocalTimeParameters(args[0].ValueString());
|
||||
return TypedValue(utils::LocalTime(local_time_parameters), ctx.memory);
|
||||
}
|
||||
|
||||
@ -1252,7 +1252,7 @@ TypedValue LocalDateTime(const TypedValue *args, int64_t nargs, const FunctionCo
|
||||
}
|
||||
|
||||
if (args[0].IsString()) {
|
||||
const auto &[date_parameters, local_time_parameters] = ParseLocalDateTimeParameters(args[0].ValueString());
|
||||
const auto &[date_parameters, local_time_parameters, _] = ParseLocalDateTimeParameters(args[0].ValueString());
|
||||
return TypedValue(utils::LocalDateTime(date_parameters, local_time_parameters), ctx.memory);
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ struct mgp_local_time {
|
||||
static_assert(std::is_nothrow_copy_constructible_v<memgraph::utils::LocalTime>);
|
||||
|
||||
mgp_local_time(const std::string_view string, memgraph::utils::MemoryResource *memory)
|
||||
: memory(memory), local_time(memgraph::utils::ParseLocalTimeParameters(string).first) {}
|
||||
: memory(memory), local_time(memgraph::utils::ParseLocalTimeParameters(string).parameters) {}
|
||||
|
||||
mgp_local_time(const mgp_local_time_parameters *parameters, memgraph::utils::MemoryResource *memory)
|
||||
: memory(memory), local_time(MapLocalTimeParameters(parameters)) {}
|
||||
@ -229,7 +229,7 @@ struct mgp_local_time {
|
||||
};
|
||||
|
||||
inline memgraph::utils::LocalDateTime CreateLocalDateTimeFromString(const std::string_view string) {
|
||||
const auto &[date_parameters, local_time_parameters] = memgraph::utils::ParseLocalDateTimeParameters(string);
|
||||
const auto &[date_parameters, local_time_parameters, _] = memgraph::utils::ParseLocalDateTimeParameters(string);
|
||||
return memgraph::utils::LocalDateTime{date_parameters, local_time_parameters};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Memgraph Ltd.
|
||||
// Copyright 2024 Memgraph Ltd.
|
||||
//
|
||||
// Use of this software is governed by the Business Source License
|
||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||
@ -127,7 +127,7 @@ void TestLocalTime(mg::Client &client) {
|
||||
};
|
||||
|
||||
const auto parse = [](const std::string_view query) {
|
||||
return memgraph::utils::LocalTime(memgraph::utils::ParseLocalTimeParameters(fmt::format("{}", query)).first);
|
||||
return memgraph::utils::LocalTime(memgraph::utils::ParseLocalTimeParameters(fmt::format("{}", query)).parameters);
|
||||
};
|
||||
|
||||
const auto str1 = lt(1, 3, 3, 33);
|
||||
@ -154,7 +154,7 @@ void TestLocalDateTime(mg::Client &client) {
|
||||
return fmt::format("{:0>2}-{:0>2}-{:0>2}T{:0>2}:{:0>2}:{:0>2}", y, mo, d, h, m, s);
|
||||
};
|
||||
auto parse = [](const std::string_view str) {
|
||||
const auto [dt, lt] = memgraph::utils::ParseLocalDateTimeParameters(str);
|
||||
const auto [dt, lt, _] = memgraph::utils::ParseLocalDateTimeParameters(str);
|
||||
return memgraph::utils::LocalDateTime(dt, lt);
|
||||
};
|
||||
auto ldt_query = [](const std::string_view str) { return fmt::format("\"{}\"", str); };
|
||||
|
Loading…
Reference in New Issue
Block a user