1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | import Integer from './integer'
|
21 | import { NumberOrInteger } from './graph-types'
|
22 |
|
23 | declare interface ResultSummary<T extends NumberOrInteger = Integer> {
|
24 | query: { text: string; parameters: { [key: string]: any } }
|
25 | queryType: string
|
26 | counters: QueryStatistic
|
27 | plan: Plan
|
28 | profile: ProfiledPlan
|
29 | notifications: Notification[]
|
30 | server: ServerInfo
|
31 | resultConsumedAfter: T
|
32 | resultAvailableAfter: T
|
33 |
|
34 | hasPlan(): boolean
|
35 |
|
36 | hasProfile(): boolean
|
37 | }
|
38 |
|
39 | declare interface Plan {
|
40 | operatorType: string
|
41 | identifiers: string[]
|
42 | arguments: { [key: string]: string }
|
43 | children: Plan[]
|
44 | }
|
45 |
|
46 | declare interface ProfiledPlan {
|
47 | operatorType: string
|
48 | identifiers: string[]
|
49 | arguments: { [key: string]: string }
|
50 | dbHits: number
|
51 | rows: number
|
52 | pageCacheMisses: number
|
53 | pageCacheHits: number
|
54 | pageCacheHitRatio: number
|
55 | time: number
|
56 |
|
57 | hasPageCacheStats(): boolean
|
58 |
|
59 | children: ProfiledPlan[]
|
60 | }
|
61 |
|
62 | declare interface QueryStatistic {
|
63 | containsUpdates(): boolean
|
64 |
|
65 | containsSystemUpdates(): boolean
|
66 |
|
67 | updates(): { [key: string]: number }
|
68 |
|
69 | systemUpdates(): number
|
70 | }
|
71 |
|
72 | declare type NotificationPosition = {
|
73 | offset: number
|
74 | line: number
|
75 | column: number
|
76 | }
|
77 |
|
78 | declare interface Notification {
|
79 | code: string
|
80 | title: string
|
81 | description: string
|
82 | severity: string
|
83 | position: NotificationPosition | {}
|
84 | }
|
85 |
|
86 | declare interface ServerInfo {
|
87 | address: string
|
88 | version: string
|
89 | }
|
90 |
|
91 | declare const queryType: {
|
92 | READ_ONLY: 'r'
|
93 | READ_WRITE: 'rw'
|
94 | WRITE_ONLY: 'w'
|
95 | SCHEMA_WRITE: 's'
|
96 | }
|
97 |
|
98 | export {
|
99 | queryType,
|
100 | Plan,
|
101 | ProfiledPlan,
|
102 | QueryStatistic,
|
103 | Notification,
|
104 | ServerInfo,
|
105 | NotificationPosition
|
106 | }
|
107 |
|
108 | export default ResultSummary
|