Skip to content

Commit c7f0436

Browse files
committed
ADD: Add EndOfInterval variant to SystemCode
1 parent 27d4e04 commit c7f0436

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 0.42.0 - TBD
44

5+
### Enhancements
6+
- Added `EndOfInterval` variant to `SystemCode`
7+
58
### Breaking changes
69
- Removed `bill_id` field from `BatchJob` struct
710

include/databento/enums.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ enum SystemCode : std::uint8_t {
627627
SlowReaderWarning = 2,
628628
// Indicates a replay subscription has caught up with real-time data.
629629
ReplayCompleted = 3,
630+
// Signals that all records for interval-based schemas have been published for the
631+
// given timestamp.
632+
EndOfInterval = 4,
630633
Unset = 255,
631634
};
632635
} // namespace system_code

src/enums.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,9 @@ const char* ToString(SystemCode system_code) {
795795
case SystemCode::ReplayCompleted: {
796796
return "replay_completed";
797797
}
798+
case SystemCode::EndOfInterval: {
799+
return "end_of_interval";
800+
}
798801
default: {
799802
return "Unknown";
800803
}
@@ -1233,6 +1236,9 @@ SystemCode FromString(const std::string& str) {
12331236
if (str == "replay_completed") {
12341237
return SystemCode::ReplayCompleted;
12351238
}
1239+
if (str == "end_of_interval") {
1240+
return SystemCode::EndOfInterval;
1241+
}
12361242
throw InvalidArgumentError{"FromString<SystemCode>", "str",
12371243
"unknown value '" + str + '\''};
12381244
}

0 commit comments

Comments
 (0)