diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-01-17 15:43:52 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-01-17 15:57:37 +0200 |
| commit | 75a9d560a69312bcf4dd0b9d3f00564a78e7c120 (patch) | |
| tree | f1a6ba1ae39a73a2fcf4b9bd137144cd9247a63e /log_db/src/engine.rs | |
| parent | 98430c35eeb27b1bb3c7ac7a9e30a6918514358a (diff) | |
Refactor public interface
Diffstat (limited to 'log_db/src/engine.rs')
| -rw-r--r-- | log_db/src/engine.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/log_db/src/engine.rs b/log_db/src/engine.rs index ef73db2..2858bab 100644 --- a/log_db/src/engine.rs +++ b/log_db/src/engine.rs @@ -78,8 +78,8 @@ impl<R: Recordable> Engine<R> { DBError::ValidationError("Key must be present in the field schema".to_owned()), )?; - match value_type.prim_value_type { - PrimValueType::Int | PrimValueType::String => {} + match value_type.primitive { + PrimitiveType::Int | PrimitiveType::String => {} _ => return Err(DBError::ValidationError("Key must be indexable".to_owned())), } } @@ -454,9 +454,9 @@ impl<R: Recordable> Engine<R> { ) -> DBResult<Vec<Record>> { fn range_bound_to_indexable( bound: Bound<&Value>, - field_type: &ValueType, + field_type: &Type, ) -> DBResult<Bound<IndexableValue>> { - fn convert(value: &Value, field_type: &ValueType) -> DBResult<IndexableValue> { + fn convert(value: &Value, field_type: &Type) -> DBResult<IndexableValue> { if !type_check(&value, field_type) { return Err(DBError::ValidationError(format!( "Queried value does not match type: {:?}", @@ -737,7 +737,7 @@ impl<R: Recordable> Engine<R> { } #[inline] - fn get_field_type(&self, field: &R::Field) -> Option<&ValueType> { + fn get_field_type(&self, field: &R::Field) -> Option<&Type> { self.config .fields .iter() |
