| 1 | <?php |
||
| 10 | class ConsoleCommand extends AbstractDatabaseCommand |
||
| 11 | { |
||
| 12 | protected function configure() |
||
| 13 | { |
||
| 14 | $this |
||
| 15 | ->setName('db:console') |
||
| 16 | ->setAliases(array('mysql-client')) |
||
| 17 | ->addOption( |
||
| 18 | 'use-mycli-instead-of-mysql', |
||
| 19 | null, |
||
| 20 | InputOption::VALUE_NONE, |
||
| 21 | 'Use `mycli` as the MySQL client instead of `mysql`' |
||
| 22 | ) |
||
| 23 | ->addOption( |
||
| 24 | 'no-auto-rehash', |
||
| 25 | null, |
||
| 26 | InputOption::VALUE_NONE, |
||
| 27 | 'Same as `-A` option to MySQL client to turn off ' . |
||
| 28 | 'auto-complete (avoids long initial connection time).' |
||
| 29 | ) |
||
| 30 | ->setDescription('Opens mysql client by database config from local.xml'); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param InputInterface $input |
||
| 35 | * @param OutputInterface $output |
||
| 36 | * |
||
| 37 | * @return int|void |
||
| 38 | */ |
||
| 39 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 63 | } |
||
| 64 |