From 26de0b5c46211ce9443bf75abae6aafc65a7f822 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 22 Sep 2022 16:58:59 +0100 Subject: [PATCH] Add additional convenience functions on Value type --- lib/src/sql/value/value.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/sql/value/value.rs b/lib/src/sql/value/value.rs index 8fafe0e3..85025a03 100644 --- a/lib/src/sql/value/value.rs +++ b/lib/src/sql/value/value.rs @@ -535,6 +535,14 @@ impl Value { matches!(self, Value::Thing(_)) } + pub fn is_model(&self) -> bool { + matches!(self, Value::Model(_)) + } + + pub fn is_range(&self) -> bool { + matches!(self, Value::Range(_)) + } + pub fn is_strand(&self) -> bool { matches!(self, Value::Strand(_)) }