Megatest

Diff
Login

Differences From Artifact [4d1ab94308]:

To Artifact [4e59e299af]:


444
445
446
447
448
449
450

451

452
453
454
455
456
457
458
444
445
446
447
448
449
450
451

452
453
454
455
456
457
458
459







+
-
+








;; 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
;;