mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
record_fields: Include information about optionality of fields
This was reported as a wish for log schema generation, so add it...
This commit is contained in:
parent
0374d0fe42
commit
f4bb8fae33
6 changed files with 61 additions and 52 deletions
|
@ -1348,6 +1348,7 @@ TableValPtr RecordType::GetRecordFieldsVal(const RecordVal* rv) const
|
|||
nr->Assign(1, logged);
|
||||
nr->Assign(2, std::move(fv));
|
||||
nr->Assign(3, FieldDefault(i));
|
||||
nr->Assign(4, fd->GetAttr(detail::ATTR_OPTIONAL) != detail::Attr::nil);
|
||||
auto field_name = make_intrusive<StringVal>(FieldName(i));
|
||||
rval->Assign(std::move(field_name), std::move(nr));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue