<commit_before>;;;;; Caroshi – Copyright (c) 2009–2013 <NAME> <<EMAIL>>

(defun sql-clause-where (alst)
  (!? alst
      (+ " WHERE "
         (? (string? !)
            !
            (alist-assignments ! :padding " AND ")))))

(defun sql-clause-select (&key table (fields nil) (where nil) (limit nil) (offset nil) (order-by nil) (direction nil))
  (apply #'string-concat
         `("SELECT " ,@(!? fields
                           (comma-separated-list (symbol-names ! :downcase? t))
                           (list "*"))
           " FROM " ,table<commit_msg>Check if :LIMIT and :OFFSET are used together.<commit_after>;;;;; Caroshi – Copyright (c) 2009–2013 <NAME> <<EMAIL>>

(defun sql-clause-where (alst)
  (!? alst
      (+ " WHERE "
         (? (string? !)
            !
            (alist-assignments ! :padding " AND ")))))

(defun sql-clause-select (&key table (fields nil) (where nil) (limit nil) (offset nil) (order-by nil) (direction nil))
  (when-debug
    (when (== 1 (length (remove-if #'not (list limit offset))))
      (error ":LIMIT and :OFFSET have to be used together.")))
  (apply #'string-concat
         `("SELECT " ,@(!? fields
                           (comma-separated-list (symbol-names ! :downcase? t))
                           (list "*"))
           " FROM " ,table
{'fraction_non_alphanumeric': 0.17384615384615384, 'fraction_numerical': 0.013076923076923076, 'mean_word_length': 2.1050119331742243, 'pattern_counts': {'":': 1, '<': 9, '<?xml version=': 0, '>': 9, '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': '6772150', 'n_tokens_mistral': 424, 'n_tokens_neox': 406, 'n_words': 112}