client: add missing doccomments to command args

This commit is contained in:
2025-12-01 14:26:47 +09:00
parent d7b8167fd3
commit 16db753f3f
12 changed files with 15 additions and 8 deletions

View File

@@ -14,11 +14,11 @@ use tokio_stream::StreamExt;
#[derive(Parser, Debug, Clone)]
pub struct CheckAuthArgs {
/// The name of the database(s) or user(s) to check authorization for
/// The MySQL database(s) or user(s) to check authorization for
#[arg(num_args = 1..)]
name: Vec<String>,
/// Assume the names are users, not databases
/// Treat the provided names as users instead of databases
#[arg(short, long)]
users: bool,

View File

@@ -15,7 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct CreateDbArgs {
/// The name of the database(s) to create
/// The MySQL database(s) to create
#[arg(num_args = 1..)]
name: Vec<MySQLDatabase>,

View File

@@ -16,6 +16,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct CreateUserArgs {
/// The MySQL user(s) to create
#[arg(num_args = 1..)]
username: Vec<MySQLUser>,

View File

@@ -15,7 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct DropDbArgs {
/// The name of the database(s) to drop
/// The MySQL database(s) to drop
#[arg(num_args = 1..)]
name: Vec<MySQLDatabase>,

View File

@@ -15,6 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct DropUserArgs {
/// The MySQL user(s) to drop
#[arg(num_args = 1..)]
username: Vec<MySQLUser>,

View File

@@ -26,7 +26,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct EditPrivsArgs {
/// The name of the database to edit privileges for
/// The MySQL database to edit privileges for
pub name: Option<MySQLDatabase>,
#[arg(

View File

@@ -15,6 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct LockUserArgs {
/// The MySQL user(s) to lock
#[arg(num_args = 1..)]
username: Vec<MySQLUser>,

View File

@@ -17,9 +17,11 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct PasswdUserArgs {
/// The MySQL user whose password is to be changed
username: MySQLUser,
#[clap(short, long)]
/// Read the new password from a file instead of prompting for it
#[clap(short, long, value_name = "FILE")]
password_file: Option<String>,
/// Print the information as JSON

View File

@@ -13,7 +13,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct ShowDbArgs {
/// The name of the database(s) to show
/// The MySQL database(s) to show
#[arg(num_args = 0..)]
name: Vec<MySQLDatabase>,

View File

@@ -15,7 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct ShowPrivsArgs {
/// The name of the database(s) to show
/// The MySQL database(s) to show privileges for
#[arg(num_args = 0..)]
name: Vec<MySQLDatabase>,

View File

@@ -13,6 +13,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct ShowUserArgs {
/// The MySQL user(s) to show
#[arg(num_args = 0..)]
username: Vec<MySQLUser>,

View File

@@ -15,6 +15,7 @@ use crate::{
#[derive(Parser, Debug, Clone)]
pub struct UnlockUserArgs {
/// The MySQL user(s) to unlock
#[arg(num_args = 1..)]
username: Vec<MySQLUser>,