|
4 | 4 |
|
5 | 5 | #include <src/util/folder/pathsplit.h> |
6 | 6 |
|
| 7 | +#include <filesystem> |
7 | 8 | #include <format> |
8 | 9 |
|
9 | 10 | using namespace NYdb; |
@@ -33,10 +34,10 @@ static std::string JoinPath(const std::string& basePath, const std::string& path |
33 | 34 | return path; |
34 | 35 | } |
35 | 36 |
|
36 | | - TPathSplitUnix prefixPathSplit(basePath); |
37 | | - prefixPathSplit.AppendComponent(path); |
| 37 | + std::filesystem::path prefixPathSplit(basePath); |
| 38 | + prefixPathSplit /= path; |
38 | 39 |
|
39 | | - return prefixPathSplit.Reconstruct(); |
| 40 | + return prefixPathSplit; |
40 | 41 | } |
41 | 42 |
|
42 | 43 | /////////////////////////////////////////////////////////////////////////////// |
@@ -210,7 +211,7 @@ static TStatus UpsertSimpleTransaction(TSession session, const std::string& path |
210 | 211 |
|
211 | 212 | //! Shows usage of parameters in data queries. |
212 | 213 | static TStatus SelectWithParamsTransaction(TSession session, const std::string& path, |
213 | | - ui64 seriesId, ui64 seasonId, std::optional<TResultSet>& resultSet) |
| 214 | + uint64_t seriesId, uint64_t seasonId, std::optional<TResultSet>& resultSet) |
214 | 215 | { |
215 | 216 | auto query = std::format(R"( |
216 | 217 | --!syntax_v1 |
@@ -250,7 +251,7 @@ static TStatus SelectWithParamsTransaction(TSession session, const std::string& |
250 | 251 |
|
251 | 252 | //! Shows usage of prepared queries. |
252 | 253 | static TStatus PreparedSelectTransaction(TSession session, const std::string& path, |
253 | | - ui64 seriesId, ui64 seasonId, ui64 episodeId, std::optional<TResultSet>& resultSet) |
| 254 | + uint64_t seriesId, uint64_t seasonId, uint64_t episodeId, std::optional<TResultSet>& resultSet) |
254 | 255 | { |
255 | 256 | // Once prepared, query data is stored in the session and identified by QueryId. |
256 | 257 | // Local query cache is used to keep track of queries, prepared in current session. |
@@ -302,7 +303,7 @@ static TStatus PreparedSelectTransaction(TSession session, const std::string& pa |
302 | 303 | } |
303 | 304 |
|
304 | 305 | //! Shows usage of transactions consisting of multiple data queries with client logic between them. |
305 | | -static TStatus MultiStepTransaction(TSession session, const std::string& path, ui64 seriesId, ui64 seasonId, |
| 306 | +static TStatus MultiStepTransaction(TSession session, const std::string& path, uint64_t seriesId, uint64_t seasonId, |
306 | 307 | std::optional<TResultSet>& resultSet) |
307 | 308 | { |
308 | 309 | auto query1 = std::format(R"( |
@@ -472,7 +473,7 @@ void SelectWithParams(TTableClient client, const std::string& path) { |
472 | 473 | } |
473 | 474 | } |
474 | 475 |
|
475 | | -void PreparedSelect(TTableClient client, const std::string& path, ui32 seriesId, ui32 seasonId, ui32 episodeId) { |
| 476 | +void PreparedSelect(TTableClient client, const std::string& path, uint32_t seriesId, uint32_t seasonId, uint32_t episodeId) { |
476 | 477 | std::optional<TResultSet> resultSet; |
477 | 478 | ThrowOnError(client.RetryOperationSync([path, seriesId, seasonId, episodeId, &resultSet](TSession session) { |
478 | 479 | return PreparedSelectTransaction(session, path, seriesId, seasonId, episodeId, resultSet); |
|
0 commit comments