Skip to content

Commit

Permalink
FDB-319 check rules recursively (all three schema levels)
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Sep 16, 2023
1 parent 6d4e68a commit a13f545
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fdb5/database/Archiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void Archiver::archive(const Key &key, const void* data, size_t len) {
void Archiver::archive(const Key &key, BaseArchiveVisitor& visitor) {

visitor.rule(nullptr);


dbConfig_.schema().expand(key, visitor);

Expand Down
3 changes: 3 additions & 0 deletions src/fdb5/rules/Rule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,9 @@ void Rule::check(const Key& key) const {
ASSERT(value == type.tidy(pred->keyword(), value));
}
}
if (parent_ != nullptr) {
parent_->check(key);
}
}

std::ostream &operator<<(std::ostream &s, const Rule &x) {
Expand Down

0 comments on commit a13f545

Please sign in to comment.