Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- This adds an "optional" name field to the end of schema rules in the schema store. - SchemaRule objects get a generated name if none is otherwise provided. - The generated name is frozen once observed and cannot be changed afterwards. - The schema rule names are thus effectively immutable. - Legacy schema rule records cannot fit this new name anywhere, and thus always gets a generated name. - New schema rule records that don't have a name gets a generated one as well. - The empty string is not a valid name, but if we somehow find the empty string in the store, we will use the generated name instead – this allows us to add other fields in the future, without imposing a hard requirement that all future schema rule records must have a name. - The name is stored as a null-terminated string, which is different from other strings in the schema store. - The reason for the null-terminated strings is that its slightly more straight forward to handle if the name field is missing. - Compatibility tests is added for all these new cases. - Also, obviously, if you set an explicit schema rule name, we require it to not be the empty string, and to not contain the null-byte character. - The name field string is encoded in UTF-8, so the terminating null-byte will be the only null-byte in the string.
- Loading branch information
Showing
7 changed files
with
352 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.