From e92134c92d2c4a52deec8eed04bfacf554a86ddc Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 25 Mar 2022 18:45:14 +0000 Subject: [PATCH] Ensure we can retrieve subsequent object fields --- lib/src/sql/value/get.rs | 2 +- lib/src/sql/value/pick.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/sql/value/get.rs b/lib/src/sql/value/get.rs index 251ae9ad..fb46097b 100644 --- a/lib/src/sql/value/get.rs +++ b/lib/src/sql/value/get.rs @@ -30,7 +30,7 @@ impl Value { Some(v) => v.get(ctx, opt, txn, path.next()).await, None => Ok(Value::None), }, - Part::All => Ok(self.clone()), + Part::All => self.get(ctx, opt, txn, path.next()).await, _ => Ok(Value::None), }, // Current path part is an array diff --git a/lib/src/sql/value/pick.rs b/lib/src/sql/value/pick.rs index 30c88c21..d836749b 100644 --- a/lib/src/sql/value/pick.rs +++ b/lib/src/sql/value/pick.rs @@ -13,7 +13,7 @@ impl Value { Some(v) => v.pick(path.next()), None => Value::None, }, - Part::All => self.clone(), + Part::All => self.pick(path.next()), _ => Value::None, }, // Current path part is an array