MCPcopy Create free account
hub / github.com/digitalocean/doctl / RunDatabaseSetSQLModes

Function RunDatabaseSetSQLModes

commands/databases.go:1963–1972  ·  view source on GitHub ↗

RunDatabaseSetSQLModes sets the sql modes on the database

(c *CmdConfig)

Source from the content-addressed store, hash-verified

1961
1962// RunDatabaseSetSQLModes sets the sql modes on the database
1963func RunDatabaseSetSQLModes(c *CmdConfig) error {
1964 if len(c.Args) < 2 {
1965 return doctl.NewMissingArgsErr(c.NS)
1966 }
1967
1968 databaseID := c.Args[0]
1969 sqlModes := c.Args[1:]
1970
1971 return c.Databases().SetSQLMode(databaseID, sqlModes...)
1972}
1973
1974func RunDatabaseTopicList(c *CmdConfig) error {
1975 if len(c.Args) == 0 {

Callers 1

TestDatabaseSetSQLModesFunction · 0.85

Calls 2

NewMissingArgsErrFunction · 0.92
SetSQLModeMethod · 0.65

Tested by 1

TestDatabaseSetSQLModesFunction · 0.68