Create a row from positional values with variable names
(values: Vec<Value>, variables: &[String])
| 189 | |
| 190 | /// Create a row from positional values with variable names |
| 191 | pub fn from_positional(values: Vec<Value>, variables: &[String]) -> Self { |
| 192 | let mut named_values = HashMap::new(); |
| 193 | for (value, var_name) in values.iter().zip(variables.iter()) { |
| 194 | named_values.insert(var_name.clone(), value.clone()); |
| 195 | } |
| 196 | |
| 197 | Self { |
| 198 | values: named_values, |
| 199 | positional_values: values, |
| 200 | source_entities: HashMap::new(), |
| 201 | text_score: None, |
| 202 | highlight_snippet: None, |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | /// Set text search score |
| 207 | pub fn set_text_score(&mut self, score: f64) { |