Megatest

Check-in [2abc692fe0]
Login
Overview
Comment:fixed syntax for defstruct declaration
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | defstruct-srehman
Files: files | file ages | folders
SHA1: 2abc692fe02156aa882827703229f1a219d8d7f7
User & Date: srehman on 2016-09-14 13:50:47
Other Links: branch diff | manifest | tags
Context
2016-09-14
14:17
added usage for typed-records check-in: 24c163e896 user: srehman tags: defstruct-srehman
13:50
fixed syntax for defstruct declaration check-in: 2abc692fe0 user: srehman tags: defstruct-srehman
2016-09-13
17:08
started editing functions for defstruct addition check-in: 43bf8fc44f user: srehman tags: defstruct-srehman
Changes

Modified db_records.scm from [aa524719d6] to [24529c9564].

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
(define (dbr:dbstruct-get-localdb v run-id)
  (hash-table-ref/default (dbr:dbstruct-get-locdbs v) run-id #f))

(define (dbr:dbstruct-set-localdb! v run-id db)
  (hash-table-set! (dbr:dbstruct-get-locdbs v) run-id db))


(defstruct db:test-rec (id -1): number
					(run_id -1) : number 
					(testname "") : string
					(state "") : string
					(status "") : string
					(event_time -1) : number
					(host "") : string
					(cpuload -1) : number
					(diskfree -1) : number
					(uname "") : string
					(rundir "") : string
					(item-path "") : string
					(run_duration -1) : number
					(final_log "") : string
					(comment "") : string
					(process_id -1) : number
					(archived #f) : boolean)

(define db:test-get-id 			  db:test-rec-id)
(define db:test-get-run_id 		  db:test-rec-run_id)
(define db:test-get-testname      db:test-rec-testname)
(define db:test-get-state         db:test-rec-state)
(define db:test-get-status        db:test-rec-status)
(define db:test-get-event_time    db:test-rec-event_time)







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
(define (dbr:dbstruct-get-localdb v run-id)
  (hash-table-ref/default (dbr:dbstruct-get-locdbs v) run-id #f))

(define (dbr:dbstruct-set-localdb! v run-id db)
  (hash-table-set! (dbr:dbstruct-get-locdbs v) run-id db))


(defstruct db:test ((id -1) : number)
					((run_id -1) : number) 
					((testname "") : string)
					((state "") : string)
					((status "") : string)
					((event_time -1) : number)
					((host "") : string)
					((cpuload -1) : number)
					((diskfree -1) : number)
					((uname "") : string)
					((rundir "") : string)
					((item-path "") : string)
					((run_duration -1) : number)
					((final_log "") : string)
					((comment "") : string)
					((process_id -1) : number)
					((archived #f) : boolean))

(define db:test-get-id 			  db:test-rec-id)
(define db:test-get-run_id 		  db:test-rec-run_id)
(define db:test-get-testname      db:test-rec-testname)
(define db:test-get-state         db:test-rec-state)
(define db:test-get-status        db:test-rec-status)
(define db:test-get-event_time    db:test-rec-event_time)