Megatest

Diff
Login

Differences From Artifact [1bca4e3583]:

To Artifact [4b08c5b9f7]:


473
474
475
476
477
478
479

480

481
482
483
484
485
486
487
473
474
475
476
477
478
479
480

481
482
483
484
485
486
487
488







+
-
+








;; make a query (fieldname like 'patt1' OR fieldname 
(define (db:patt->like fieldname pattstr #!key (comparator " OR "))
  (let ((patts (if (string? pattstr)
		   (string-split pattstr ",")
		   '("%"))))
    (string-intersperse (map (lambda (patt)
			       (let ((wildtype (if (substring-index "%" patt) "LIKE" "GLOB")))
			       (conc fieldname " LIKE '" patt "'"))
				 (conc fieldname " " wildtype " '" patt "'")))
			     (if (null? patts)
				 '("")
				 patts))
			comparator)))

;; replace header and keystr with a call to runs:get-std-run-fields
;;