mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
Remove clone in vtab from_args
This commit is contained in:
parent
e63436dc47
commit
9b742e1a76
4 changed files with 9 additions and 6 deletions
|
@ -532,7 +532,7 @@ impl VirtualTable {
|
|||
args: Vec<limbo_ext::Value>,
|
||||
syms: &SymbolTable,
|
||||
kind: VTabKind,
|
||||
exprs: &Option<Vec<ast::Expr>>,
|
||||
exprs: Option<Vec<ast::Expr>>,
|
||||
) -> Result<Rc<Self>> {
|
||||
let module = syms
|
||||
.vtab_modules
|
||||
|
@ -559,7 +559,7 @@ impl VirtualTable {
|
|||
name: tbl_name.unwrap_or(module_name).to_owned(),
|
||||
implementation: module.implementation.clone(),
|
||||
columns,
|
||||
args: exprs.clone(),
|
||||
args: exprs,
|
||||
});
|
||||
return Ok(vtab);
|
||||
}
|
||||
|
|
|
@ -376,9 +376,12 @@ fn parse_from_clause_table<'a>(
|
|||
.push(TableReference::new_subquery(identifier, subplan, None));
|
||||
Ok(())
|
||||
}
|
||||
ast::SelectTable::TableCall(qualified_name, ref maybe_args, maybe_alias) => {
|
||||
ast::SelectTable::TableCall(qualified_name, maybe_args, maybe_alias) => {
|
||||
let normalized_name = &normalize_ident(qualified_name.name.0.as_str());
|
||||
let args = vtable_args(maybe_args.as_ref().unwrap_or(&vec![]).as_slice());
|
||||
let args = match maybe_args {
|
||||
Some(ref args) => vtable_args(args),
|
||||
None => vec![],
|
||||
};
|
||||
let vtab = crate::VirtualTable::from_args(
|
||||
None,
|
||||
normalized_name,
|
||||
|
|
|
@ -906,7 +906,7 @@ impl Program {
|
|||
args,
|
||||
&conn.db.syms.borrow(),
|
||||
limbo_ext::VTabKind::VirtualTable,
|
||||
&None,
|
||||
None,
|
||||
)?;
|
||||
{
|
||||
conn.db
|
||||
|
|
|
@ -142,7 +142,7 @@ def test_output_file():
|
|||
|
||||
expected_lines = {
|
||||
f"Output: {output_filename}": "Can direct output to a file",
|
||||
"Output mode: raw": "Output mode remains raw when output is redirected",
|
||||
"Output mode: list": "Output mode remains list when output is redirected",
|
||||
"Error: pretty output can only be written to a tty": "Error message for pretty mode",
|
||||
"SELECT 'TEST_ECHO'": "Echoed command",
|
||||
"TEST_ECHO": "Echoed result",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue