mirror of
https://github.com/nushell/nushell.git
synced 2025-02-16 18:41:44 +01:00
Rename query dfr
-> query df
(#6777)
This commit is contained in:
parent
1a99893e2d
commit
ce809881eb
@ -13,7 +13,7 @@ mod last;
|
||||
mod list;
|
||||
mod melt;
|
||||
mod open;
|
||||
mod query_dfr;
|
||||
mod query_df;
|
||||
mod rename;
|
||||
mod sample;
|
||||
mod shape;
|
||||
@ -45,7 +45,7 @@ pub use last::LastDF;
|
||||
pub use list::ListDF;
|
||||
pub use melt::MeltDF;
|
||||
pub use open::OpenDataFrame;
|
||||
pub use query_dfr::QueryDfr;
|
||||
pub use query_df::QueryDf;
|
||||
pub use rename::RenameDF;
|
||||
pub use sample::SampleDF;
|
||||
pub use shape::ShapeDF;
|
||||
@ -87,7 +87,7 @@ pub fn add_eager_decls(working_set: &mut StateWorkingSet) {
|
||||
ListDF,
|
||||
MeltDF,
|
||||
OpenDataFrame,
|
||||
QueryDfr,
|
||||
QueryDf,
|
||||
RenameDF,
|
||||
SampleDF,
|
||||
ShapeDF,
|
||||
|
@ -14,11 +14,11 @@ use nu_protocol::{
|
||||
// https://github.com/pola-rs/polars/tree/master/polars-sql
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct QueryDfr;
|
||||
pub struct QueryDf;
|
||||
|
||||
impl Command for QueryDfr {
|
||||
impl Command for QueryDf {
|
||||
fn name(&self) -> &str {
|
||||
"query dfr"
|
||||
"query df"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
@ -40,7 +40,7 @@ impl Command for QueryDfr {
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Query dataframe using SQL",
|
||||
example: "[[a b]; [1 2] [3 4]] | into df | query dfr 'select a from df'",
|
||||
example: "[[a b]; [1 2] [3 4]] | into df | query df 'select a from df'",
|
||||
result: Some(
|
||||
NuDataFrame::try_from_columns(vec![Column::new(
|
||||
"a".to_string(),
|
||||
@ -101,6 +101,6 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_examples() {
|
||||
test_dataframe(vec![Box::new(QueryDfr {})])
|
||||
test_dataframe(vec![Box::new(QueryDf {})])
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user