1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: views edit

This commit is contained in:
2020-12-26 15:37:34 +01:00
parent dcf469ebed
commit 56f2a27f00
7 changed files with 368 additions and 9 deletions

View File

@ -295,6 +295,18 @@ export class MySQLClient extends AntaresCore {
return await this.raw(sql);
}
/**
* ALTER VIEW
*
* @returns {Array.<Object>} parameters
* @memberof MySQLClient
*/
async alterView (params) {
const { view } = params;
const sql = `ALTER ALGORITHM = ${view.algorithm} DEFINER=${view.definer} SQL SECURITY ${view.security} VIEW \`${view.name}\` AS ${view.sql} ${view.updateOption ? `WITH ${view.updateOption} CHECK OPTION` : ''}`;
return await this.raw(sql);
}
/**
* SHOW COLLATION
*