-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIOperation.ts
63 lines (52 loc) · 1.24 KB
/
IOperation.ts
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { GetOperationStatusResponse } from "../hive/Commands/GetOperationStatusCommand";
import Status from "../dto/Status";
import { TableSchema, RowSet, FetchOrientation } from "../hive/Types";
export default interface IOperation {
/**
* Fetch schema and a portion of data
*/
fetch(orientation?: FetchOrientation): Promise<Status>;
/**
* Resets `this.data` buffer.
* Needs to be called when working with massive data.
*/
flush(): void;
/**
* Request status of operation
*
* @param progress
*/
status(progress: boolean): Promise<GetOperationStatusResponse>;
/**
* Cancel operation
*/
cancel(): Promise<Status>;
/**
* Close operation
*/
close(): Promise<Status>;
/**
* Check if operation is finished
*/
finished(): boolean;
/**
* Check if operation hasMoreRows
*/
hasMoreRows(): boolean;
/**
* Set the max fetch size
*/
setMaxRows(maxRows: number): void;
/**
* Return retrieved schema
*/
getSchema(): TableSchema | null;
/**
* Return retrieved data
*/
getData(): Array<RowSet>;
/**
* Request queryId
*/
getQueryId(): Promise<string>;
}