pub async fn create_trigger_by_range( &self, request_id: String, table_names: Vec<String>, column_name: String, min: f64, max: f64, ) -> Result<CreateTriggerByRangeResponse, KineticaError>
Create a table trigger for new records falling within a 1-D range
Sets up a simple range trigger for a column_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via /insert/records with the chosen column_name’s value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via /show/system/status) for any listening client to collect. Active triggers can be cancelled by using the /clear/trigger endpoint or by clearing all relevant tables.
The output returns the trigger handle as well as indicating success or failure of the trigger activation.
request_id- User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.table_names- Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.column_name- Name of a numeric column_name on which the trigger is activated.min- The lower bound (inclusive) for the trigger range.max- The upper bound (inclusive) for the trigger range.
pub async fn create_trigger_by_range_with_opts( &self, request_id: String, table_names: Vec<String>, column_name: String, min: f64, max: f64, options: CreateTriggerByRangeRequestOptions, ) -> Result<CreateTriggerByRangeResponse, KineticaError>
Create a table trigger for new records falling within a 1-D range
Sets up a simple range trigger for a column_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via /insert/records with the chosen column_name’s value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via /show/system/status) for any listening client to collect. Active triggers can be cancelled by using the /clear/trigger endpoint or by clearing all relevant tables.
The output returns the trigger handle as well as indicating success or failure of the trigger activation.
request_id- User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.table_names- Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.column_name- Name of a numeric column_name on which the trigger is activated.min- The lower bound (inclusive) for the trigger range.max- The upper bound (inclusive) for the trigger range.options- The optional parameters; any left unset take the server’s defaults.
pub async fn create_trigger_by_range_raw( &self, request: &CreateTriggerByRangeRequest, ) -> Result<CreateTriggerByRangeResponse, KineticaError>
Sends a pre-built CreateTriggerByRangeRequest to the /create/trigger/byrange endpoint.
pub async fn create_trigger_by_range_from_url( &self, url: &str, request: &CreateTriggerByRangeRequest, ) -> Result<CreateTriggerByRangeResponse, KineticaError>
Sends a pre-built CreateTriggerByRangeRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.