-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQueryResult.java
More file actions
39 lines (35 loc) · 1.24 KB
/
Copy pathQueryResult.java
File metadata and controls
39 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.dbaagent.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class QueryResult {
private List<String> columns;
private List<List<Object>> rows;
private Integer rowCount;
private Long totalRowCount; // Total rows matching the query (before limit); null if count unavailable
private Boolean isLimited; // True when a row limit was applied to this query
private Long executionTimeMs;
private String query;
// Server-side session id this query ran on, so a client that gives up can ask
// the backend to terminate it instead of leaving it holding a connection.
private String sessionPid;
/**
* Kept so adding {@code sessionPid} did not break every positional caller.
* Prefer the setter for new code — this class is a response DTO that grows.
*/
public QueryResult(
List<String> columns,
List<List<Object>> rows,
Integer rowCount,
Long totalRowCount,
Boolean isLimited,
Long executionTimeMs,
String query
) {
this(columns, rows, rowCount, totalRowCount, isLimited, executionTimeMs, query, null);
}
}