variable_section_values

0 rows


Description

Fragments of the contents of document sections. Each fragment is either a block of text or a usage of a variable; they are assembled in order to render the contents of the section.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
variable_value_id int8 19 null
variable_values.id variable_section_values_variable_value_id_variable_id_vari_fkeyR
variable_id int8 19 null
variables.id variable_section_values_variable_id_fkeyR
variable_values.variable_id variable_section_values_variable_value_id_variable_id_vari_fkeyR
variable_type_id int4 10 null
variable_values.variable_type_id variable_section_values_variable_value_id_variable_id_vari_fkeyR
variable_types.id variable_section_values_variable_type_id_fkeyR
usage_type_id int4 10 null
variable_usage_types.id variable_section_values_usage_type_id_fkeyR
text_value text 2147483647 null
used_variable_id int8 19 null
variables.id variable_section_values_used_variable_id_used_variable_typ_fkeyR
used_variable_type_id int4 10 null
variables.variable_type_id variable_section_values_used_variable_id_used_variable_typ_fkeyR
variable_types.id variable_section_values_used_variable_type_id_fkeyR
display_style_id int4 10 null
variable_injection_display_styles.id variable_section_values_display_style_id_fkeyR

Indexes

Constraint Name Type Sort Column(s)
variable_section_values_pkey Primary key Asc variable_value_id
variable_section_values_used_variable_id_idx Performance Asc used_variable_id

Check Constraints

Constraint Name Constraint
injection_has_display_style (((usage_type_id = 1) = (display_style_id IS NOT NULL)))
must_have_text_or_reference (((text_value IS NOT NULL) OR (used_variable_id IS NOT NULL)))
reference_only_for_figures_and_sections (((usage_type_id <> 2) OR (used_variable_type_id = ANY (ARRAY[4, 6, 8]))))
usages_must_have_types (((used_variable_id IS NULL) = (usage_type_id IS NULL)))
cannot_reference_other_sections (((used_variable_type_id IS NULL) OR (used_variable_type_id <> 8)))
cannot_have_both_text_and_reference (((text_value IS NULL) OR (used_variable_id IS NULL)))
cannot_inject_sections ((NOT ((usage_type_id = 1) AND (used_variable_type_id = 8))))

Relationships