MySQL Shell 9.5 / Extending MySQL Shell / Custom SQL Handler
Theshell global object is extended withregister_Sql_Handler, a function which enables you to register a custom SQL handler. This handler can execute pre-processing steps for the given SQL statements and extend the supported SQL statements with non-standard SQL.
The SQL handler detects SQL statements executed in one of the following ways:
Using the
\sqlcommandSQLmode.The
runSQLfunction in session objects.Using the
--execute/-ecommand line option.Using the
--file/-fcommand line option.