MCPcopy Index your code
hub / github.com/dbcli/mycli / main_batch_from_stdin

Function main_batch_from_stdin

mycli/main_modes/batch.py:216–224  ·  view source on GitHub ↗
(mycli: 'MyCli', cli_args: 'CliArgs')

Source from the content-addressed store, hash-verified

214
215
216def main_batch_from_stdin(mycli: 'MyCli', cli_args: 'CliArgs') -> int:
217 batch_h = click.get_text_stream('stdin')
218 try:
219 for statement, counter in statements_from_filehandle(batch_h):
220 dispatch_batch_statements(mycli, cli_args, statement, counter)
221 except (ValueError, StopIteration, IOError, OSError, pymysql.err.Error) as e:
222 click.secho(str(e), err=True, fg='red')
223 return 1
224 return 0

Callers 1

run_from_cli_argsFunction · 0.90

Calls 2

Tested by

no test coverage detected