How to use the fxjs.C.map function in fxjs

To help you get started, we’ve selected a few fxjs 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 marpple / FxSQL / src / index.js View on Github external
function recur([lefts, option]) {
              return lefts.length && option.rels.length && go(option.rels, C.map(async function(me) {
                const query = me.query();
                if (query && query.text) query.text = query.text.replace(/^\s*WHERE/i, 'AND');

                var fold_key = me.rel_type == 'x' ?
                  `_#_${me.where_key.split('.')[1]}_#_` : me.where_key;

                const colums = uniq(add_column(me).originals.concat(
                  me.rel_type != 'x' ? me.as + '.' + me.where_key : me.where_key + ' AS ' + fold_key));

                const in_vals = filter(a => a != null, pluck(me.left_key, lefts));
                const is_row_num = me.row_number.length == 2;
                const rights = (!in_vals.length ? [] : await (is_row_num ?
                  QUERY `
                  SELECT *
                  FROM (
                    SELECT