@dremio/js-sdk 0.15.0 → 0.16.1
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.
- package/dist/cloud/index.d.ts +43 -0
- package/dist/cloud/index.js +7 -0
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/resources.d.ts +44 -2
- package/dist/cloud/resources.js +2 -0
- package/dist/cloud/resources.js.map +1 -1
- package/dist/enterprise/index.d.ts +1 -0
- package/dist/enterprise/resources.d.ts +2 -0
- package/dist/enterprise/resources.js +2 -0
- package/dist/enterprise/resources.js.map +1 -1
- package/dist/oss/index.d.ts +1 -0
- package/dist/oss/resources.d.ts +2 -0
- package/dist/oss/resources.js +2 -0
- package/dist/oss/resources.js.map +1 -1
- package/dist/oss/sql/SqlFunction.d.ts +34 -0
- package/dist/oss/sql/SqlFunction.js +30 -0
- package/dist/oss/sql/SqlFunction.js.map +1 -0
- package/dist/oss/sql/SqlResource.d.ts +17 -0
- package/dist/oss/sql/SqlResource.js +54 -0
- package/dist/oss/sql/SqlResource.js.map +1 -0
- package/package.json +1 -1
package/dist/cloud/index.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ export declare const Dremio: (config: Config) => {
|
|
|
10
10
|
} | undefined;
|
|
11
11
|
origin: string;
|
|
12
12
|
request: import("../common/Config.ts").RequestFn;
|
|
13
|
+
sonarV2Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
|
|
13
14
|
sonarV3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
|
|
14
15
|
v3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
|
|
15
16
|
};
|
|
17
|
+
_sonarV2Request: (projectId: string) => (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
|
|
16
18
|
_sonarV3Request: (projectId: string) => (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
|
|
17
19
|
ai: import("./ai/AiResource.ts").AiResource;
|
|
18
20
|
arctic: import("moize").Moized<(projectId: string) => import("./arctic/ArcticResource.ts").ArcticResource, Partial<{
|
|
@@ -264,6 +266,47 @@ export declare const Dremio: (config: Config) => {
|
|
|
264
266
|
updateCacheForKey: import("moize").UpdateCacheForKey;
|
|
265
267
|
updateExpire: boolean;
|
|
266
268
|
}>>;
|
|
269
|
+
sql: import("moize").Moized<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource, Partial<{
|
|
270
|
+
isDeepEqual: boolean;
|
|
271
|
+
isPromise: boolean;
|
|
272
|
+
isReact: boolean;
|
|
273
|
+
isSerialized: boolean;
|
|
274
|
+
isShallowEqual: boolean;
|
|
275
|
+
matchesArg: import("moize").IsEqual;
|
|
276
|
+
matchesKey: import("moize").IsMatchingKey;
|
|
277
|
+
maxAge: number;
|
|
278
|
+
maxArgs: number;
|
|
279
|
+
maxSize: number;
|
|
280
|
+
onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
|
|
281
|
+
onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
|
|
282
|
+
onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
|
|
283
|
+
onExpire: import("moize").OnExpire;
|
|
284
|
+
profileName: string;
|
|
285
|
+
serializer: import("moize").Serialize;
|
|
286
|
+
transformArgs: import("moize").TransformKey;
|
|
287
|
+
updateCacheForKey: import("moize").UpdateCacheForKey;
|
|
288
|
+
updateExpire: boolean;
|
|
289
|
+
}> & Partial<{
|
|
290
|
+
isDeepEqual: boolean;
|
|
291
|
+
isPromise: boolean;
|
|
292
|
+
isReact: boolean;
|
|
293
|
+
isSerialized: boolean;
|
|
294
|
+
isShallowEqual: boolean;
|
|
295
|
+
matchesArg: import("moize").IsEqual;
|
|
296
|
+
matchesKey: import("moize").IsMatchingKey;
|
|
297
|
+
maxAge: number;
|
|
298
|
+
maxArgs: number;
|
|
299
|
+
maxSize: number;
|
|
300
|
+
onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
|
|
301
|
+
onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
|
|
302
|
+
onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
|
|
303
|
+
onExpire: import("moize").OnExpire;
|
|
304
|
+
profileName: string;
|
|
305
|
+
serializer: import("moize").Serialize;
|
|
306
|
+
transformArgs: import("moize").TransformKey;
|
|
307
|
+
updateCacheForKey: import("moize").UpdateCacheForKey;
|
|
308
|
+
updateExpire: boolean;
|
|
309
|
+
}>>;
|
|
267
310
|
users: import("moize").Moized<(projectId: string) => import("./users/CloudUsersResource.ts").CloudUsersResource, Partial<{
|
|
268
311
|
isDeepEqual: boolean;
|
|
269
312
|
isPromise: boolean;
|
package/dist/cloud/index.js
CHANGED
|
@@ -21,6 +21,12 @@ const getSonarResourceConfig = (config) => (projectId) => {
|
|
|
21
21
|
logger: config.logger,
|
|
22
22
|
origin: config.origin,
|
|
23
23
|
request,
|
|
24
|
+
sonarV2Request: (path, init) => {
|
|
25
|
+
if (!projectId) {
|
|
26
|
+
throw new Error("projectId is required");
|
|
27
|
+
}
|
|
28
|
+
return request(new URL(`/ui/projects/${projectId}/${path}`, config.origin.replace("api", "app")).toString(), init);
|
|
29
|
+
},
|
|
24
30
|
sonarV3Request: (path, init) => {
|
|
25
31
|
if (!projectId) {
|
|
26
32
|
throw new Error("projectId is required");
|
|
@@ -36,6 +42,7 @@ export const Dremio = (config) => {
|
|
|
36
42
|
...Resources(sonarResourceConfig),
|
|
37
43
|
_request: createRequest(config),
|
|
38
44
|
_sonarResourceConfig: sonarResourceConfig,
|
|
45
|
+
_sonarV2Request: (projectId) => sonarResourceConfig(projectId).sonarV2Request,
|
|
39
46
|
_sonarV3Request: (projectId) => sonarResourceConfig(projectId).sonarV3Request,
|
|
40
47
|
};
|
|
41
48
|
};
|
package/dist/cloud/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,SAAkB,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO;QACP,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CACZ,IAAI,GAAG,CACL,gBAAgB,SAAS,IAAI,IAAI,EAAE,EACnC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CACpC,CAAC,QAAQ,EAAE,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;QACD,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CAAC,gBAAgB,SAAS,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;QAC5D,CAAC;QACD,SAAS,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC;KACV,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAAc,EAAE,EAAE;IACvC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO;QACL,GAAG,SAAS,CAAC,mBAAmB,CAAC;QACjC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC;QAC/B,oBAAoB,EAAE,mBAAmB;QACzC,eAAe,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc;QACrF,eAAe,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc;KACtF,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createRequest } from \"../common/createRequest.ts\";\nimport type {\n Config,\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { Resources } from \"./resources.ts\";\n\nconst getSonarResourceConfig = (config: Config) => (projectId?: string) => {\n const request = createRequest(config);\n return {\n logger: config.logger,\n origin: config.origin,\n request,\n sonarV2Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(\n new URL(\n `/ui/projects/${projectId}/${path}`,\n config.origin.replace(\"api\", \"app\"),\n ).toString(),\n init,\n );\n },\n sonarV3Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(`/v0/projects/${projectId}/${path}`, init);\n },\n v3Request: (path: string, init?: RequestInit) => request(`/v0/${path}`, init),\n } satisfies ResourceConfig & SonarV2Config & SonarV3Config & V3Config;\n};\n\nexport const Dremio = (config: Config) => {\n const sonarResourceConfig = getSonarResourceConfig(config);\n return {\n ...Resources(sonarResourceConfig),\n _request: createRequest(config),\n _sonarResourceConfig: sonarResourceConfig,\n _sonarV2Request: (projectId: string) => sonarResourceConfig(projectId).sonarV2Request,\n _sonarV3Request: (projectId: string) => sonarResourceConfig(projectId).sonarV3Request,\n };\n};\n\nexport * from \"../common/sharedExports.ts\";\nexport * from \"./credentials/index.ts\";\nexport * from \"./interfaces.ts\";\nexport * from \"./oauth/oauth.ts\";\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResourceConfig, SonarV3Config, V3Config } from "../common/Config.ts";
|
|
1
|
+
import type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from "../common/Config.ts";
|
|
2
2
|
import { ArcticResource } from "./arctic/ArcticResource.ts";
|
|
3
3
|
import { EnterpriseCatalogResource } from "../enterprise/catalog/EnterpriseCatalogResource.ts";
|
|
4
4
|
import { RolesResource } from "../enterprise/roles/RolesResource.ts";
|
|
@@ -11,11 +11,12 @@ import moize from "moize";
|
|
|
11
11
|
import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.ts";
|
|
12
12
|
import { AiResource } from "./ai/AiResource.ts";
|
|
13
13
|
import { OrganizationsResource } from "./organizations/OrganizationsResource.ts";
|
|
14
|
+
import { SqlResource } from "../oss/sql/SqlResource.ts";
|
|
14
15
|
/**
|
|
15
16
|
* @internal
|
|
16
17
|
* @hidden
|
|
17
18
|
*/
|
|
18
|
-
export declare const Resources: (config: (projectId?: string) => ResourceConfig & SonarV3Config & V3Config) => {
|
|
19
|
+
export declare const Resources: (config: (projectId?: string) => ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => {
|
|
19
20
|
ai: AiResource;
|
|
20
21
|
arctic: moize.Moized<(projectId: string) => ArcticResource, Partial<{
|
|
21
22
|
isDeepEqual: boolean;
|
|
@@ -266,6 +267,47 @@ export declare const Resources: (config: (projectId?: string) => ResourceConfig
|
|
|
266
267
|
updateCacheForKey: moize.UpdateCacheForKey;
|
|
267
268
|
updateExpire: boolean;
|
|
268
269
|
}>>;
|
|
270
|
+
sql: moize.Moized<(projectId: string) => SqlResource, Partial<{
|
|
271
|
+
isDeepEqual: boolean;
|
|
272
|
+
isPromise: boolean;
|
|
273
|
+
isReact: boolean;
|
|
274
|
+
isSerialized: boolean;
|
|
275
|
+
isShallowEqual: boolean;
|
|
276
|
+
matchesArg: moize.IsEqual;
|
|
277
|
+
matchesKey: moize.IsMatchingKey;
|
|
278
|
+
maxAge: number;
|
|
279
|
+
maxArgs: number;
|
|
280
|
+
maxSize: number;
|
|
281
|
+
onCacheAdd: moize.OnCacheOperation<(projectId: string) => SqlResource>;
|
|
282
|
+
onCacheChange: moize.OnCacheOperation<(projectId: string) => SqlResource>;
|
|
283
|
+
onCacheHit: moize.OnCacheOperation<(projectId: string) => SqlResource>;
|
|
284
|
+
onExpire: moize.OnExpire;
|
|
285
|
+
profileName: string;
|
|
286
|
+
serializer: moize.Serialize;
|
|
287
|
+
transformArgs: moize.TransformKey;
|
|
288
|
+
updateCacheForKey: moize.UpdateCacheForKey;
|
|
289
|
+
updateExpire: boolean;
|
|
290
|
+
}> & Partial<{
|
|
291
|
+
isDeepEqual: boolean;
|
|
292
|
+
isPromise: boolean;
|
|
293
|
+
isReact: boolean;
|
|
294
|
+
isSerialized: boolean;
|
|
295
|
+
isShallowEqual: boolean;
|
|
296
|
+
matchesArg: moize.IsEqual;
|
|
297
|
+
matchesKey: moize.IsMatchingKey;
|
|
298
|
+
maxAge: number;
|
|
299
|
+
maxArgs: number;
|
|
300
|
+
maxSize: number;
|
|
301
|
+
onCacheAdd: moize.OnCacheOperation<moize.Moizeable>;
|
|
302
|
+
onCacheChange: moize.OnCacheOperation<moize.Moizeable>;
|
|
303
|
+
onCacheHit: moize.OnCacheOperation<moize.Moizeable>;
|
|
304
|
+
onExpire: moize.OnExpire;
|
|
305
|
+
profileName: string;
|
|
306
|
+
serializer: moize.Serialize;
|
|
307
|
+
transformArgs: moize.TransformKey;
|
|
308
|
+
updateCacheForKey: moize.UpdateCacheForKey;
|
|
309
|
+
updateExpire: boolean;
|
|
310
|
+
}>>;
|
|
269
311
|
users: moize.Moized<(projectId: string) => CloudUsersResource, Partial<{
|
|
270
312
|
isDeepEqual: boolean;
|
|
271
313
|
isPromise: boolean;
|
package/dist/cloud/resources.js
CHANGED
|
@@ -25,6 +25,7 @@ import moize from "moize";
|
|
|
25
25
|
import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.js";
|
|
26
26
|
import { AiResource } from "./ai/AiResource.js";
|
|
27
27
|
import { OrganizationsResource } from "./organizations/OrganizationsResource.js";
|
|
28
|
+
import { SqlResource } from "../oss/sql/SqlResource.js";
|
|
28
29
|
/**
|
|
29
30
|
* @internal
|
|
30
31
|
* @hidden
|
|
@@ -40,6 +41,7 @@ export const Resources = (config) => ({
|
|
|
40
41
|
projects: new ProjectsResource(config()),
|
|
41
42
|
roles: moize.default((projectId) => new RolesResource(config(projectId))),
|
|
42
43
|
scripts: moize.default((projectId) => new EnterpriseScriptsResource(config(projectId))),
|
|
44
|
+
sql: moize.default((projectId) => new SqlResource(config(projectId))),
|
|
43
45
|
users: moize.default((projectId) => new CloudUsersResource(config(projectId))),
|
|
44
46
|
});
|
|
45
47
|
//# sourceMappingURL=resources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/cloud/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/cloud/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,MAAyF,EACzF,EAAE,CAAC,CAAC;IACJ,EAAE,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACnF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/F,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACrF,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,IAAI,yBAAyB,CAAC,MAAM,EAAE,CAAC;IAC1D,aAAa,EAAE,IAAI,qBAAqB,CAAC,MAAM,EAAE,CAAC;IAClD,QAAQ,EAAE,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;IACxC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACjF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/F,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7E,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CACvF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { ArcticResource } from \"./arctic/ArcticResource.ts\";\nimport { EnterpriseCatalogResource } from \"../enterprise/catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"../enterprise/roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"../enterprise/scripts/EnterpriseScriptsResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\nimport { ProjectsResource } from \"./projects/ProjectsResource.ts\";\nimport { CloudUsersResource } from \"./users/CloudUsersResource.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport moize from \"moize\";\nimport { OAuthApplicationsResource } from \"./oauth/OAuthApplicationsResource.ts\";\nimport { AiResource } from \"./ai/AiResource.ts\";\nimport { OrganizationsResource } from \"./organizations/OrganizationsResource.ts\";\nimport { SqlResource } from \"../oss/sql/SqlResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (\n config: (projectId?: string) => ResourceConfig & SonarV2Config & SonarV3Config & V3Config,\n) => ({\n ai: new AiResource(config()),\n arctic: moize.default((projectId: string) => new ArcticResource(config(projectId))),\n catalog: moize.default((projectId: string) => new EnterpriseCatalogResource(config(projectId))),\n engines: moize.default((projectId: string) => new EnginesResource(config(projectId))),\n jobs: moize.default((projectId: string) => new JobsResource(config(projectId))),\n oauthApplications: new OAuthApplicationsResource(config()),\n organizations: new OrganizationsResource(config()),\n projects: new ProjectsResource(config()),\n roles: moize.default((projectId: string) => new RolesResource(config(projectId))),\n scripts: moize.default((projectId: string) => new EnterpriseScriptsResource(config(projectId))),\n sql: moize.default((projectId: string) => new SqlResource(config(projectId))),\n users: moize.default((projectId: string) => new CloudUsersResource(config(projectId))),\n});\n"]}
|
|
@@ -23,6 +23,7 @@ export declare const Dremio: (config: Config) => {
|
|
|
23
23
|
jobs: import("../oss/jobs/JobsResource.ts").JobsResource;
|
|
24
24
|
roles: import("./roles/RolesResource.ts").RolesResource;
|
|
25
25
|
scripts: import("./scripts/EnterpriseScriptsResource.ts").EnterpriseScriptsResource;
|
|
26
|
+
sql: import("../oss/sql/SqlResource.ts").SqlResource;
|
|
26
27
|
users: import("./users/EnterpriseUsersResource.ts").EnterpriseUsersResource;
|
|
27
28
|
};
|
|
28
29
|
export * from "../common/sharedExports.ts";
|
|
@@ -5,6 +5,7 @@ import { RolesResource } from "./roles/RolesResource.ts";
|
|
|
5
5
|
import { EnterpriseScriptsResource } from "./scripts/EnterpriseScriptsResource.ts";
|
|
6
6
|
import { EnterpriseUsersResource } from "./users/EnterpriseUsersResource.ts";
|
|
7
7
|
import { EnginesResource } from "./engines/EnginesResource.ts";
|
|
8
|
+
import { SqlResource } from "../oss/sql/SqlResource.ts";
|
|
8
9
|
/**
|
|
9
10
|
* @internal
|
|
10
11
|
* @hidden
|
|
@@ -15,5 +16,6 @@ export declare const Resources: (config: ResourceConfig & SonarV2Config & SonarV
|
|
|
15
16
|
jobs: JobsResource;
|
|
16
17
|
roles: RolesResource;
|
|
17
18
|
scripts: EnterpriseScriptsResource;
|
|
19
|
+
sql: SqlResource;
|
|
18
20
|
users: EnterpriseUsersResource;
|
|
19
21
|
};
|
|
@@ -20,6 +20,7 @@ import { RolesResource } from "./roles/RolesResource.js";
|
|
|
20
20
|
import { EnterpriseScriptsResource } from "./scripts/EnterpriseScriptsResource.js";
|
|
21
21
|
import { EnterpriseUsersResource } from "./users/EnterpriseUsersResource.js";
|
|
22
22
|
import { EnginesResource } from "./engines/EnginesResource.js";
|
|
23
|
+
import { SqlResource } from "../oss/sql/SqlResource.js";
|
|
23
24
|
/**
|
|
24
25
|
* @internal
|
|
25
26
|
* @hidden
|
|
@@ -31,6 +32,7 @@ export const Resources = (config) => ({
|
|
|
31
32
|
jobs: new JobsResource(config),
|
|
32
33
|
roles: new RolesResource(config),
|
|
33
34
|
scripts: new EnterpriseScriptsResource(config),
|
|
35
|
+
sql: new SqlResource(config),
|
|
34
36
|
users: new EnterpriseUsersResource(config),
|
|
35
37
|
});
|
|
36
38
|
//# sourceMappingURL=resources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/enterprise/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/enterprise/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,MAAiF,EACjF,EAAE,CAAC,CAAC;IACJ,GAAG,kBAAkB,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,IAAI,yBAAyB,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,IAAI,YAAY,CAAC,MAAM,CAAC;IAC9B,KAAK,EAAE,IAAI,aAAa,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,IAAI,yBAAyB,CAAC,MAAM,CAAC;IAC9C,GAAG,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,IAAI,uBAAuB,CAAC,MAAM,CAAC;CAC3C,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n SonarV4Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport { Resources as CommunityResources } from \"../oss/resources.ts\";\nimport { EnterpriseCatalogResource } from \"./catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"./roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"./scripts/EnterpriseScriptsResource.ts\";\nimport { EnterpriseUsersResource } from \"./users/EnterpriseUsersResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\nimport { SqlResource } from \"../oss/sql/SqlResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (\n config: ResourceConfig & SonarV2Config & SonarV3Config & SonarV4Config & V3Config,\n) => ({\n ...CommunityResources(config),\n catalog: new EnterpriseCatalogResource(config),\n engines: new EnginesResource(config),\n jobs: new JobsResource(config),\n roles: new RolesResource(config),\n scripts: new EnterpriseScriptsResource(config),\n sql: new SqlResource(config),\n users: new EnterpriseUsersResource(config),\n});\n"]}
|
package/dist/oss/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const Dremio: (config: Config) => {
|
|
|
19
19
|
catalog: import("./catalog/CatalogResource.ts").CatalogResource;
|
|
20
20
|
jobs: import("./jobs/JobsResource.ts").JobsResource;
|
|
21
21
|
scripts: import("./scripts/ScriptsResource.ts").ScriptsResource;
|
|
22
|
+
sql: import("./sql/SqlResource.ts").SqlResource;
|
|
22
23
|
users: import("./users/UsersResource.ts").UsersResource;
|
|
23
24
|
};
|
|
24
25
|
export * from "../common/sharedExports.ts";
|
package/dist/oss/resources.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from "../
|
|
|
2
2
|
import { CatalogResource } from "./catalog/CatalogResource.ts";
|
|
3
3
|
import { JobsResource } from "./jobs/JobsResource.ts";
|
|
4
4
|
import { ScriptsResource } from "./scripts/ScriptsResource.ts";
|
|
5
|
+
import { SqlResource } from "./sql/SqlResource.ts";
|
|
5
6
|
import { UsersResource } from "./users/UsersResource.ts";
|
|
6
7
|
export declare const Resources: (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => {
|
|
7
8
|
catalog: CatalogResource;
|
|
8
9
|
jobs: JobsResource;
|
|
9
10
|
scripts: ScriptsResource;
|
|
11
|
+
sql: SqlResource;
|
|
10
12
|
users: UsersResource;
|
|
11
13
|
};
|
package/dist/oss/resources.js
CHANGED
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
import { CatalogResource } from "./catalog/CatalogResource.js";
|
|
17
17
|
import { JobsResource } from "./jobs/JobsResource.js";
|
|
18
18
|
import { ScriptsResource } from "./scripts/ScriptsResource.js";
|
|
19
|
+
import { SqlResource } from "./sql/SqlResource.js";
|
|
19
20
|
import { UsersResource } from "./users/UsersResource.js";
|
|
20
21
|
export const Resources = (config) => ({
|
|
21
22
|
catalog: new CatalogResource(config),
|
|
22
23
|
jobs: new JobsResource(config),
|
|
23
24
|
scripts: new ScriptsResource(config),
|
|
25
|
+
sql: new SqlResource(config),
|
|
24
26
|
users: new UsersResource(config),
|
|
25
27
|
});
|
|
26
28
|
//# sourceMappingURL=resources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/oss/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAiE,EAAE,EAAE,CAAC,CAAC;IAC/F,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,IAAI,YAAY,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,IAAI,aAAa,CAAC,MAAM,CAAC;CACjC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { CatalogResource } from \"./catalog/CatalogResource.ts\";\nimport { JobsResource } from \"./jobs/JobsResource.ts\";\nimport { ScriptsResource } from \"./scripts/ScriptsResource.ts\";\nimport { UsersResource } from \"./users/UsersResource.ts\";\n\nexport const Resources = (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => ({\n catalog: new CatalogResource(config),\n jobs: new JobsResource(config),\n scripts: new ScriptsResource(config),\n users: new UsersResource(config),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/oss/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAiE,EAAE,EAAE,CAAC,CAAC;IAC/F,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,IAAI,YAAY,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,IAAI,aAAa,CAAC,MAAM,CAAC;CACjC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { CatalogResource } from \"./catalog/CatalogResource.ts\";\nimport { JobsResource } from \"./jobs/JobsResource.ts\";\nimport { ScriptsResource } from \"./scripts/ScriptsResource.ts\";\nimport { SqlResource } from \"./sql/SqlResource.ts\";\nimport { UsersResource } from \"./users/UsersResource.ts\";\n\nexport const Resources = (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => ({\n catalog: new CatalogResource(config),\n jobs: new JobsResource(config),\n scripts: new ScriptsResource(config),\n sql: new SqlResource(config),\n users: new UsersResource(config),\n});\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare class SqlFunction {
|
|
2
|
+
readonly description: string | null;
|
|
3
|
+
readonly dremioVersion: string | null;
|
|
4
|
+
readonly functionCategories: Set<string>;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly signatures: SqlFunctionEntity["signatures"];
|
|
7
|
+
constructor(properties: {
|
|
8
|
+
description: SqlFunction["description"];
|
|
9
|
+
dremioVersion: SqlFunction["dremioVersion"];
|
|
10
|
+
functionCategories: SqlFunction["functionCategories"];
|
|
11
|
+
name: SqlFunction["name"];
|
|
12
|
+
signatures: SqlFunction["signatures"];
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export type SqlFunctionEntity = {
|
|
16
|
+
description: string | undefined;
|
|
17
|
+
dremioVersion: string | undefined;
|
|
18
|
+
functionCategories: string[];
|
|
19
|
+
name: string;
|
|
20
|
+
signatures: {
|
|
21
|
+
description: string;
|
|
22
|
+
parameters: {
|
|
23
|
+
description: string;
|
|
24
|
+
kind: string;
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
}[];
|
|
28
|
+
returnType: string;
|
|
29
|
+
sampleCodes: {
|
|
30
|
+
call: string;
|
|
31
|
+
result: string;
|
|
32
|
+
}[];
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024-2025 Dremio Corporation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export class SqlFunction {
|
|
17
|
+
description;
|
|
18
|
+
dremioVersion;
|
|
19
|
+
functionCategories;
|
|
20
|
+
name;
|
|
21
|
+
signatures;
|
|
22
|
+
constructor(properties) {
|
|
23
|
+
this.description = properties.description;
|
|
24
|
+
this.dremioVersion = properties.dremioVersion;
|
|
25
|
+
this.functionCategories = properties.functionCategories;
|
|
26
|
+
this.name = properties.name;
|
|
27
|
+
this.signatures = properties.signatures;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=SqlFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlFunction.js","sourceRoot":"","sources":["../../../src/oss/sql/SqlFunction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,OAAO,WAAW;IACb,WAAW,CAAgB;IAC3B,aAAa,CAAgB;IAC7B,kBAAkB,CAAc;IAChC,IAAI,CAAS;IACb,UAAU,CAAkC;IAErD,YAAY,UAMX;QACC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC;QAC9C,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAC1C,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class SqlFunction {\n readonly description: string | null;\n readonly dremioVersion: string | null;\n readonly functionCategories: Set<string>;\n readonly name: string;\n readonly signatures: SqlFunctionEntity[\"signatures\"];\n\n constructor(properties: {\n description: SqlFunction[\"description\"];\n dremioVersion: SqlFunction[\"dremioVersion\"];\n functionCategories: SqlFunction[\"functionCategories\"];\n name: SqlFunction[\"name\"];\n signatures: SqlFunction[\"signatures\"];\n }) {\n this.description = properties.description;\n this.dremioVersion = properties.dremioVersion;\n this.functionCategories = properties.functionCategories;\n this.name = properties.name;\n this.signatures = properties.signatures;\n }\n}\n\nexport type SqlFunctionEntity = {\n description: string | undefined;\n dremioVersion: string | undefined;\n functionCategories: string[];\n name: string;\n signatures: {\n description: string;\n parameters: { description: string; kind: string; name: string; type: string }[];\n returnType: string;\n sampleCodes: {\n call: string;\n result: string;\n }[];\n }[];\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SonarV2Config } from "../../common/Config.ts";
|
|
2
|
+
import type { SignalParam } from "../../common/Params.ts";
|
|
3
|
+
import { SqlFunction, type SqlFunctionEntity } from "./SqlFunction.ts";
|
|
4
|
+
export declare class SqlResource {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(config: SonarV2Config);
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
_sqlFunctionFromEntity(entity: SqlFunctionEntity): SqlFunction;
|
|
11
|
+
/**
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
_listFunctions(): {
|
|
15
|
+
data({ signal }?: SignalParam): AsyncGenerator<SqlFunction, void, unknown>;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024-2025 Dremio Corporation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SqlFunction } from "./SqlFunction.js";
|
|
17
|
+
export class SqlResource {
|
|
18
|
+
#config;
|
|
19
|
+
constructor(config) {
|
|
20
|
+
this.#config = config;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_sqlFunctionFromEntity(entity) {
|
|
26
|
+
return new SqlFunction({
|
|
27
|
+
description: entity.description || null,
|
|
28
|
+
dremioVersion: entity.dremioVersion || null,
|
|
29
|
+
functionCategories: new Set(entity.functionCategories),
|
|
30
|
+
name: entity.name,
|
|
31
|
+
signatures: entity.signatures,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
_listFunctions() {
|
|
38
|
+
const getPage = ({ signal } = {}) => this.#config
|
|
39
|
+
.sonarV2Request("sql/functions", {
|
|
40
|
+
headers: {
|
|
41
|
+
Accept: "application/json",
|
|
42
|
+
},
|
|
43
|
+
signal,
|
|
44
|
+
})
|
|
45
|
+
.map((res) => res.json())
|
|
46
|
+
.map((response) => response.functions.map((entity) => this._sqlFunctionFromEntity(entity)));
|
|
47
|
+
return {
|
|
48
|
+
async *data({ signal } = {}) {
|
|
49
|
+
yield* (await getPage({ signal }).promise).unwrap();
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=SqlResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlResource.js","sourceRoot":"","sources":["../../../src/oss/sql/SqlResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAEvE,MAAM,OAAO,WAAW;IACtB,OAAO,CAAgB;IAEvB,YAAY,MAAqB;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,MAAyB;QAC9C,OAAO,IAAI,WAAW,CAAC;YACrB,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,IAAI;YACvC,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,IAAI;YAC3C,kBAAkB,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC;YACtD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CAC/C,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;aAC3B;YACD,MAAM;SACP,CAAC;aACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAiD,CAAC;aACvE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAChG,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;YACtD,CAAC;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SonarV2Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { SqlFunction, type SqlFunctionEntity } from \"./SqlFunction.ts\";\n\nexport class SqlResource {\n #config: SonarV2Config;\n\n constructor(config: SonarV2Config) {\n this.#config = config;\n }\n\n /**\n * @internal\n */\n _sqlFunctionFromEntity(entity: SqlFunctionEntity) {\n return new SqlFunction({\n description: entity.description || null,\n dremioVersion: entity.dremioVersion || null,\n functionCategories: new Set(entity.functionCategories),\n name: entity.name,\n signatures: entity.signatures,\n });\n }\n\n /**\n * @experimental\n */\n _listFunctions() {\n const getPage = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV2Request(\"sql/functions\", {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n })\n .map((res) => res.json() as Promise<{ functions: SqlFunctionEntity[] }>)\n .map((response) => response.functions.map((entity) => this._sqlFunctionFromEntity(entity)));\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await getPage({ signal }).promise).unwrap();\n },\n };\n }\n}\n"]}
|