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