<commit_before>
const methods = ['insert', 'update', 'del', 'select'];

const builderParams = function (builder) {
  let method = builder._method;
  if (method === 'first') { method = 'select'; }
  if (methods.indexOf(method) === -1) { return null; }
  const table = builder._single.table;
  if (!table) { return null; }
  const params = { method, table };
  return params;
};

module.exports = builderParams;<commit_msg>support select on subqueries<commit_after>
const methods = ['insert', 'update', 'del', 'select'];

const builderParams = function (builder) {
  let method = builder._method;
  if (method === 'first') { method = 'select'; }
  if (methods.indexOf(method) === -1) { return null; }
  const table = builder._single.table;
  if (!table) { return null; }
  if (typeof table === 'object') { return builderParams(table) }
  const params = { method, table };
  return params;
};

module.exports = builderParams;
{'fraction_non_alphanumeric': 0.16594360086767895, 'fraction_numerical': 0.0021691973969631237, 'mean_word_length': 4.335260115606936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5485776', 'n_tokens_mistral': 278, 'n_tokens_neox': 276, 'n_words': 86}