Skip to content
Permalink
Browse files
Add expanded docs for sql-mode commands.
  • Loading branch information
andrewsomething committed Mar 6, 2020
1 parent cd06cef commit ae68629b95e0d1cb2552cabc07978cf2e1965c6f
Showing 1 changed file with 11 additions and 6 deletions.
@@ -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
}

0 comments on commit ae68629

Please sign in to comment.