Megatest

Check-in [9a7d1c682d]
Login
Overview
Comment:fixed some functions where it's requred to access list
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | v1.63-gasket
Files: files | file ages | folders
SHA1: 9a7d1c682d55ada6e575a37e6c3fdd0a48f183b6
User & Date: srehman on 2016-12-21 11:00:02
Other Links: branch diff | manifest | tags
Context
2016-12-21
11:00
fixed some functions where it's requred to access list Closed-Leaf check-in: 9a7d1c682d user: srehman tags: v1.63-gasket
2016-12-20
16:36
fixed issues with single columns being fetched from db check-in: 484ab17aff user: srehman tags: v1.63-gasket
Changes

Modified db.scm from [1ce0aa1a84] to [e033092666].

1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
    (db:with-db
     dbstruct
     #f
     #f
     (lambda (db)
       (dbi:for-each-row
	(lambda (output)
	  (let ((targ (cons output)))
	    (if (not (hash-table-ref/default seen targ #f))
		(begin
		  (hash-table-set! seen targ #t)
		  (set! res (cons (apply vector targ) res))))))
	db
	qrystr)
       (debug:print-info 11 *default-log-port* "db:get-targets END qrystr: " qrystr )







|







1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
    (db:with-db
     dbstruct
     #f
     #f
     (lambda (db)
       (dbi:for-each-row
	(lambda (output)
	  (let ((targ  (vector->list output)))
	    (if (not (hash-table-ref/default seen targ #f))
		(begin
		  (hash-table-set! seen targ #t)
		  (set! res (cons (apply vector targ) res))))))
	db
	qrystr)
       (debug:print-info 11 *default-log-port* "db:get-targets END qrystr: " qrystr )
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
	 (header    (append keys remfields))
	 (keystr    (conc (keys->keystr keys) ","
			  (string-intersperse remfields ","))))
    (debug:print-info 11 *default-log-port* "db:get-run-info run-id: " run-id " header: " header " keystr: " keystr)
    ;; (db:delay-if-busy dbdat)
    (dbi:for-each-row
      (lambda (output)
          ;;(print "Output: " output)
          ;;(print "A: " a)
          ;;(print "X: " x)
           (set! res output))
     db 
     (conc "SELECT " keystr " FROM runs WHERE id=? AND state != 'deleted';")
     run-id)
    (debug:print-info 11 *default-log-port* "db:get-run-info run-id: " run-id " header: " header " keystr: " keystr)
    (let ((finalres (vector header res)))
      ;; (hash-table-set! *run-info-cache* run-id finalres)







<
<
<







2134
2135
2136
2137
2138
2139
2140



2141
2142
2143
2144
2145
2146
2147
	 (header    (append keys remfields))
	 (keystr    (conc (keys->keystr keys) ","
			  (string-intersperse remfields ","))))
    (debug:print-info 11 *default-log-port* "db:get-run-info run-id: " run-id " header: " header " keystr: " keystr)
    ;; (db:delay-if-busy dbdat)
    (dbi:for-each-row
      (lambda (output)



           (set! res output))
     db 
     (conc "SELECT " keystr " FROM runs WHERE id=? AND state != 'deleted';")
     run-id)
    (debug:print-info 11 *default-log-port* "db:get-run-info run-id: " run-id " header: " header " keystr: " keystr)
    (let ((finalres (vector header res)))
      ;; (hash-table-set! *run-info-cache* run-id finalres)
3552
3553
3554
3555
3556
3557
3558

3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
	 (keys    (db:get-keys dbstruct))
	 (selstr  (string-intersperse keys ","))
	 (qrystr  (string-intersperse (map (lambda (x)(conc x "=?")) keys) " AND "))
	 (keyvals #f)
	 (tests-hash (make-hash-table)))
    ;; first look up the key values from the run selected by run-id
    ;; (db:delay-if-busy dbdat)

    (dbi:for-each-row
    (lambda (output) 
       (set! keyvals (cons output)))
     db
     (conc "SELECT " selstr " FROM runs WHERE id=? ORDER BY event_time DESC;") run-id)
    (if (not keyvals)
	'()
	(let ((prev-run-ids '()))
	  (apply dbi:for-each-row
      (lambda (output)







>


|







3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
	 (keys    (db:get-keys dbstruct))
	 (selstr  (string-intersperse keys ","))
	 (qrystr  (string-intersperse (map (lambda (x)(conc x "=?")) keys) " AND "))
	 (keyvals #f)
	 (tests-hash (make-hash-table)))
    ;; first look up the key values from the run selected by run-id
    ;; (db:delay-if-busy dbdat)
    (print selstr)
    (dbi:for-each-row
    (lambda (output) 
       (set! keyvals (vector->list output)))
     db
     (conc "SELECT " selstr " FROM runs WHERE id=? ORDER BY event_time DESC;") run-id)
    (if (not keyvals)
	'()
	(let ((prev-run-ids '()))
	  (apply dbi:for-each-row
      (lambda (output)