Skip to content

Commit 161acf0

Browse files
committed
QL: Add more getters.
1 parent 2c31d68 commit 161acf0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ql/ql/src/codeql_ql/StructuredLogs.qll

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,43 @@ module KindPredicatesLog {
213213
millisecond = s.regexpCapture(r, 7).toInt()
214214
)
215215
}
216+
217+
int getResultSize() { result = this.getNumber("resultSize") }
216218
}
217219

218220
class SentinelEmpty extends SummaryEvent {
219221
SentinelEmpty() { evaluationStrategy = "SENTINEL_EMPTY" }
220222
}
221223

224+
class PipeLineRun extends Object {
225+
PipeLineRuns runs;
226+
int index;
227+
228+
PipeLineRun() { runs.getObject(index) = this }
229+
230+
PipeLineRuns getArray() { result = runs }
231+
232+
string getRaReference() { result = this.getString("raReference") }
233+
234+
Array getCounts() { result = this.getArray("counts") }
235+
236+
Array getDuplicationPercentages() { result = this.getArray("duplicationPercentages") }
237+
}
238+
239+
class PipeLineRuns extends Array {
240+
SummaryEvent event;
241+
242+
PipeLineRuns() { event.getArray("pipelineRuns") = this }
243+
244+
SummaryEvent getEvent() { result = event }
245+
246+
PipeLineRun getRun(int i) { result = this.getObject(i) }
247+
}
248+
222249
class ComputeSimple extends SummaryEvent {
223250
ComputeSimple() { evaluationStrategy = "COMPUTE_SIMPLE" }
251+
252+
PipeLineRun getPipelineRun() { result.getArray() = this.getArray("pipelineRuns") }
224253
}
225254

226255
class ComputeRecursive extends SummaryEvent {

0 commit comments

Comments
 (0)