Skip to main content

validate_row

Function validate_row 

Source
pub fn validate_row(
    table: &Table,
    row: &Map<String, Value>,
) -> Result<(), ValidationError>
Expand description

Validate a JSON row against a table definition.

Checks performed:

  • not-null constraints
  • type compatibility with the column’s ColumnType
  • enum_values membership
  • numeric min / max
  • string/bytes min_length / max_length
  • regex pattern match
  • JSON parseability for Json columns
  • table-level check_constraints names (validation of the expression itself is left to the runtime that registered the named check)