Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options: MySQLDriverOptions) {
super();
this.operators = { ...operators, ...options.operators };
this.connection = new MySQLConnection(options.connection);
this.model = options.model || MySQLModel;
this.tables = _.merge(
{
prefix: "",
naming: null
},
options.tables
);
}
setConnection(connection: MySQL): MySQLDriver {
this.connection = new MySQLConnection(connection);
return this;
}
constructor(options: MySQLDriverOptions) {
super();
this.operators = { ...operators, ...(options.operators || {}) };
this.connection = new MySQLConnection(options.connection);
this.model = options.model || MySQLModel;
this.tables = {
prefix: "",
...(options.tables || {})
};
this.autoIncrementIds = options.autoIncrementIds || false;
}
import { connection } from "./database";
import { securitySettings, adminUser, groups } from "./sql";
import { MySQLConnection } from "webiny-mysql-connection";
const mysql = new MySQLConnection(connection);
export default async () => {
await mysql.query(securitySettings);
await mysql.query(adminUser);
await mysql.query(groups.admin);
await mysql.query(groups.security);
await mysql.query(groups.default);
};