smartbi-toolkit 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +41 -0
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +99 -0
  4. package/dist/main.d.ts +0 -1
  5. package/dist/main.js +18 -0
  6. package/dist/methods/AnalysisReportService.d.ts +93 -0
  7. package/dist/methods/AnalysisReportService.js +126 -0
  8. package/dist/methods/BusinessThemeService.d.ts +8 -0
  9. package/dist/methods/BusinessThemeService.js +11 -0
  10. package/dist/methods/BusinessViewService.d.ts +94 -0
  11. package/dist/methods/BusinessViewService.js +120 -0
  12. package/dist/methods/CatalogService.d.ts +1 -89
  13. package/dist/methods/CatalogService.js +224 -0
  14. package/dist/methods/ClientCombinedReportService.d.ts +63 -0
  15. package/dist/methods/ClientCombinedReportService.js +82 -0
  16. package/dist/methods/ClientInsightService.d.ts +83 -0
  17. package/dist/methods/ClientInsightService.js +107 -0
  18. package/dist/methods/ClientReportService.d.ts +162 -0
  19. package/dist/methods/ClientReportService.js +206 -0
  20. package/dist/methods/CombinedReportService.d.ts +7 -0
  21. package/dist/methods/CombinedReportService.js +10 -0
  22. package/dist/methods/DataSourceService.d.ts +178 -0
  23. package/dist/methods/DataSourceService.js +220 -0
  24. package/dist/methods/GraphicReportService.d.ts +6 -0
  25. package/dist/methods/GraphicReportService.js +10 -0
  26. package/dist/methods/InsightReport.d.ts +71 -0
  27. package/dist/methods/InsightReport.js +98 -0
  28. package/dist/methods/MetadataService.d.ts +37 -0
  29. package/dist/methods/MetadataService.js +47 -0
  30. package/dist/methods/OfficeReport.d.ts +49 -0
  31. package/dist/methods/OfficeReport.js +65 -0
  32. package/dist/methods/OfficeReportService.d.ts +36 -0
  33. package/dist/methods/OfficeReportService.js +46 -0
  34. package/dist/methods/OltpMetadataService.d.ts +19 -0
  35. package/dist/methods/OltpMetadataService.js +25 -0
  36. package/dist/methods/ParameterService.d.ts +12 -0
  37. package/dist/methods/ParameterService.js +18 -0
  38. package/dist/methods/PoolService.d.ts +11 -0
  39. package/dist/methods/PoolService.js +17 -0
  40. package/dist/methods/PortalService.d.ts +66 -0
  41. package/dist/methods/PortalService.js +89 -0
  42. package/dist/methods/Report.d.ts +178 -0
  43. package/dist/methods/Report.js +230 -0
  44. package/dist/methods/SSReport.d.ts +86 -0
  45. package/dist/methods/SSReport.js +114 -0
  46. package/dist/methods/ScheduleTaskService.d.ts +12 -0
  47. package/dist/methods/ScheduleTaskService.js +18 -0
  48. package/dist/methods/SimpleReportService.d.ts +12 -0
  49. package/dist/methods/SimpleReportService.js +18 -0
  50. package/dist/methods/SpreadSheetReportService.d.ts +43 -0
  51. package/dist/methods/SpreadSheetReportService.js +55 -0
  52. package/dist/methods/SystemConfigService.d.ts +28 -0
  53. package/dist/methods/SystemConfigService.js +24 -0
  54. package/dist/methods/TimeConsuming.d.ts +6 -0
  55. package/dist/methods/TimeConsuming.js +9 -0
  56. package/dist/methods/TimeConsumingService.d.ts +5 -0
  57. package/dist/methods/TimeConsumingService.js +9 -0
  58. package/dist/methods/UserManagerService.d.ts +258 -0
  59. package/dist/methods/UserManagerService.js +332 -0
  60. package/dist/types.d.ts +442 -0
  61. package/dist/types.js +125 -0
  62. package/dist/vite-plugin-smartbi/index.d.ts +36 -0
  63. package/dist/vite-plugin-smartbi/index.js +107 -0
  64. package/package.json +129 -11
  65. package/dist/CatalogService.es.js +0 -112
  66. package/dist/SmartbiToolbox.es.js +0 -51
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/main.d.ts.map +0 -1
  69. package/dist/methods/CatalogService.d.ts.map +0 -1
@@ -0,0 +1,162 @@
1
+ import type { AggregateType, ClientReportView, CustomFilterDataBean, OperatorType, OrderType, ReportData } from '../types';
2
+ /**
3
+ * 打开一个报表
4
+ * @param queryId 报表ID
5
+ * @returns 返回打开的报表视图
6
+ */
7
+ export declare const openQuery: (queryId: string) => Promise<ClientReportView>;
8
+ /**
9
+ * 打开一个报表(不初始化)
10
+ * @param queryId 报表ID
11
+ * @returns 返回打开的报表视图
12
+ */
13
+ export declare const openQueryWithoutInit: (queryId: string) => Promise<ClientReportView>;
14
+ /**
15
+ * 取得一个表达式的值
16
+ * @param clientId 客户ID
17
+ * @param func 表达式
18
+ * @returns 表达式的值
19
+ */
20
+ export declare const getFunctionValue: (clientId: string, func: string) => Promise<string>;
21
+ /**
22
+ * 设置每页的行数
23
+ * @param clientId 客户ID
24
+ * @param rowsPerPage 每页行数
25
+ * @returns 无返回值
26
+ */
27
+ export declare const setRowsPerPage: (clientId: string, rowsPerPage: number) => Promise<void>;
28
+ /**
29
+ * 获取每页的行数
30
+ * @param clientId 客户ID
31
+ * @returns 每页行数
32
+ */
33
+ export declare const getRowsPerPage: (clientId: string) => Promise<number>;
34
+ /**
35
+ * 执行报表(新接口)
36
+ * @param clientId 客户ID
37
+ * @returns 报表的总行数
38
+ */
39
+ export declare const executeQueryLong: (clientId: string) => Promise<number>;
40
+ /**
41
+ * 获得报表数据
42
+ * @param clientId 客户ID
43
+ * @param pageNum 报表页码,指定获取报表的第几页,从0算起
44
+ * @returns 报表数据
45
+ */
46
+ export declare const getReportData: (clientId: string, pageNum: number) => Promise<ReportData>;
47
+ /**
48
+ * 获得原始报表数据
49
+ * @param clientId 客户ID
50
+ * @param pageNum 报表页码,指定获取报表的第几页,从0算起
51
+ * @returns 原始报表数据
52
+ */
53
+ export declare const getRawReportData: (clientId: string, pageNum: number) => Promise<ReportData>;
54
+ /**
55
+ * 将报表信息从服务端的会话状态中清除
56
+ * @param clientId 客户ID
57
+ * @returns 无返回值
58
+ */
59
+ export declare const removeFromSession: (clientId: string) => Promise<void>;
60
+ /**
61
+ * 设置参数值
62
+ * @param clientId 客户ID
63
+ * @param paramId 参数ID
64
+ * @param paramValue 参数值
65
+ * @param paramDisplayValue 参数显示值
66
+ * @returns 是否设置成功
67
+ */
68
+ export declare const setParamValue: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<boolean>;
69
+ /**
70
+ * 设置参数值(按名称)
71
+ * @param clientId 客户ID
72
+ * @param paramId 参数ID
73
+ * @param paramValue 参数值
74
+ * @param paramDisplayValue 参数显示值
75
+ * @returns 是否设置成功
76
+ */
77
+ export declare const setParamValueByName: (clientId: string, paramId: string, paramValue: string, paramDisplayValue: string) => Promise<boolean>;
78
+ /**
79
+ * 获得某个参数的默认值
80
+ * @param clientId 客户ID
81
+ * @param paramId 参数ID
82
+ * @returns 参数的默认值列表
83
+ */
84
+ export declare const getParamDefaultValue: (clientId: string, paramId: string) => Promise<string[]>;
85
+ /**
86
+ * 获得某个参数的候选值列表
87
+ * @param clientId 客户ID
88
+ * @param paramId 参数ID
89
+ * @returns 参数的候选值列表
90
+ */
91
+ export declare const getParamStandbyValue: (clientId: string, paramId: string) => Promise<string[]>;
92
+ /**
93
+ * 设置报表的排序字段
94
+ * @param clientId 客户ID
95
+ * @param fieldId 字段ID
96
+ * @param orderType 排序方式, ASC, DESC, NONE
97
+ * @returns 是否设置成功
98
+ */
99
+ export declare const setOrderByType: (clientId: string, fieldId: string, orderType: OrderType | string) => Promise<boolean>;
100
+ /**
101
+ * 设置字段聚合方式
102
+ * @param clientId 客户ID
103
+ * @param fieldId 字段ID
104
+ * @param aggregate 聚合方式 SUM, MIN, MAX, COUNT, DISTINCT_COUNT, AVG, NULL
105
+ * @returns 是否设置成功
106
+ */
107
+ export declare const setFieldAggregate: (clientId: string, fieldId: string, aggregate: AggregateType | string) => Promise<boolean>;
108
+ /**
109
+ * 获取报表中某字段的所有可能值
110
+ * @param clientId 客户ID
111
+ * @param fieldId 字段ID
112
+ * @returns 字段的所有可能值列表
113
+ */
114
+ export declare const getFieldDistinctValues: (clientId: string, fieldId: string) => Promise<string[]>;
115
+ /**
116
+ * 设置过滤条件
117
+ * @param clientId 客户ID
118
+ * @param fieldId 字段ID
119
+ * @param operator 操作符
120
+ * @param value 值
121
+ * @returns 是否设置成功
122
+ */
123
+ export declare const setAutoCondition: (clientId: string, fieldId: string, operator: OperatorType | string, value: string) => Promise<boolean>;
124
+ /**
125
+ * 设置自定义过滤条件
126
+ * @param clientId 客户ID
127
+ * @param filterData 过滤条件数据
128
+ * @returns 是否设置成功
129
+ */
130
+ export declare const setCustomCondition: (clientId: string, filterData: CustomFilterDataBean) => Promise<boolean>;
131
+ /**
132
+ * 设置客户端配置
133
+ * @param clientId 客户ID
134
+ * @param clientConfig 客户端配置
135
+ * @returns 无返回值
136
+ */
137
+ export declare const setClientConfig: (clientId: string, clientConfig: string) => Promise<void>;
138
+ /**
139
+ * 克隆查询
140
+ * @param clientId 客户ID
141
+ * @param parentNodeId 父节点ID
142
+ * * @param name 名称
143
+ * @param alias 别名
144
+ * @param desc 描述
145
+ * @returns 新克隆的查询ID
146
+ */
147
+ export declare const cloneQuery: (clientId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
148
+ /**
149
+ * 覆盖查询
150
+ * @param clientId 客户ID
151
+ * @param replacedReportId 被替换的报表ID
152
+ * @param desc 描述
153
+ * @returns 是否覆盖成功
154
+ */
155
+ export declare const overwriteQuery: (clientId: string, replacedReportId: string, desc: string) => Promise<boolean>;
156
+ /**
157
+ * 导出报表
158
+ * @param clientId 客户ID
159
+ * @param reportId 报表ID
160
+ * @returns 无返回值
161
+ */
162
+ export declare const dump: (clientId: string, reportId: string) => Promise<void>;
@@ -0,0 +1,206 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 打开一个报表
4
+ * @param queryId 报表ID
5
+ * @returns 返回打开的报表视图
6
+ */
7
+ export const openQuery = (queryId) => {
8
+ return smartbi('ClientReportService', 'openQuery', [queryId]);
9
+ };
10
+ /**
11
+ * 打开一个报表(不初始化)
12
+ * @param queryId 报表ID
13
+ * @returns 返回打开的报表视图
14
+ */
15
+ export const openQueryWithoutInit = (queryId) => {
16
+ return smartbi('ClientReportService', 'openQueryWithoutInit', [queryId]);
17
+ };
18
+ /**
19
+ * 取得一个表达式的值
20
+ * @param clientId 客户ID
21
+ * @param func 表达式
22
+ * @returns 表达式的值
23
+ */
24
+ export const getFunctionValue = (clientId, func) => {
25
+ return smartbi('ClientReportService', 'getFunctionValue', [clientId, func]);
26
+ };
27
+ /**
28
+ * 设置每页的行数
29
+ * @param clientId 客户ID
30
+ * @param rowsPerPage 每页行数
31
+ * @returns 无返回值
32
+ */
33
+ export const setRowsPerPage = (clientId, rowsPerPage) => {
34
+ return smartbi('ClientReportService', 'setRowsPerPage', [clientId, rowsPerPage]);
35
+ };
36
+ /**
37
+ * 获取每页的行数
38
+ * @param clientId 客户ID
39
+ * @returns 每页行数
40
+ */
41
+ export const getRowsPerPage = (clientId) => {
42
+ return smartbi('ClientReportService', 'getRowsPerPage', [clientId]);
43
+ };
44
+ /**
45
+ * 执行报表(新接口)
46
+ * @param clientId 客户ID
47
+ * @returns 报表的总行数
48
+ */
49
+ export const executeQueryLong = (clientId) => {
50
+ return smartbi('ClientReportService', 'executeQueryLong', [clientId]);
51
+ };
52
+ /**
53
+ * 获得报表数据
54
+ * @param clientId 客户ID
55
+ * @param pageNum 报表页码,指定获取报表的第几页,从0算起
56
+ * @returns 报表数据
57
+ */
58
+ export const getReportData = (clientId, pageNum) => {
59
+ return smartbi('ClientReportService', 'getReportData', [clientId, pageNum]);
60
+ };
61
+ /**
62
+ * 获得原始报表数据
63
+ * @param clientId 客户ID
64
+ * @param pageNum 报表页码,指定获取报表的第几页,从0算起
65
+ * @returns 原始报表数据
66
+ */
67
+ export const getRawReportData = (clientId, pageNum) => {
68
+ return smartbi('ClientReportService', 'getRawReportData', [clientId, pageNum]);
69
+ };
70
+ /**
71
+ * 将报表信息从服务端的会话状态中清除
72
+ * @param clientId 客户ID
73
+ * @returns 无返回值
74
+ */
75
+ export const removeFromSession = (clientId) => {
76
+ return smartbi('ClientReportService', 'removeFromSession', [clientId]);
77
+ };
78
+ /**
79
+ * 设置参数值
80
+ * @param clientId 客户ID
81
+ * @param paramId 参数ID
82
+ * @param paramValue 参数值
83
+ * @param paramDisplayValue 参数显示值
84
+ * @returns 是否设置成功
85
+ */
86
+ export const setParamValue = (clientId, paramId, paramValue, paramDisplayValue) => {
87
+ return smartbi('ClientReportService', 'setParamValue', [clientId, paramId, paramValue, paramDisplayValue]);
88
+ };
89
+ /**
90
+ * 设置参数值(按名称)
91
+ * @param clientId 客户ID
92
+ * @param paramId 参数ID
93
+ * @param paramValue 参数值
94
+ * @param paramDisplayValue 参数显示值
95
+ * @returns 是否设置成功
96
+ */
97
+ export const setParamValueByName = (clientId, paramId, paramValue, paramDisplayValue) => {
98
+ return smartbi('ClientReportService', 'setParamValueByName', [clientId, paramId, paramValue, paramDisplayValue]);
99
+ };
100
+ /**
101
+ * 获得某个参数的默认值
102
+ * @param clientId 客户ID
103
+ * @param paramId 参数ID
104
+ * @returns 参数的默认值列表
105
+ */
106
+ export const getParamDefaultValue = (clientId, paramId) => {
107
+ return smartbi('ClientReportService', 'getParamDefaultValue', [clientId, paramId]);
108
+ };
109
+ /**
110
+ * 获得某个参数的候选值列表
111
+ * @param clientId 客户ID
112
+ * @param paramId 参数ID
113
+ * @returns 参数的候选值列表
114
+ */
115
+ export const getParamStandbyValue = (clientId, paramId) => {
116
+ return smartbi('ClientReportService', 'getParamStandbyValue', [clientId, paramId]);
117
+ };
118
+ /**
119
+ * 设置报表的排序字段
120
+ * @param clientId 客户ID
121
+ * @param fieldId 字段ID
122
+ * @param orderType 排序方式, ASC, DESC, NONE
123
+ * @returns 是否设置成功
124
+ */
125
+ export const setOrderByType = (clientId, fieldId, orderType) => {
126
+ return smartbi('ClientReportService', 'setOrderByType', [clientId, fieldId, orderType]);
127
+ };
128
+ /**
129
+ * 设置字段聚合方式
130
+ * @param clientId 客户ID
131
+ * @param fieldId 字段ID
132
+ * @param aggregate 聚合方式 SUM, MIN, MAX, COUNT, DISTINCT_COUNT, AVG, NULL
133
+ * @returns 是否设置成功
134
+ */
135
+ export const setFieldAggregate = (clientId, fieldId, aggregate) => {
136
+ return smartbi('ClientReportService', 'setFieldAggregate', [clientId, fieldId, aggregate]);
137
+ };
138
+ /**
139
+ * 获取报表中某字段的所有可能值
140
+ * @param clientId 客户ID
141
+ * @param fieldId 字段ID
142
+ * @returns 字段的所有可能值列表
143
+ */
144
+ export const getFieldDistinctValues = (clientId, fieldId) => {
145
+ return smartbi('ClientReportService', 'getFieldDistinctValues', [clientId, fieldId]);
146
+ };
147
+ /**
148
+ * 设置过滤条件
149
+ * @param clientId 客户ID
150
+ * @param fieldId 字段ID
151
+ * @param operator 操作符
152
+ * @param value 值
153
+ * @returns 是否设置成功
154
+ */
155
+ export const setAutoCondition = (clientId, fieldId, operator, value) => {
156
+ return smartbi('ClientReportService', 'setAutoCondition', [clientId, fieldId, operator, value]);
157
+ };
158
+ /**
159
+ * 设置自定义过滤条件
160
+ * @param clientId 客户ID
161
+ * @param filterData 过滤条件数据
162
+ * @returns 是否设置成功
163
+ */
164
+ export const setCustomCondition = (clientId, filterData) => {
165
+ return smartbi('ClientReportService', 'setCustomCondition', [clientId, filterData.toString()]);
166
+ };
167
+ /**
168
+ * 设置客户端配置
169
+ * @param clientId 客户ID
170
+ * @param clientConfig 客户端配置
171
+ * @returns 无返回值
172
+ */
173
+ export const setClientConfig = (clientId, clientConfig) => {
174
+ return smartbi('ClientReportService', 'setClientConfig', [clientId, clientConfig]);
175
+ };
176
+ /**
177
+ * 克隆查询
178
+ * @param clientId 客户ID
179
+ * @param parentNodeId 父节点ID
180
+ * * @param name 名称
181
+ * @param alias 别名
182
+ * @param desc 描述
183
+ * @returns 新克隆的查询ID
184
+ */
185
+ export const cloneQuery = (clientId, parentNodeId, name, alias, desc) => {
186
+ return smartbi('ClientReportService', 'cloneQuery', [clientId, parentNodeId, name, alias, desc]);
187
+ };
188
+ /**
189
+ * 覆盖查询
190
+ * @param clientId 客户ID
191
+ * @param replacedReportId 被替换的报表ID
192
+ * @param desc 描述
193
+ * @returns 是否覆盖成功
194
+ */
195
+ export const overwriteQuery = (clientId, replacedReportId, desc) => {
196
+ return smartbi('ClientReportService', 'overwriteQuery', [clientId, replacedReportId, desc]);
197
+ };
198
+ /**
199
+ * 导出报表
200
+ * @param clientId 客户ID
201
+ * @param reportId 报表ID
202
+ * @returns 无返回值
203
+ */
204
+ export const dump = (clientId, reportId) => {
205
+ return smartbi('ClientReportService', 'dump', [clientId, reportId]);
206
+ };
@@ -0,0 +1,7 @@
1
+ import type { ICombinedReport } from '../types';
2
+ /**
3
+ * 创建并打开一个报表
4
+ * @param reportId 报表ID
5
+ * @returns 返回打开的报表对象,类型为ICombinedReport
6
+ */
7
+ export declare const openReport: (reportId: string) => Promise<ICombinedReport>;
@@ -0,0 +1,10 @@
1
+ // CombinedReportService 服务方法
2
+ import { smartbi } from "../index";
3
+ /**
4
+ * 创建并打开一个报表
5
+ * @param reportId 报表ID
6
+ * @returns 返回打开的报表对象,类型为ICombinedReport
7
+ */
8
+ export const openReport = (reportId) => {
9
+ return smartbi('CombinedReportService', 'openReport', [reportId]);
10
+ };
@@ -0,0 +1,178 @@
1
+ import type { BasicField, DataSource, DriverType, JDBCTable, SDKGridData } from '../types';
2
+ /**
3
+ * 创建数据源
4
+ * @param name 数据源名称
5
+ * @param connectUserName 连接用户名
6
+ * @param connectPassword 连接密码
7
+ * @param maxConnection 最大连接数
8
+ * @param driverType 数据库类型
9
+ * @param driverClassName 驱动程序类名
10
+ * @param url 连接字符串
11
+ * @returns 返回数据源ID
12
+ */
13
+ export declare const createDataSource: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string) => Promise<string>;
14
+ /**
15
+ * 创建数据源(带目录参数)
16
+ * @param name 数据源名称
17
+ * @param connectUserName 连接用户名
18
+ * @param connectPassword 连接密码
19
+ * @param maxConnection 最大连接数
20
+ * @param driverType 数据库类型
21
+ * @param driverClassName 驱动程序类名
22
+ * @param url 连接字符串
23
+ * @param driverCatalog 驱动目录
24
+ * @returns 返回数据源ID
25
+ */
26
+ export declare const createDataSourceWithCatalog: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string) => Promise<string>;
27
+ /**
28
+ * 创建数据源(带事务隔离级别)
29
+ * @param name 数据源名称
30
+ * @param connectUserName 连接用户名
31
+ * @param connectPassword 连接密码
32
+ * @param maxConnection 最大连接数
33
+ * @param driverType 数据库类型
34
+ * @param driverClassName 驱动程序类名
35
+ * @param url 连接字符串
36
+ * @param driverCatalog 驱动目录
37
+ * @param transactionIsolation 事务隔离级别
38
+ * @returns 返回数据源ID
39
+ */
40
+ export declare const createDataSourceWithTransactionIsolation: (name: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string, transactionIsolation: number) => Promise<string>;
41
+ /**
42
+ * 修改数据源
43
+ * @param id 数据源ID
44
+ * @param connectUserName 连接用户名
45
+ * @param connectPassword 连接密码
46
+ * @param maxConnection 最大连接数
47
+ * @param driverType 数据库类型
48
+ * @param driverClassName 驱动程序类名
49
+ * @param url 连接字符串
50
+ */
51
+ export declare const updateDataSource: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string) => Promise<void>;
52
+ /**
53
+ * 修改数据源(带目录参数)
54
+ * @param id 数据源ID
55
+ * @param connectUserName 连接用户名
56
+ * @param connectPassword 连接密码
57
+ * @param maxConnection 最大连接数
58
+ * @param driverType 数据库类型
59
+ * @param driverClassName 驱动程序类名
60
+ * @param url 连接字符串
61
+ * @param driverCatalog 驱动目录
62
+ */
63
+ export declare const updateDataSourceWithCatalog: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string) => Promise<void>;
64
+ /**
65
+ * 修改数据源(带事务隔离级别)
66
+ * @param id 数据源ID
67
+ * @param connectUserName 连接用户名
68
+ * @param connectPassword 连接密码
69
+ * @param maxConnection 最大连接数
70
+ * @param driverType 数据库类型
71
+ * @param driverClassName 驱动程序类名
72
+ * @param url 连接字符串
73
+ * @param driverCatalog 驱动目录
74
+ * @param transactionIsolation 事务隔离级别
75
+ */
76
+ export declare const updateDataSourceWithTransactionIsolation: (id: string, connectUserName: string, connectPassword: string, maxConnection: number, driverType: DriverType | string, driverClassName: string, url: string, driverCatalog: string, transactionIsolation: number) => Promise<void>;
77
+ /**
78
+ * 删除数据源
79
+ * @param dataSourceID 数据源ID
80
+ */
81
+ export declare const deleteDataSource: (dataSourceID: string) => Promise<void>;
82
+ /**
83
+ * 获取数据源
84
+ * @param dataSourceID 数据源ID
85
+ * @returns 返回数据源对象
86
+ */
87
+ export declare const getDataSource: (dataSourceID: string) => Promise<DataSource>;
88
+ /**
89
+ * 给数据源添加表
90
+ * @param dataSourceId 数据源ID
91
+ * @param tableList 表列表
92
+ */
93
+ export declare const addTablesToDataSource: (dataSourceId: string, tableList: JDBCTable[]) => Promise<void>;
94
+ /**
95
+ * 删除数据源的表、视图、存储过程
96
+ * @param dataSourceId 数据源ID
97
+ * @param schemaName 模式名称
98
+ * @param tableNameList 表名列表
99
+ */
100
+ export declare const removeTablesFromDataSource: (dataSourceId: string, schemaName: string, tableNameList: string[]) => Promise<void>;
101
+ /**
102
+ * 删除数据库表
103
+ * @param dsId 数据源ID
104
+ * @param schemaName 模式名称
105
+ * @param tableNameList 表名列表
106
+ */
107
+ export declare const removeTables: (dsId: string, schemaName: string, tableNameList: string[]) => Promise<void>;
108
+ /**
109
+ * 同步schema表
110
+ * @param dataSourceID 数据源ID
111
+ * @param schema 模式名称
112
+ */
113
+ export declare const synchTablesToDataSource: (dataSourceID: string, schema: string) => Promise<void>;
114
+ /**
115
+ * 同步catalog下面schema表
116
+ * @param dataSourceID 数据源ID
117
+ * @param catalog 目录名称
118
+ * @param schema 模式名称
119
+ */
120
+ export declare const synchTablesToDataSourceWithCatalog: (dataSourceID: string, catalog: string, schema: string) => Promise<void>;
121
+ /**
122
+ * 同步表
123
+ * @param tableId 表ID
124
+ */
125
+ export declare const syncTable: (tableId: string) => Promise<void>;
126
+ /**
127
+ * 修改表属性
128
+ * @param tableId 表ID
129
+ * @param tableAlias 表别名
130
+ * @param fieldList 字段列表
131
+ */
132
+ export declare const updateTablePropertys: (tableId: string, tableAlias: string, fieldList: BasicField[]) => Promise<void>;
133
+ /**
134
+ * 获取表字段
135
+ * @param tabelId 表ID
136
+ * @returns 返回字段列表
137
+ */
138
+ export declare const getFields: (tabelId: string) => Promise<BasicField[]>;
139
+ /**
140
+ * 获取"数据源"节点下某张表的数据
141
+ * @param tableId 表ID
142
+ * @param maxRows 最大行数
143
+ * @returns 返回表数据
144
+ */
145
+ export declare const getSampleTableData: (tableId: string, maxRows: number) => Promise<SDKGridData>;
146
+ /**
147
+ * 执行指定SQL语句,返回相应结果集
148
+ * @param dataSourceID 数据源ID
149
+ * @param sql SQL语句
150
+ * @param maxRows 最大行数
151
+ * @param format 是否格式化
152
+ * @param cacheable 是否缓存
153
+ * @returns 返回结果集数据
154
+ */
155
+ export declare const execute: (dataSourceID: string, sql: string, maxRows: number, format: boolean, cacheable: boolean) => Promise<SDKGridData>;
156
+ /**
157
+ * 直接执行指定SQL语句,返回相应结果集,不从缓存中返回结果集
158
+ * @param dataSourceID 数据源ID
159
+ * @param sql SQL语句
160
+ * @returns 返回结果集数据
161
+ */
162
+ export declare const executeNoCacheable: (dataSourceID: string, sql: string) => Promise<SDKGridData>;
163
+ /**
164
+ * 直接执行SQL语句,可以是INSERT, UPDATE, DELETE语句,也可以是SQL DDL语句
165
+ * @param dataSourceID 数据源ID
166
+ * @param sql SQL语句
167
+ * @returns 返回影响的行数
168
+ */
169
+ export declare const executeUpdate: (dataSourceID: string, sql: string) => Promise<number>;
170
+ /**
171
+ * 获取未格式化的原始的结果集数据
172
+ * @param dsId 数据源ID
173
+ * @param sql SQL语句
174
+ * @param pageNum 页码
175
+ * @param rowPerPage 每页行数
176
+ * @returns 返回结果集数据
177
+ */
178
+ export declare const getDataByQuerySql: (dsId: string, sql: string, pageNum: number, rowPerPage: number) => Promise<SDKGridData>;