Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump-toolchain #127

Merged
merged 6 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repository = "https://github.com/datafuselabs/databend-client"
[dependencies]
anyhow = "1.0.70"
async-trait = "0.1.68"
atty = "0.2.14"
chrono = { version = "0.4.24", default-features = false, features = ["clock"] }
clap = { version = "4.1.0", features = ["derive", "env"] }
comfy-table = "6.1.4"
Expand Down
9 changes: 6 additions & 3 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ mod display;
mod helper;
mod session;

use std::{collections::BTreeMap, io::stdin};
use std::{
collections::BTreeMap,
io::{stdin, IsTerminal},
};

use anyhow::{anyhow, Result};
use clap::{CommandFactory, Parser, ValueEnum};
Expand Down Expand Up @@ -264,8 +267,8 @@ pub async fn main() -> Result<()> {
}
};
let mut settings = Settings::default();

let is_repl = atty::is(atty::Stream::Stdin) && !args.non_interactive && args.query.is_none();
let is_terminal = stdin().is_terminal();
let is_repl = is_terminal && !args.non_interactive && args.query.is_none();
if is_repl {
settings.display_pretty_sql = true;
settings.show_progress = true;
Expand Down
2 changes: 1 addition & 1 deletion driver/tests/driver/select_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async fn select_decimal() {
Value::Number(NumberValue::Decimal128(
100i128,
DecimalSize {
precision: 15,
precision: 3,
scale: 2
},
)),
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[toolchain]
channel = "stable"
date = "2023-06-01"
components = ["rustfmt", "clippy"]