From ef92f92990171ba9c1da803a7ad124fd3cb6cc91 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 28 Jul 2022 11:48:58 -0700 Subject: [PATCH] docs for both --- go/cmd/dolt/commands/sql.go | 4 ++-- go/cmd/dolt/commands/sqlserver/sqlserver.go | 26 ++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go/cmd/dolt/commands/sql.go b/go/cmd/dolt/commands/sql.go index 78703d50a3..fc00e6d039 100644 --- a/go/cmd/dolt/commands/sql.go +++ b/go/cmd/dolt/commands/sql.go @@ -153,10 +153,10 @@ func (cmd SqlCmd) ArgParser() *argparser.ArgParser { ap.SupportsFlag(BatchFlag, "b", "Use to enable more efficient batch processing for large SQL import scripts consisting of only INSERT statements. Other statements types are not guaranteed to work in this mode.") ap.SupportsString(DataDirFlag, "", "directory", "Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases within. Defaults to the current directory.") ap.SupportsString(MultiDBDirFlag, "", "directory", "DEPRECATED: Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases within. Defaults to the current directory.") - ap.SupportsString(CfgDirFlag, "", "directory", "Defines a directory that contains configuration files for dolt. Defaults to `$data-dir/.doltcfg`. Will only be created if there is a change that affect configuration settings.") + ap.SupportsString(CfgDirFlag, "", "directory", "Defines a directory that contains configuration files for dolt (default `$data-dir/.doltcfg`). Will only be created if there is a change that affect configuration settings.") ap.SupportsFlag(continueFlag, "c", "Continue running queries on an error. Used for batch mode only.") ap.SupportsString(fileInputFlag, "", "input file", "Execute statements from the file given.") - ap.SupportsString(PrivsFilePathFlag, "", "privilege file", "Path to a file to load and store users and grants. Defaults to `$doltcfg-dir/privileges.db`. Will only be created if there is a change to privileges.") + ap.SupportsString(PrivsFilePathFlag, "", "privilege file", "Path to a file to load and store users and grants (defaults to `$doltcfg-dir/privileges.db`). Will only be created if there is a change to privileges.") ap.SupportsString(UserFlag, "u", "user", fmt.Sprintf("Defines the local superuser (defaults to `%v`). If the specified user exists, will take on permissions of that user.", DefaultUser)) return ap } diff --git a/go/cmd/dolt/commands/sqlserver/sqlserver.go b/go/cmd/dolt/commands/sqlserver/sqlserver.go index df006f42bd..34f84588e0 100644 --- a/go/cmd/dolt/commands/sqlserver/sqlserver.go +++ b/go/cmd/dolt/commands/sqlserver/sqlserver.go @@ -131,23 +131,23 @@ func (cmd SqlServerCmd) ArgParser() *argparser.ArgParser { ap := argparser.NewArgParser() ap.SupportsString(configFileFlag, "", "file", "When provided configuration is taken from the yaml config file and all command line parameters are ignored.") - ap.SupportsString(hostFlag, "H", "host address", fmt.Sprintf("Defines the host address that the server will run on (default `%v`)", serverConfig.Host())) - ap.SupportsUint(portFlag, "P", "port", fmt.Sprintf("Defines the port that the server will run on (default `%v`)", serverConfig.Port())) + ap.SupportsString(hostFlag, "H", "host address", fmt.Sprintf("Defines the host address that the server will run on (default `%v`).", serverConfig.Host())) + ap.SupportsUint(portFlag, "P", "port", fmt.Sprintf("Defines the port that the server will run on (default `%v`).", serverConfig.Port())) ap.SupportsString(commands.UserFlag, "u", "user", fmt.Sprintf("Defines the server user (default `%v`). This should be explicit if desired.", serverConfig.User())) ap.SupportsString(passwordFlag, "p", "password", fmt.Sprintf("Defines the server password (default `%v`)", serverConfig.Password())) - ap.SupportsInt(timeoutFlag, "t", "connection timeout", fmt.Sprintf("Defines the timeout, in seconds, used for connections\nA value of `0` represents an infinite timeout (default `%v`)", serverConfig.ReadTimeout())) - ap.SupportsFlag(readonlyFlag, "r", "Disable modification of the database") - ap.SupportsString(logLevelFlag, "l", "log level", fmt.Sprintf("Defines the level of logging provided\nOptions are: `trace', `debug`, `info`, `warning`, `error`, `fatal` (default `%v`)", serverConfig.LogLevel())) + ap.SupportsInt(timeoutFlag, "t", "connection timeout", fmt.Sprintf("Defines the timeout, in seconds, used for connections\nA value of `0` represents an infinite timeout (default `%v`).", serverConfig.ReadTimeout())) + ap.SupportsFlag(readonlyFlag, "r", "Disable modification of the database.") + ap.SupportsString(logLevelFlag, "l", "log level", fmt.Sprintf("Defines the level of logging provided\nOptions are: `trace', `debug`, `info`, `warning`, `error`, `fatal` (default `%v`).", serverConfig.LogLevel())) ap.SupportsString(commands.DataDirFlag, "", "directory", "Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases within. Defaults to the current directory.") ap.SupportsString(commands.MultiDBDirFlag, "", "directory", "Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases within. Defaults to the current directory. This is deprecated, you should use --data-dir instead.") - ap.SupportsString(commands.CfgDirFlag, "", "directory", "Defines a directory that contains configuration files for dolt. Defaults to $data-dir/.doltcfg.") - ap.SupportsFlag(noAutoCommitFlag, "", "Set @@autocommit = off for the server") - ap.SupportsInt(queryParallelismFlag, "", "num-go-routines", fmt.Sprintf("Set the number of go routines spawned to handle each query (default `%d`)", serverConfig.QueryParallelism())) - ap.SupportsInt(maxConnectionsFlag, "", "max-connections", fmt.Sprintf("Set the number of connections handled by the server (default `%d`)", serverConfig.MaxConnections())) - ap.SupportsString(persistenceBehaviorFlag, "", "persistence-behavior", fmt.Sprintf("Indicate whether to `load` or `ignore` persisted global variables (default `%s`)", serverConfig.PersistenceBehavior())) - ap.SupportsString(commands.PrivsFilePathFlag, "", "privilege file", "Path to a file to load and store users and grants. Defaults to $doltcfg-dir/privileges.db") - ap.SupportsString(allowCleartextPasswordsFlag, "", "allow-cleartext-passwords", "Allows use of cleartext passwords. Defaults to false.") - ap.SupportsString(socketFlag, "", "socket file", "Path for the unix socket file. Defaults to '/tmp/mysql.sock'") + ap.SupportsString(commands.CfgDirFlag, "", "directory", "Defines a directory that contains configuration files for dolt. Defaults to `$data-dir/.doltcfg`. Will only be created if there is a change that affect configuration settings.") + ap.SupportsFlag(noAutoCommitFlag, "", "Set @@autocommit = off for the server.") + ap.SupportsInt(queryParallelismFlag, "", "num-go-routines", fmt.Sprintf("Set the number of go routines spawned to handle each query (default `%d`).", serverConfig.QueryParallelism())) + ap.SupportsInt(maxConnectionsFlag, "", "max-connections", fmt.Sprintf("Set the number of connections handled by the server (default `%d`).", serverConfig.MaxConnections())) + ap.SupportsString(persistenceBehaviorFlag, "", "persistence-behavior", fmt.Sprintf("Indicate whether to `load` or `ignore` persisted global variables (default `%s`).", serverConfig.PersistenceBehavior())) + ap.SupportsString(commands.PrivsFilePathFlag, "", "privilege file", "Path to a file to load and store users and grants (defaults to `$doltcfg-dir/privileges.db`). Will only be created if there is a change to privileges.") + ap.SupportsString(allowCleartextPasswordsFlag, "", "allow-cleartext-passwords", "Allows use of cleartext passwords (default false).") + ap.SupportsString(socketFlag, "", "socket file", "Path for the unix socket file (default '/tmp/mysql.sock').") return ap }