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 expanded docs for sql-mode commands. #758

Merged
merged 2 commits into from
Mar 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions commands/databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -1074,16 +1074,21 @@ func sqlMode() *Command {
Command: &cobra.Command{
Use: "sql-mode",
Aliases: []string{"sm"},
Short: "database sql-mode commands",
Long: "sql-mode is used to access database sql-mode commands",
Short: "Display commands to configure a MySQL database cluster's SQL modes",
Long: "The subcommands of `doctl databases sql-mode` are used to view and configure a MySQL database cluster's global SQL modes.",
},
}

CmdBuilder(cmd, RunDatabaseGetSQLModes, "get <database-id>",
"get sql modes", Writer,
getSqlModeDesc := "This command displays the the configured SQL modes for the specified MySQL database cluster."
CmdBuilderWithDocs(cmd, RunDatabaseGetSQLModes, "get <database-id>",
"Get a MySQL database cluster's SQL modes", getSqlModeDesc, Writer,
displayerType(&displayers.DatabaseSQLModes{}), aliasOpt("g"))
CmdBuilder(cmd, RunDatabaseSetSQLModes, "set <database-id> <sql-mode-1> ... <sql-mode-n>",
"set sql modes", Writer, aliasOpt("s"))
setSqlModeDesc := `This command configures the SQL modes for the specified MySQL database cluster. The SQL modes should be provided as a space separated list.

This will replace the existing SQL mode configuration completely. Include all of the current values when adding a new one.
`
CmdBuilderWithDocs(cmd, RunDatabaseSetSQLModes, "set <database-id> <sql-mode-1> ... <sql-mode-n>",
"Set a MySQL database cluster's SQL modes", setSqlModeDesc, Writer, aliasOpt("s"))

return cmd
}
Expand Down