// ██████╗ ██████╗ ███╗ ███╗██████╗ ██╗██╗ ███████╗ // ██╔════╝██╔═══██╗████╗ ████║██╔══██╗██║██║ ██╔════╝ // ██║ ██║ ██║██╔████╔██║██████╔╝██║██║ █████╗ // ██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║██║ ██╔══╝ // ╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ██║███████╗███████╗ // ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ // // ███████╗████████╗ █████╗ ████████╗███████╗███╗ ███╗███████╗███╗ ██╗████████╗ // ██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██╔════╝████╗ ████║██╔════╝████╗ ██║╚══██╔══╝ // ███████╗ ██║ ███████║ ██║ █████╗ ██╔████╔██║█████╗ ██╔██╗ ██║ ██║ // ╚════██║ ██║ ██╔══██║ ██║ ██╔══╝ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ // ███████║ ██║ ██║ ██║ ██║ ███████╗██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ // ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ // // Transform a Waterline Query Statement into a SQL query. var MySQL = require('machinepack-mysql'); module.exports = function compileStatement(statement, meta) { var report = MySQL.compileStatement({ statement: statement, meta: meta }).execSync(); return report; };