14 lines
208 B
Rust
14 lines
208 B
Rust
|
use crate::sql::value::Value;
|
||
|
|
||
|
impl Value {
|
||
|
pub fn single(&self) -> &Self {
|
||
|
match self {
|
||
|
Value::Array(v) => match v.value.first() {
|
||
|
None => &Value::None,
|
||
|
Some(v) => v,
|
||
|
},
|
||
|
v => v,
|
||
|
}
|
||
|
}
|
||
|
}
|