@@ -140,7 +140,8 @@ static TStatus SelectSimpleTransaction(TSession session, const std::string& path
140
140
141
141
SELECT series_id, title, CAST(CAST(release_date AS Date) AS String) AS release_date
142
142
FROM series
143
- WHERE series_id = 1;
143
+ WHERE series_id = 1
144
+ ORDER BY series_id;
144
145
)" , path);
145
146
146
147
auto txControl =
@@ -189,7 +190,8 @@ static TStatus SelectWithParamsTransaction(TSession session, const std::string&
189
190
FROM seasons AS sa
190
191
INNER JOIN series AS sr
191
192
ON sa.series_id = sr.series_id
192
- WHERE sa.series_id = $seriesId AND sa.season_id = $seasonId;
193
+ WHERE sa.series_id = $seriesId AND sa.season_id = $seasonId
194
+ ORDER BY season_title, series_title;
193
195
)" , path);
194
196
195
197
// Type of parameter values should be exactly the same as in DECLARE statements.
@@ -230,7 +232,8 @@ static TStatus PreparedSelectTransaction(TSession session, const std::string& pa
230
232
231
233
SELECT *
232
234
FROM episodes
233
- WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId;
235
+ WHERE series_id = $seriesId AND season_id = $seasonId AND episode_id = $episodeId
236
+ ORDER BY season_id, episode_id;
234
237
)" , path);
235
238
236
239
// Prepare query or get result from query cache
@@ -279,7 +282,8 @@ static TStatus MultiStepTransaction(TSession session, const std::string& path, u
279
282
DECLARE $seasonId AS Uint64;
280
283
281
284
SELECT first_aired AS from_date FROM seasons
282
- WHERE series_id = $seriesId AND season_id = $seasonId;
285
+ WHERE series_id = $seriesId AND season_id = $seasonId
286
+ ORDER BY from_date;
283
287
)" , path);
284
288
285
289
auto params1 = session.GetParamsBuilder ()
@@ -328,7 +332,8 @@ static TStatus MultiStepTransaction(TSession session, const std::string& path, u
328
332
DECLARE $toDate AS Uint64;
329
333
330
334
SELECT season_id, episode_id, title, air_date FROM episodes
331
- WHERE series_id = $seriesId AND air_date >= $fromDate AND air_date <= $toDate;
335
+ WHERE series_id = $seriesId AND air_date >= $fromDate AND air_date <= $toDate
336
+ ORDER BY season_id, episode_id;
332
337
)" , path);
333
338
334
339
auto params2 = session.GetParamsBuilder ()
@@ -457,6 +462,7 @@ std::vector<std::string> ScanQuerySelect(TTableClient client, const std::string&
457
462
SELECT series_id, season_id, title, CAST(CAST(first_aired AS Date) AS String) AS first_aired
458
463
FROM seasons
459
464
WHERE series_id IN $series
465
+ ORDER BY season_id;
460
466
)" , path);
461
467
462
468
auto parameters = TParamsBuilder ()
0 commit comments