timw4mail/node-query

View on GitHub
lib/State.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Class for objects containing the query builder state
 * @private
 */
class State {
    constructor () {
        // Arrays/maps
        this.queryMap = [];
        this.values = [];
        this.whereValues = [];
        this.setArrayKeys = [];
        this.orderArray = [];
        this.groupArray = [];
        this.havingMap = [];
        this.whereMap = [];
        this.rawWhereValues = [];

        // Partials
        this.selectString = '';
        this.fromString = '';
        this.setString = '';
        this.orderString = '';
        this.groupString = '';

        // Other various values
        this.limit = null;
        this.offset = null;
    }
}

module.exports = State;