mysql new object templates

This commit is contained in:
Jan Prochazka 2021-12-09 11:24:39 +01:00
parent ad2c293f6f
commit 8f4e9f9253

View File

@ -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} */