@pi-r/oci 0.2.2 → 0.2.8
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/LICENSE +1 -1
- package/README.md +4 -2
- package/client/index.js +5 -5
- package/download/index.js +7 -3
- package/package.json +7 -7
- package/upload/index.js +7 -3
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2023
|
|
1
|
+
Copyright 2023 Mile Square Park
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
package/client/index.js
CHANGED
|
@@ -81,7 +81,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
81
81
|
const { service, table, id, query, ignoreCache } = item;
|
|
82
82
|
if (!table) {
|
|
83
83
|
closeClient();
|
|
84
|
-
throw (0, util_1.formatError)(item, "Missing database table"
|
|
84
|
+
throw (0, util_1.formatError)(item, "Missing database table");
|
|
85
85
|
}
|
|
86
86
|
const renewCache = ignoreCache === 0;
|
|
87
87
|
const getCache = (value) => {
|
|
@@ -105,7 +105,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
105
105
|
const db = await (client || (client = await createClient())).getSodaDatabase().openCollection(table);
|
|
106
106
|
if (!db) {
|
|
107
107
|
closeClient();
|
|
108
|
-
throw (0, util_1.formatError)(item, "Missing database table"
|
|
108
|
+
throw (0, util_1.formatError)(item, "Missing database table");
|
|
109
109
|
}
|
|
110
110
|
const row = db.find().key(id);
|
|
111
111
|
let document = await row.getOne();
|
|
@@ -153,7 +153,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
153
153
|
const db = await (client || (client = await createClient())).getSodaDatabase().openCollection(table);
|
|
154
154
|
if (!db) {
|
|
155
155
|
closeClient();
|
|
156
|
-
throw (0, util_1.formatError)(item, "Missing database table"
|
|
156
|
+
throw (0, util_1.formatError)(item, "Missing database table");
|
|
157
157
|
}
|
|
158
158
|
let operation = db.find().filter(query);
|
|
159
159
|
if (maxRows) {
|
|
@@ -167,12 +167,12 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
167
167
|
result[i] = rows;
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
|
-
({ rows } = await (client || (client = await createClient())).execute(query, params || [], { ...options, outFormat: 4002
|
|
170
|
+
({ rows } = await (client || (client = await createClient())).execute(query, params || [], { ...options, outFormat: 4002, maxRows, resultSet: false, autoCommit: true }));
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
174
|
closeClient();
|
|
175
|
-
throw (0, util_1.formatError)(item, "Missing database query"
|
|
175
|
+
throw (0, util_1.formatError)(item, "Missing database query");
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
result[i] = this.setQueryResult(service, credential, queryString, rows, cacheValue);
|
package/download/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const client_1 = require("
|
|
3
|
+
const client_1 = require("@pi-r/oci");
|
|
4
4
|
function download(credential, service = 'oci') {
|
|
5
5
|
(0, client_1.setStorageCredential)(credential);
|
|
6
|
-
return require(
|
|
6
|
+
return require("@pi-r/aws/download").call(this, credential, service);
|
|
7
7
|
}
|
|
8
|
+
exports.default = download;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
if (exports.default) {
|
|
11
|
+
module.exports = exports.default;
|
|
12
|
+
module.exports.default = exports.default;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/oci",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Oracle (OCI) cloud functions for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/anpham6/pi-r.git",
|
|
11
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
12
|
"directory": "src/cloud/oci"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.5.
|
|
24
|
-
"@e-mc/module": "^0.5.
|
|
25
|
-
"@e-mc/types": "^0.5.
|
|
26
|
-
"@pi-r/aws": "^0.2.
|
|
27
|
-
"aws-sdk": "^2.
|
|
23
|
+
"@e-mc/cloud": "^0.5.4",
|
|
24
|
+
"@e-mc/module": "^0.5.4",
|
|
25
|
+
"@e-mc/types": "^0.5.4",
|
|
26
|
+
"@pi-r/aws": "^0.2.8",
|
|
27
|
+
"aws-sdk": "^2.1570.0",
|
|
28
28
|
"oracledb": "^5.5.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/upload/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const client_1 = require("
|
|
3
|
+
const client_1 = require("@pi-r/oci");
|
|
4
4
|
function upload(credential, service = 'oci') {
|
|
5
5
|
(0, client_1.setStorageCredential)(credential);
|
|
6
|
-
return require(
|
|
6
|
+
return require("@pi-r/aws/upload").call(this, credential, service);
|
|
7
7
|
}
|
|
8
|
+
exports.default = upload;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
if (exports.default) {
|
|
11
|
+
module.exports = exports.default;
|
|
12
|
+
module.exports.default = exports.default;
|
|
13
|
+
}
|