How to use the webiny-sql-table.ColumnsContainer function in webiny-sql-table

To help you get started, we’ve selected a few webiny-sql-table 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 / webiny-sql-table-mysql / lib / columnsContainer.js View on Github external
var _from2 = _interopRequireDefault(_from);

var _webinySqlTable = require("webiny-sql-table");

var _columns = require("./columns");

function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
}

/**
 * Contains basic columns. If needed, this class can be extended to add additional columns,
 * and then be set as a new columns container as the default one.
 */
class ColumnsContainer extends _webinySqlTable.ColumnsContainer {
    bigInt() {
        const column = new _columns.BigIntColumn(
            this.newColumnName,
            this,
            (0, _from2.default)(arguments)
        );
        this.columns.push(column);
        return column;
    }

    blob() {
        const column = new _columns.BlobColumn(this.newColumnName, this);
        this.columns.push(column);
        return column;
    }

webiny-sql-table

An SQL query builder.

MIT
Latest version published 6 years ago

Package Health Score

66 / 100
Full package analysis

Popular webiny-sql-table functions

Similar packages