diff --git a/plugins/dbgate-plugin-mysql/src/frontend/drivers.js b/plugins/dbgate-plugin-mysql/src/frontend/drivers.js index 8ee0cb767..c07e85feb 100644 --- a/plugins/dbgate-plugin-mysql/src/frontend/drivers.js +++ b/plugins/dbgate-plugin-mysql/src/frontend/drivers.js @@ -40,6 +40,14 @@ const mysqlDriverBase = { dialect, defaultPort: 3306, getQuerySplitterOptions: () => mysqlSplitterOptions, + + getNewObjectTemplates() { + return [ + { label: 'New view', sql: 'CREATE VIEW myview\nAS\nSELECT * FROM table1' }, + { label: 'New procedure', sql: 'DELIMITER //\n\nCREATE PROCEDURE myproc (IN arg1 INT)\nBEGIN\n SELECT * FROM table1;\nEND\n\nDELIMITER ;' }, + { label: 'New function', sql: 'CREATE FUNCTION myfunc (arg1 INT)\nRETURNS INT DETERMINISTIC\nRETURN 1' }, + ]; + }, }; /** @type {import('dbgate-types').EngineDriver} */