forked from extern/nushell
sqlite query without collect (#6217)
This commit is contained in:
parent
233afebdf0
commit
e7958bebac
@ -366,6 +366,8 @@ impl CustomValue for SQLiteDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn to_base_value(&self, span: Span) -> Result<Value, ShellError> {
|
fn to_base_value(&self, span: Span) -> Result<Value, ShellError> {
|
||||||
|
match self.statement {
|
||||||
|
None => {
|
||||||
let db = open_sqlite_db(self.connection.as_path(span)?, span)?;
|
let db = open_sqlite_db(self.connection.as_path(span)?, span)?;
|
||||||
read_entire_sqlite_db(db, span).map_err(|e| {
|
read_entire_sqlite_db(db, span).map_err(|e| {
|
||||||
ShellError::GenericError(
|
ShellError::GenericError(
|
||||||
@ -377,6 +379,9 @@ impl CustomValue for SQLiteDatabase {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Some(_) => self.collect(span),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn as_any(&self) -> &dyn std::any::Any {
|
fn as_any(&self) -> &dyn std::any::Any {
|
||||||
self
|
self
|
||||||
|
Loading…
Reference in New Issue
Block a user