Skip to main content

get_next_id_from_array

Function get_next_id_from_array 

Source
pub fn get_next_id_from_array(array: &[Value], id_field: &str) -> Result<i64>
Expand description

Get the next available ID for a config array

Finds the maximum value of the specified ID field and returns max + 1

§Arguments

  • array - Array of configuration items
  • id_field - Name of the ID field (e.g., “DSRC_ID”, “ATTR_ID”)

§Returns

Next available ID value