{
  "id": "mysql",
  "name": "MySQL",
  "homepage": "https://dev.mysql.com/doc/refman/8.4/en/mysql.html",
  "description": "mysql is a simple SQL shell with input line editing capabilities.",
  "icon": "SimpleIcons:mysql",
  "executables": [
    "mysql"
  ],
  "dotfiles": {
    "paths": [
      "~/.my.cnf"
    ],
    "exclude": [
      "~/.mysql_history"
    ],
    "secret": [
      "~/.mylogin.cnf",
      "%APPDATA%/MySQL/.mylogin.cnf"
    ],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.my.cnf",
        "match": {
          "prefix": [
            "password"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.my.cnf",
        "match": {
          "prefix": [
            "socket"
          ]
        },
        "scope": "platform"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Connect to a server",
    "description": "Open the mysql client or run one statement. Passwords are left out; use -p at the prompt, a login path or an option file. SSL and compression tuning are left out.",
    "quality": "ai-draft",
    "base": "fig:mysql",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/mysql.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "host",
        "label": "Host",
        "type": "string",
        "option": [
          "--host",
          "-h"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "port",
        "label": "Port",
        "type": "integer",
        "option": [
          "--port",
          "-P"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "user",
        "label": "User",
        "type": "string",
        "option": [
          "--user",
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "database",
        "label": "Database",
        "type": "string",
        "option": [
          "--database",
          "-D"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "execute",
        "label": "Execute statement and quit",
        "type": "string",
        "option": [
          "--execute",
          "-e"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "login_path",
        "label": "Login path",
        "type": "string",
        "option": [
          "--login-path"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "protocol",
        "label": "Protocol",
        "type": "string",
        "option": [
          "--protocol"
        ],
        "suggestions": [
          {
            "value": "TCP",
            "label": "TCP"
          },
          {
            "value": "SOCKET",
            "label": "SOCKET"
          },
          {
            "value": "PIPE",
            "label": "PIPE"
          },
          {
            "value": "MEMORY",
            "label": "MEMORY"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "table",
        "label": "Tabular output",
        "type": "boolean",
        "option": [
          "--table",
          "-t"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "vertical",
        "label": "Vertical output",
        "type": "boolean",
        "option": [
          "--vertical",
          "-E"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "batch",
        "label": "Batch mode",
        "type": "boolean",
        "option": [
          "--batch",
          "-B"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "skip_column_names",
        "label": "Skip column names",
        "type": "boolean",
        "option": [
          "--skip-column-names",
          "-N"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "force",
        "label": "Continue after SQL errors",
        "type": "boolean",
        "option": [
          "--force",
          "-f"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "safe_updates",
        "label": "Safe updates",
        "type": "boolean",
        "option": [
          "--safe-updates",
          "-U"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "charset",
        "label": "Default character set",
        "type": "string",
        "option": [
          "--default-character-set"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "connect",
        "label": "Connect",
        "fields": [
          "host",
          "port",
          "user",
          "database"
        ],
        "required": []
      },
      {
        "id": "query",
        "label": "Run one statement",
        "fields": [
          "host",
          "user",
          "database",
          "execute",
          "table"
        ],
        "required": [
          "execute"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "host",
          "port",
          "user",
          "database",
          "execute"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "login_path",
          "protocol",
          "table",
          "vertical",
          "batch",
          "skip_column_names",
          "force",
          "safe_updates",
          "charset"
        ]
      }
    ]
  }
}
