Skip to main content

DefinitionPatch

Type Alias DefinitionPatch 

Source
pub type DefinitionPatch = HashMap<String, HashMap<String, String>>;
Expand description

This type defines patches for specific table definitions, in a ColumnName -> [key -> value] format.

Patches allow runtime modification of schema fields without changing the base schema files. They are stored separately and applied when loading definitions.

§Structure

The outer HashMap maps column names to their patches. The inner HashMap maps patch keys to their values. For table-wide patches (not specific to a column), use the special column name "-1".

§Example Patch Keys

  • "is_key": Override whether a field is a key field
  • "default_value": Override the default value
  • "is_filename": Override whether a field is a filename
  • "filename_relative_path": Override the relative filename path
  • "is_reference": Override reference information
  • "lookup": Override lookup columns
  • "lookup_hardcoded": Add hardcoded lookup values
  • "description": Override the field description
  • "not_empty": Mark the field as “cannot be empty”
  • "unused": Mark a field as unused

Aliased Type§

pub struct DefinitionPatch { /* private fields */ }