forked from extern/nushell
Revert query
command to query db
(#6200)
This commit is contained in:
@ -13,17 +13,17 @@ pub struct QueryDb;
|
||||
|
||||
impl Command for QueryDb {
|
||||
fn name(&self) -> &str {
|
||||
"query"
|
||||
"query db"
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build(self.name())
|
||||
.required(
|
||||
"query",
|
||||
"SQL",
|
||||
SyntaxShape::String,
|
||||
"SQL to execute against the database",
|
||||
)
|
||||
.input_type(Type::Custom("database".into()))
|
||||
.input_type(Type::Any)
|
||||
.output_type(Type::Any)
|
||||
.category(Category::Custom("database".into()))
|
||||
}
|
||||
@ -34,8 +34,8 @@ impl Command for QueryDb {
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Execute a query statement using the database connection",
|
||||
example: r#"open foo.db | into db | query "SELECT * FROM Bar""#,
|
||||
description: "Execute SQL against a SQLite database",
|
||||
example: r#"open foo.db | query db "SELECT * FROM Bar""#,
|
||||
result: None,
|
||||
}]
|
||||
}
|
||||
|
Reference in New Issue
Block a user