-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfig.ts
More file actions
90 lines (71 loc) · 2.02 KB
/
config.ts
File metadata and controls
90 lines (71 loc) · 2.02 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
import { MinStmt2Version } from "./constant";
export class WSConfig {
private _user: string | undefined | null;
private _password: string | undefined | null;
private _db: string | undefined | null;
private _url: string;
private _timeout: number | undefined | null;
private _token: string | undefined | null;
private _timezone: string | undefined | null;
private _minStmt2Version: string;
private _bearerToken: string | undefined | null;
constructor(url: string, minStmt2Version?: string) {
this._url = url;
if (!minStmt2Version) {
this._minStmt2Version = MinStmt2Version;
} else {
this._minStmt2Version = minStmt2Version;
}
}
public getToken(): string | undefined | null {
return this._token;
}
public setToken(token: string) {
this._token = token;
}
public getUser(): string | undefined | null {
return this._user;
}
public setUser(user: string) {
this._user = user;
}
public getPwd(): string | undefined | null {
return this._password;
}
public setPwd(pws: string) {
this._password = pws;
}
public getDb(): string | undefined | null {
return this._db;
}
public setDb(db: string) {
this._db = db;
}
public getUrl(): string {
return this._url;
}
public setUrl(url: string) {
this._url = url;
}
public getTimeOut(): number | undefined | null {
return this._timeout;
}
public setTimeOut(ms: number) {
this._timeout = ms;
}
public getTimezone(): string | undefined | null {
return this._timezone;
}
public setTimezone(timezone: string) {
this._timezone = timezone;
}
public getBearerToken(): string | undefined | null {
return this._bearerToken;
}
public setBearerToken(token: string) {
this._bearerToken = token;
}
public getMinStmt2Version() {
return this._minStmt2Version;
}
}