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

Add config track_query_stats #1411

Merged
merged 2 commits into from
Nov 27, 2024
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
4 changes: 4 additions & 0 deletions src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ pub async fn configure(
C::Set(Set {
parameter: S::WarnOldScoping(ConfigStr { value }),
}) => set(cli, "warn_old_scoping", None, value).await,
C::Set(Set {
parameter: S::TrackQueryStats(ConfigStr { value }),
}) => set(cli, "track_query_stats", None, value).await,
C::Reset(Res { parameter }) => {
use crate::commands::parser::ConfigParameter as C;
let name = match parameter {
Expand Down Expand Up @@ -236,6 +239,7 @@ pub async fn configure(
C::CurrentEmailProviderName => "current_email_provider_name",
C::SimpleScoping => "simple_scoping",
C::WarnOldScoping => "warn_old_scoping",
C::TrackQueryStats => "track_query_stats",
};
let (status, _warnings) = cli
.execute(&format!("CONFIGURE INSTANCE RESET {name}"), &())
Expand Down
5 changes: 5 additions & 0 deletions src/commands/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ pub enum ValueParameter {

/// Whether to warn when depending on old scoping behavior.
WarnOldScoping(ConfigStr),

/// Select what queries are tracked in sys::QueryStats.
TrackQueryStats(ConfigStr),
}

#[derive(clap::Subcommand, Clone, Debug)]
Expand Down Expand Up @@ -665,6 +668,8 @@ pub enum ConfigParameter {
SimpleScoping,
/// Whether to warn when depending on old scoping behavior.
WarnOldScoping,
/// Select what queries are tracked in sys::QueryStats.
TrackQueryStats,
}

#[derive(clap::Args, Clone, Debug)]
Expand Down
Loading