@dremio/js-sdk 0.15.0 → 0.16.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.
@@ -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;AAE/D;;;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,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\";\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 users: new EnterpriseUsersResource(config),\n});\n"]}
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"]}
@@ -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";
@@ -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
  };
@@ -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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",