How to use the webiny-mysql-connection.MySQLConnection function in webiny-mysql-connection

To help you get started, we’ve selected a few webiny-mysql-connection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages-utils / webiny-entity-mysql / src / mysqlDriver.js View on Github external
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
        );
    }
github webiny / webiny-js / packages-utils / webiny-sql-table-mysql / src / mysqlDriver.js View on Github external
setConnection(connection: MySQL): MySQLDriver {
        this.connection = new MySQLConnection(connection);
        return this;
    }
github webiny / webiny-js / packages / webiny-entity-mysql / src / mysqlDriver.js View on Github external
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;
    }
github webiny / webiny-js / packages / webiny-api / src / setup / importData.js View on Github external
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);
};

webiny-mysql-connection

A MySQL connection handler.

MIT
Latest version published 6 years ago

Package Health Score

66 / 100
Full package analysis

Popular webiny-mysql-connection functions

Similar packages