[Tables] Implement PagableAsyncIterators for listEnitites and listTables operations (#10884)
* Implement async iterators for listEntity * Add list table * Fix extra request * Update API surface * update samples and rollup externals * Add create operation * Update api surface * Clean up * Add details for running tests locally * Make _response non-enumerable * Fix lint errors
This commit is contained in:
Родитель
5c4a952dff
Коммит
83c1da1b4b
|
@ -11,7 +11,7 @@
|
|||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/latest/tables.d.ts"
|
||||
"publicTrimmedFilePath": "./types/latest/data-tables.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"./dist-esm/src/utils/url.js": "./dist-esm/src/utils/url.browser.js",
|
||||
"./dist-esm/src/utils/bufferSerializer.js": "./dist-esm/src/utils/bufferSerializer.browser.js"
|
||||
},
|
||||
"types": "types/latest/tables.d.ts",
|
||||
"types": "types/latest/data-tables.d.ts",
|
||||
"scripts": {
|
||||
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
||||
"build:autorest": "autorest ./swagger/README.md --typescript --package-version=1.0.0-preview.1 --version=3.0.6267 --v3=true",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"integration-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/integration.index.node.js",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
|
||||
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o tables-lintReport.html || exit 0",
|
||||
"lint": "eslint package.json api-extractor.json src test --ext .ts",
|
||||
"pack": "npm pack 2>&1",
|
||||
"prebuild": "npm run clean",
|
||||
"test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
|
||||
|
@ -72,9 +72,9 @@
|
|||
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/tables/data-tables/",
|
||||
"sideEffects": false,
|
||||
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@azure/core-http": "^1.1.6",
|
||||
"@azure/core-paging": "^1.1.1",
|
||||
"@opentelemetry/api": "^0.10.2",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P6__browser\",\"RowKey\":\"R6\",\"testField\":true,\"testField@odata.type\":\"Edm.Boolean\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.3280531Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42acc-b002-00cb-35c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A38.3280531Z'\\\"\",\"PartitionKey\":\"P6__browser\",\"RowKey\":\"R6\",\"Timestamp\":\"2020-08-21T14:06:38.3280531Z\",\"testField\":true}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.3280531Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42add-b002-00cb-44c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P6__browser\",\"RowKey\":\"R6\",\"testField\":true,\"testField@odata.type\":\"Edm.Boolean\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.6602483Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc514d6-7002-013c-7fee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "084b35362f2b3fa9590a0c5cf13bec53"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__browser',RowKey='R6')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.6602483Z'\\\"\",\"PartitionKey\":\"P6__browser\",\"RowKey\":\"R6\",\"Timestamp\":\"2020-08-21T19:10:27.6602483Z\",\"testField\":true}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.6602483Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc514f5-7002-013c-18ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "2cb3f1a5bd57fa64086d81a1249fb81f"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R2\",\"testField\":\"2020-09-17T00:00:00.000Z\",\"testField@odata.type\":\"Edm.DateTime\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A37.9437778Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a43-b002-00cb-3cc4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A37.9437778Z'\\\"\",\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R2\",\"Timestamp\":\"2020-08-21T14:06:37.9437778Z\",\"testField@odata.type\":\"Edm.DateTime\",\"testField\":\"2020-09-17T00:00:00Z\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A37.9437778Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a57-b002-00cb-4ec4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R2\",\"testField\":\"2020-09-17T00:00:00.000Z\",\"testField@odata.type\":\"Edm.DateTime\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.2459544Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc513d6-7002-013c-1cee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "a344a65a1b1474afb24a3b92e6d712db"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R2')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.2459544Z'\\\"\",\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R2\",\"Timestamp\":\"2020-08-21T19:10:27.2459544Z\",\"testField@odata.type\":\"Edm.DateTime\",\"testField\":\"2020-09-17T00:00:00Z\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.2459544Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc513fe-7002-013c-40ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "ab29f64dc6d05f2300e7b86378423c78"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P7__browser\",\"RowKey\":\"R7\",\"testField\":\"2020-09-17T00:00:00.000Z\",\"testField@odata.type\":\"Edm.DateTime\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.4161161Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42ae6-b002-00cb-4cc4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A38.4161161Z'\\\"\",\"PartitionKey\":\"P7__browser\",\"RowKey\":\"R7\",\"Timestamp\":\"2020-08-21T14:06:38.4161161Z\",\"testField@odata.type\":\"Edm.DateTime\",\"testField\":\"2020-09-17T00:00:00Z\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.4161161Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42af9-b002-00cb-5ec4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P7__browser\",\"RowKey\":\"R7\",\"testField\":\"2020-09-17T00:00:00.000Z\",\"testField@odata.type\":\"Edm.DateTime\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.7503128Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc514ff-7002-013c-22ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "7ad3f806728ea3d9aacb9c0b17475149"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__browser',RowKey='R7')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.7503128Z'\\\"\",\"PartitionKey\":\"P7__browser\",\"RowKey\":\"R7\",\"Timestamp\":\"2020-08-21T19:10:27.7503128Z\",\"testField@odata.type\":\"Edm.DateTime\",\"testField\":\"2020-09-17T00:00:00Z\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.7503128Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc51516-7002-013c-39ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "e3b3ab7b014f3c624d3af6945c4b35ae"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P3__browser\",\"RowKey\":\"R3\",\"testField\":\"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c\",\"testField@odata.type\":\"Edm.Guid\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.0438498Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a62-b002-00cb-56c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A38.0438498Z'\\\"\",\"PartitionKey\":\"P3__browser\",\"RowKey\":\"R3\",\"Timestamp\":\"2020-08-21T14:06:38.0438498Z\",\"testField@odata.type\":\"Edm.Guid\",\"testField\":\"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.0438498Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a89-b002-00cb-77c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P3__browser\",\"RowKey\":\"R3\",\"testField\":\"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c\",\"testField@odata.type\":\"Edm.Guid\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.3670401Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc51420-7002-013c-61ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "315fc55599f60a7ac3402c6b58e1afcb"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__browser',RowKey='R3')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.3670401Z'\\\"\",\"PartitionKey\":\"P3__browser\",\"RowKey\":\"R3\",\"Timestamp\":\"2020-08-21T19:10:27.3670401Z\",\"testField@odata.type\":\"Edm.Guid\",\"testField\":\"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.3670401Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc5144e-7002-013c-08ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "ea5a0d20503d3a9c14e1a0fd399c4b7d"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P5__browser\",\"RowKey\":\"R5\",\"testField\":123,\"testField@odata.type\":\"Edm.Int32\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.2399901Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42ab4-b002-00cb-1ec4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A38.2399901Z'\\\"\",\"PartitionKey\":\"P5__browser\",\"RowKey\":\"R5\",\"Timestamp\":\"2020-08-21T14:06:38.2399901Z\",\"testField\":123}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.2399901Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42ac8-b002-00cb-31c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P5__browser\",\"RowKey\":\"R5\",\"testField\":123,\"testField@odata.type\":\"Edm.Int32\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.5641804Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc514a6-7002-013c-56ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "e955ffe6d0ff9ff8e5553812d8b1a177"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__browser',RowKey='R5')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.5641804Z'\\\"\",\"PartitionKey\":\"P5__browser\",\"RowKey\":\"R5\",\"Timestamp\":\"2020-08-21T19:10:27.5641804Z\",\"testField\":123}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.5641804Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc514bc-7002-013c-6aee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "0a7cdb8e42e56144e1901c1d8e40bd92"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P4__browser\",\"RowKey\":\"R4\",\"testField\":\"12345543221\",\"testField@odata.type\":\"Edm.Int64\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.146924Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a96-b002-00cb-02c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A38.146924Z'\\\"\",\"PartitionKey\":\"P4__browser\",\"RowKey\":\"R4\",\"Timestamp\":\"2020-08-21T14:06:38.146924Z\",\"testField@odata.type\":\"Edm.Int64\",\"testField\":\"12345543221\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A38.146924Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42aa9-b002-00cb-13c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P4__browser\",\"RowKey\":\"R4\",\"testField\":\"12345543221\",\"testField@odata.type\":\"Edm.Int64\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.4621082Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc5146e-7002-013c-25ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "1421486c8ddc9bab74e228cd9a38e26e"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__browser',RowKey='R4')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.4621082Z'\\\"\",\"PartitionKey\":\"P4__browser\",\"RowKey\":\"R4\",\"Timestamp\":\"2020-08-21T19:10:27.4621082Z\",\"testField@odata.type\":\"Edm.Int64\",\"testField\":\"12345543221\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.4621082Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc51491-7002-013c-43ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "2f0606e433043e714dbda7334e903bd7"
|
||||
}
|
|
@ -1,49 +1,49 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R1\",\"testField\":\"testEntity\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A37.8377024Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a0f-b002-00cb-0cc4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T14%3A06%3A37.8377024Z'\\\"\",\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R1\",\"Timestamp\":\"2020-08-21T14:06:37.8377024Z\",\"testField\":\"testEntity\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:37 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T14%3A06%3A37.8377024Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42a2c-b002-00cb-27c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration",
|
||||
"query": {},
|
||||
"requestBody": "{\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R1\",\"testField\":\"testEntity\"}",
|
||||
"status": 204,
|
||||
"response": "",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-length": "0",
|
||||
"dataserviceid": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.1398785Z'\"",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"preference-applied": "return-no-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc513a2-7002-013c-6dee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "ac07b2b33118eb070f6b10bf09c3c3b6"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__browser',RowKey='R1')",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element\",\"odata.etag\":\"W/\\\"datetime'2020-08-21T19%3A10%3A27.1398785Z'\\\"\",\"PartitionKey\":\"P2__browser\",\"RowKey\":\"R1\",\"Timestamp\":\"2020-08-21T19:10:27.1398785Z\",\"testField\":\"testEntity\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:26 GMT",
|
||||
"etag": "W/\"datetime'2020-08-21T19%3A10%3A27.1398785Z'\"",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc513c1-7002-013c-08ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "c60f5cfd2af97e94b4e54d5d82b16051"
|
||||
}
|
165
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_all.json
сгенерированный
Normal file
165
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_all.json
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
29
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_binary_with_filter.json
сгенерированный
Normal file
29
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_binary_with_filter.json
сгенерированный
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/list()",
|
||||
"query": {
|
||||
"$filter": "RowKey eq 'binary1'"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#list\",\"value\":[{\"odata.etag\":\"W/\\\"datetime'2020-08-21T15%3A26%3A38.9424197Z'\\\"\",\"PartitionKey\":\"LIST_1\",\"RowKey\":\"binary1\",\"Timestamp\":\"2020-08-21T15:26:38.9424197Z\",\"foo@odata.type\":\"Edm.Binary\",\"foo\":\"QmFy\"}]}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Thu, 27 Aug 2020 18:31:04 GMT",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "dd68a25a-1002-0082-7ea0-7cf584000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "cd70603ef903405a7a1613ea35019e6c"
|
||||
}
|
341
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_by_page.json
сгенерированный
Normal file
341
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_by_page.json
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
29
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_with_filter.json
сгенерированный
Normal file
29
sdk/tables/data-tables/recordings/browsers/tableclient_listentities/recording_should_list_with_filter.json
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,47 +1,47 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/Tables",
|
||||
"query": {},
|
||||
"requestBody": "{\"TableName\":\"testTablebrowser\"}",
|
||||
"status": 201,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#Tables/@Element\",\"TableName\":\"testTablebrowser\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/Tables('testTablebrowser')",
|
||||
"preference-applied": "return-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42b13-b002-00cb-77c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/Tables",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"integration\"},{\"TableName\":\"test1\"},{\"TableName\":\"TestTable\"},{\"TableName\":\"testTablebrowser\"},{\"TableName\":\"testTablenode\"}]}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 14:06:38 GMT",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "fad42b24-b002-00cb-06c4-77c6e4000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/Tables",
|
||||
"query": {},
|
||||
"requestBody": "{\"TableName\":\"testTablebrowser\"}",
|
||||
"status": 201,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#Tables/@Element\",\"TableName\":\"testTablebrowser\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:30 GMT",
|
||||
"location": "https://joherediteststorage.table.core.windows.net/Tables('testTablebrowser')",
|
||||
"preference-applied": "return-content",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc51b09-7002-013c-15ee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
},
|
||||
"hash": "efa54a588d5723c90c430b55e1dacd4b"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://joherediteststorage.table.core.windows.net/Tables",
|
||||
"query": {},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"odata.metadata\":\"https://joherediteststorage.table.core.windows.net/$metadata#Tables\",\"value\":[{\"TableName\":\"integration\"},{\"TableName\":\"list\"},{\"TableName\":\"test1\"},{\"TableName\":\"TestTable\"},{\"TableName\":\"testTablebrowser\"},{\"TableName\":\"testTablenode\"}]}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-cache",
|
||||
"content-type": "application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"date": "Fri, 21 Aug 2020 19:10:30 GMT",
|
||||
"server": "Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-request-id": "bfc51b24-7002-013c-2bee-77a65a000000",
|
||||
"x-ms-version": "2019-02-02"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "1c54a7b7efb67c762c52ec5128c51627"
|
||||
}
|
90
sdk/tables/data-tables/recordings/browsers/tableserviceclient_listtables/recording_should_list_all.json
сгенерированный
Normal file
90
sdk/tables/data-tables/recordings/browsers/tableserviceclient_listtables/recording_should_list_all.json
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
183
sdk/tables/data-tables/recordings/browsers/tableserviceclient_listtables/recording_should_list_by_page.json
сгенерированный
Normal file
183
sdk/tables/data-tables/recordings/browsers/tableserviceclient_listtables/recording_should_list_by_page.json
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,82 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "57fa50b1d0db0644ff3d7914b8f49a00";
|
||||
module.exports.hash = "c132da74b0baa4a41d3681a387e3b855";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P6__node",
|
||||
RowKey: "R6",
|
||||
testField: true,
|
||||
"testField@odata.type": "Edm.Boolean"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P6__node","RowKey":"R6","testField":true,"testField@odata.type":"Edm.Boolean"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A16.056525Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__node',RowKey='R6')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"9c53674d-c002-012e-1ac4-779246000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__node',RowKey='R6')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.6480387Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__node',RowKey='R6')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'ed434a13-5002-008e-6aee-771b75000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P6__node',RowKey='R6')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:59 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P6__node%27,RowKey=%27R6%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P6__node%27,RowKey=%27R6%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A16.056525Z'\"",
|
||||
PartitionKey: "P6__node",
|
||||
RowKey: "R6",
|
||||
Timestamp: "2020-08-21T14:06:16.056525Z",
|
||||
testField: true
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A16.056525Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"4fc9e52c-2002-004d-55c4-779236000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A59.6480387Z'\"","PartitionKey":"P6__node","RowKey":"R6","Timestamp":"2020-08-21T19:09:59.6480387Z","testField":true}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.6480387Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'defc0678-6002-0086-76ee-770006000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,83 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "cc070e6adab1362a8712ac880d2774c7";
|
||||
module.exports.hash = "66464384b06d60aadae20e953197423f";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P2__node",
|
||||
RowKey: "R2",
|
||||
testField: "2020-09-17T00:00:00.000Z",
|
||||
"testField@odata.type": "Edm.DateTime"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P2__node","RowKey":"R2","testField":"2020-09-17T00:00:00.000Z","testField@odata.type":"Edm.DateTime"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.1819959Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R2')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"b3e8b698-b002-0007-49c4-77a251000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R2')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:14 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.7696874Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R2')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'5d2a3e33-6002-00e0-23ee-77b25c000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R2')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:57 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P2__node%27,RowKey=%27R2%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P2__node%27,RowKey=%27R2%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A15.1819959Z'\"",
|
||||
PartitionKey: "P2__node",
|
||||
RowKey: "R2",
|
||||
Timestamp: "2020-08-21T14:06:15.1819959Z",
|
||||
"testField@odata.type": "Edm.DateTime",
|
||||
testField: "2020-09-17T00:00:00Z"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.1819959Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"e64f19f3-1002-0105-60c4-77e6fe000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A58.7696874Z'\"","PartitionKey":"P2__node","RowKey":"R2","Timestamp":"2020-08-21T19:09:58.7696874Z","testField@odata.type":"Edm.DateTime","testField":"2020-09-17T00:00:00Z"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.7696874Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'e6fbf2e5-f002-0088-31ee-77ec0d000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,83 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "f8d8f2fb51790df0fd13e81c963529ca";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P7__node",
|
||||
RowKey: "R7",
|
||||
testField: "2020-09-17T00:00:00.000Z",
|
||||
"testField@odata.type": "Edm.DateTime"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P7__node","RowKey":"R7","testField":"2020-09-17T00:00:00.000Z","testField@odata.type":"Edm.DateTime"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A16.2688055Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__node',RowKey='R7')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"9ed760c5-e002-0097-31c4-77371d000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__node',RowKey='R7')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:16 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.8639247Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__node',RowKey='R7')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'b7ef05b4-5002-0006-12ee-77a3ac000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P7__node',RowKey='R7')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:59 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P7__node%27,RowKey=%27R7%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P7__node%27,RowKey=%27R7%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A16.2688055Z'\"",
|
||||
PartitionKey: "P7__node",
|
||||
RowKey: "R7",
|
||||
Timestamp: "2020-08-21T14:06:16.2688055Z",
|
||||
"testField@odata.type": "Edm.DateTime",
|
||||
testField: "2020-09-17T00:00:00Z"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A16.2688055Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"c4dfd524-5002-0042-22c4-777fc0000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A59.8639247Z'\"","PartitionKey":"P7__node","RowKey":"R7","Timestamp":"2020-08-21T19:09:59.8639247Z","testField@odata.type":"Edm.DateTime","testField":"2020-09-17T00:00:00Z"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.8639247Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'fe522f11-3002-009e-50ee-772d93000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:59 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,83 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "073a610d0f43809bedd9bc8f45c197c4";
|
||||
module.exports.hash = "2d29e04eda9572ad217a816d4c3349f5";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P3__node",
|
||||
RowKey: "R3",
|
||||
testField: "cf8ef051-1b7d-4e93-a1e5-a3944d7e441c",
|
||||
"testField@odata.type": "Edm.Guid"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P3__node","RowKey":"R3","testField":"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c","testField@odata.type":"Edm.Guid"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.3981185Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__node',RowKey='R3')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"35d7d3bf-6002-0128-07c4-77653e000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__node',RowKey='R3')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.9895166Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__node',RowKey='R3')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'af502a38-3002-0095-03ee-7735e7000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P3__node',RowKey='R3')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P3__node%27,RowKey=%27R3%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P3__node%27,RowKey=%27R3%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A15.3981185Z'\"",
|
||||
PartitionKey: "P3__node",
|
||||
RowKey: "R3",
|
||||
Timestamp: "2020-08-21T14:06:15.3981185Z",
|
||||
"testField@odata.type": "Edm.Guid",
|
||||
testField: "cf8ef051-1b7d-4e93-a1e5-a3944d7e441c"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.3981185Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"4a72c66e-1002-010e-7fc4-77fe8a000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A58.9895166Z'\"","PartitionKey":"P3__node","RowKey":"R3","Timestamp":"2020-08-21T19:09:58.9895166Z","testField@odata.type":"Edm.Guid","testField":"cf8ef051-1b7d-4e93-a1e5-a3944d7e441c"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.9895166Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'cc3862f3-0002-0051-54ee-774a21000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,82 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "e7d8cc9c5e153fa623cb4c39c72283bd";
|
||||
module.exports.hash = "6fd9c6cc5f35aa6d79bc6c7e49850a95";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P5__node",
|
||||
RowKey: "R5",
|
||||
testField: 123,
|
||||
"testField@odata.type": "Edm.Int32"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P5__node","RowKey":"R5","testField":123,"testField@odata.type":"Edm.Int32"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.8425368Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__node',RowKey='R5')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"1e6b6f98-5002-000d-78c4-77bbd8000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__node',RowKey='R5')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.4353765Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__node',RowKey='R5')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'd468ecf4-9002-00b1-35ee-77aca9000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P5__node',RowKey='R5')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P5__node%27,RowKey=%27R5%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P5__node%27,RowKey=%27R5%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A15.8425368Z'\"",
|
||||
PartitionKey: "P5__node",
|
||||
RowKey: "R5",
|
||||
Timestamp: "2020-08-21T14:06:15.8425368Z",
|
||||
testField: 123
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.8425368Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"dd640fe3-f002-0044-4fc4-7788b8000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A59.4353765Z'\"","PartitionKey":"P5__node","RowKey":"R5","Timestamp":"2020-08-21T19:09:59.4353765Z","testField":123}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.4353765Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'd4ae72a6-1002-000a-7cee-774d5d000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,83 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "dba70ec24c6eb4f4a56b89d2edfd3b2b";
|
||||
module.exports.hash = "759d8857dda4f8a33fa177b82a42a168";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", {
|
||||
PartitionKey: "P4__node",
|
||||
RowKey: "R4",
|
||||
testField: "12345543221",
|
||||
"testField@odata.type": "Edm.Int64"
|
||||
})
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P4__node","RowKey":"R4","testField":"12345543221","testField@odata.type":"Edm.Int64"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.6249296Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__node',RowKey='R4')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"615b140f-f002-00cc-09c4-773061000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__node',RowKey='R4')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.2165302Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__node',RowKey='R4')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'28a85677-c002-0021-62ee-7739e5000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P4__node',RowKey='R4')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P4__node%27,RowKey=%27R4%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P4__node%27,RowKey=%27R4%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A15.6249296Z'\"",
|
||||
PartitionKey: "P4__node",
|
||||
RowKey: "R4",
|
||||
Timestamp: "2020-08-21T14:06:15.6249296Z",
|
||||
"testField@odata.type": "Edm.Int64",
|
||||
testField: "12345543221"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A15.6249296Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"fc5d3d84-d002-00db-79c4-77f002000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A59.2165302Z'\"","PartitionKey":"P4__node","RowKey":"R4","Timestamp":"2020-08-21T19:09:59.2165302Z","testField@odata.type":"Edm.Int64","testField":"12345543221"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A59.2165302Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'a35c1d0c-7002-0055-27ee-77bfa3000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
|
@ -1,77 +1,65 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "8a51f1e88d5b42179b72fb6c8fb7c89d";
|
||||
module.exports.hash = "b85bb4a971181145a21f5470751351dc";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/integration", { PartitionKey: "P2__node", RowKey: "R1", testField: "testEntity" })
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/integration', {"PartitionKey":"P2__node","RowKey":"R1","testField":"testEntity"})
|
||||
.query(true)
|
||||
.reply(204, "", [
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Content-Length",
|
||||
"0",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A14.9250377Z'"`,
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R1')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"ae5f2a61-a002-003a-65c4-771777000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-no-content",
|
||||
"DataServiceId",
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R1')",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:14 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]);
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'0',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.5388078Z'"`,
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R1')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'121ef337-1002-0028-17ee-77236b000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-no-content',
|
||||
'DataServiceId',
|
||||
"https://joherediteststorage.table.core.windows.net/integration(PartitionKey='P2__node',RowKey='R1')",
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/integration(PartitionKey=%27P2__node%27,RowKey=%27R1%27)")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/integration(PartitionKey=%27P2__node%27,RowKey=%27R1%27)')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element",
|
||||
"odata.etag": "W/\"datetime'2020-08-21T14%3A06%3A14.9250377Z'\"",
|
||||
PartitionKey: "P2__node",
|
||||
RowKey: "R1",
|
||||
Timestamp: "2020-08-21T14:06:14.9250377Z",
|
||||
testField: "testEntity"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"ETag",
|
||||
`W/"datetime'2020-08-21T14%3A06%3A14.9250377Z'"`,
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"58fc4e74-b002-000c-4fc4-77ba25000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:14 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#integration/@Element","odata.etag":"W/\"datetime'2020-08-21T19%3A09%3A58.5388078Z'\"","PartitionKey":"P2__node","RowKey":"R1","Timestamp":"2020-08-21T19:09:58.5388078Z","testField":"testEntity"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'ETag',
|
||||
`W/"datetime'2020-08-21T19%3A09%3A58.5388078Z'"`,
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'baacf9f8-9002-0098-64ee-77daeb000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,ETag,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:09:58 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
225
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_all.js
сгенерированный
Normal file
225
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_all.js
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
33
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_binary_with_filter.js
сгенерированный
Normal file
33
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_binary_with_filter.js
сгенерированный
Normal file
|
@ -0,0 +1,33 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "18c92de12a606119d96df081613060c8";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/list()')
|
||||
.query(true)
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#list","value":[{"odata.etag":"W/\"datetime'2020-08-21T15%3A26%3A38.9424197Z'\"","PartitionKey":"LIST_1","RowKey":"binary1","Timestamp":"2020-08-21T15:26:38.9424197Z","foo@odata.type":"Edm.Binary","foo":"QmFy"}]}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'b4913c38-9002-00d7-2da0-7c1ef3000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Thu, 27 Aug 2020 18:30:36 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
449
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_by_page.js
сгенерированный
Normal file
449
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_by_page.js
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
33
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_with_filter.js
сгенерированный
Normal file
33
sdk/tables/data-tables/recordings/node/tableclient_listentities/recording_should_list_with_filter.js
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,81 +1,61 @@
|
|||
let nock = require("nock");
|
||||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "d6b7fc64e253cada2c9c4dcb1176555e";
|
||||
|
||||
module.exports.testInfo = { uniqueName: {}, newDate: {} };
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.post("/Tables", { TableName: "testTablenode" })
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.post('/Tables', {"TableName":"testTablenode"})
|
||||
.query(true)
|
||||
.reply(
|
||||
201,
|
||||
{
|
||||
"odata.metadata":
|
||||
"https://joherediteststorage.table.core.windows.net/$metadata#Tables/@Element",
|
||||
TableName: "testTablenode"
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"Location",
|
||||
"https://joherediteststorage.table.core.windows.net/Tables('testTablenode')",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"2dd4759e-e002-0014-0bc4-7797b0000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Preference-Applied",
|
||||
"return-content",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:16 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(201, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#Tables/@Element","TableName":"testTablenode"}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'Location',
|
||||
"https://joherediteststorage.table.core.windows.net/Tables('testTablenode')",
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'85486b93-9002-007d-03ee-77c81c000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Preference-Applied',
|
||||
'return-content',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:10:05 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
||||
nock("https://joherediteststorage.table.core.windows.net:443", { encodedQueryParams: true })
|
||||
.get("/Tables")
|
||||
nock('https://joherediteststorage.table.core.windows.net:443', {"encodedQueryParams":true})
|
||||
.get('/Tables')
|
||||
.query(true)
|
||||
.reply(
|
||||
200,
|
||||
{
|
||||
"odata.metadata": "https://joherediteststorage.table.core.windows.net/$metadata#Tables",
|
||||
value: [
|
||||
{ TableName: "integration" },
|
||||
{ TableName: "test1" },
|
||||
{ TableName: "TestTable" },
|
||||
{ TableName: "testTablenode" }
|
||||
]
|
||||
},
|
||||
[
|
||||
"Cache-Control",
|
||||
"no-cache",
|
||||
"Transfer-Encoding",
|
||||
"chunked",
|
||||
"Content-Type",
|
||||
"application/json;odata=minimalmetadata;streaming=true;charset=utf-8",
|
||||
"Server",
|
||||
"Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0",
|
||||
"x-ms-request-id",
|
||||
"0f1824dc-9002-005f-44c4-77a62a000000",
|
||||
"x-ms-version",
|
||||
"2019-02-02",
|
||||
"X-Content-Type-Options",
|
||||
"nosniff",
|
||||
"Access-Control-Expose-Headers",
|
||||
"x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,Content-Type,Content-Length,Date,Transfer-Encoding",
|
||||
"Access-Control-Allow-Origin",
|
||||
"*",
|
||||
"Date",
|
||||
"Fri, 21 Aug 2020 14:06:15 GMT",
|
||||
"Connection",
|
||||
"close"
|
||||
]
|
||||
);
|
||||
.reply(200, {"odata.metadata":"https://joherediteststorage.table.core.windows.net/$metadata#Tables","value":[{"TableName":"integration"},{"TableName":"list"},{"TableName":"test1"},{"TableName":"TestTable"},{"TableName":"testTablenode"}]}, [
|
||||
'Cache-Control',
|
||||
'no-cache',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Content-Type',
|
||||
'application/json;odata=minimalmetadata;streaming=true;charset=utf-8',
|
||||
'Server',
|
||||
'Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0',
|
||||
'x-ms-request-id',
|
||||
'fac12632-1002-0089-05ee-77edf0000000',
|
||||
'x-ms-version',
|
||||
'2019-02-02',
|
||||
'X-Content-Type-Options',
|
||||
'nosniff',
|
||||
'Access-Control-Expose-Headers',
|
||||
'x-ms-request-id,Server,x-ms-version,X-Content-Type-Options,Cache-Control,Content-Type,Content-Length,Date,Transfer-Encoding',
|
||||
'Access-Control-Allow-Origin',
|
||||
'*',
|
||||
'Date',
|
||||
'Fri, 21 Aug 2020 19:10:05 GMT',
|
||||
'Connection',
|
||||
'close'
|
||||
]);
|
||||
|
|
123
sdk/tables/data-tables/recordings/node/tableserviceclient_listtables/recording_should_list_all.js
сгенерированный
Normal file
123
sdk/tables/data-tables/recordings/node/tableserviceclient_listtables/recording_should_list_all.js
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
243
sdk/tables/data-tables/recordings/node/tableserviceclient_listtables/recording_should_list_by_page.js
сгенерированный
Normal file
243
sdk/tables/data-tables/recordings/node/tableserviceclient_listtables/recording_should_list_by_page.js
сгенерированный
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -9,9 +9,10 @@ import * as coreHttp from '@azure/core-http';
|
|||
import { HttpOperationResponse } from '@azure/core-http';
|
||||
import { HttpResponse } from '@azure/core-http';
|
||||
import { OperationOptions } from '@azure/core-http';
|
||||
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
||||
import { RequestPolicy } from '@azure/core-http';
|
||||
import { RequestPolicyFactory } from '@azure/core-http';
|
||||
import { RequestPolicyOptions } from '@azure/core-http';
|
||||
import { RequestPolicyOptionsLike } from '@azure/core-http';
|
||||
import { WebResource } from '@azure/core-http';
|
||||
|
||||
// @public
|
||||
|
@ -174,7 +175,7 @@ export type GetTableEntityResponse<T extends object> = TableEntity<T> & {
|
|||
// @public
|
||||
export type ListEntitiesResponse<T extends object> = Array<TableEntity<T>> & {
|
||||
nextPartitionKey?: string;
|
||||
nextextRowKey?: string;
|
||||
nextRowKey?: string;
|
||||
_response: HttpResponse & {
|
||||
bodyAsText: string;
|
||||
parsedBody: {
|
||||
|
@ -196,25 +197,15 @@ export interface ListTableEntitiesOptions {
|
|||
}
|
||||
|
||||
// @public
|
||||
export type ListTableItemsResponse = Array<TableResponseProperties> & {
|
||||
export interface ListTableItemsOptions {
|
||||
nextTableName?: string;
|
||||
_response: HttpResponse & {
|
||||
bodyAsText: string;
|
||||
parsedBody: TableQueryResponse;
|
||||
parsedHeaders: TableQueryHeaders;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ListTablesOptions {
|
||||
nextTableName?: string;
|
||||
queryOptions?: TableQueryOptions;
|
||||
requestId?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ListTablesResponse = TableQueryHeaders & TableQueryResponse & {
|
||||
_response: coreHttp.HttpResponse & {
|
||||
export type ListTableItemsResponse = Array<TableResponseProperties> & {
|
||||
nextTableName?: string;
|
||||
_response: HttpResponse & {
|
||||
bodyAsText: string;
|
||||
parsedBody: TableQueryResponse;
|
||||
parsedHeaders: TableQueryHeaders;
|
||||
|
@ -314,14 +305,13 @@ export interface SignedIdentifier {
|
|||
export class TableClient {
|
||||
constructor(url: string, tableName: string, credential: TablesSharedKeyCredential, options?: TableServiceClientOptions);
|
||||
constructor(url: string, tableName: string, options?: TableServiceClientOptions);
|
||||
create(options?: CreateTableOptions): Promise<CreateTableItemResponse>;
|
||||
createEntity<T extends object>(entity: TableEntity<T>, options?: CreateTableEntityOptions): Promise<CreateTableEntityResponse>;
|
||||
delete(options?: DeleteTableOptions): Promise<DeleteTableResponse>;
|
||||
deleteEntity(partitionKey: string, rowKey: string, options?: DeleteTableEntityOptions): Promise<DeleteTableEntityResponse>;
|
||||
static fromConnectionString(connectionString: string, tableName: string, options?: TableServiceClientOptions): TableClient;
|
||||
getAccessPolicy(options?: GetAccessPolicyOptions): Promise<GetAccessPolicyResponse>;
|
||||
getEntity<T extends object>(partitionKey: string, rowKey: string, options?: GetTableEntityOptions): Promise<GetTableEntityResponse<T>>;
|
||||
listEntities<T extends object>(options?: ListTableEntitiesOptions): Promise<ListEntitiesResponse<T>>;
|
||||
setAccessPolicy(options?: SetAccessPolicyOptions): Promise<SetAccessPolicyResponse>;
|
||||
listEntities<T extends object>(options?: ListTableEntitiesOptions): PagedAsyncIterableIterator<T, ListEntitiesResponse<T>>;
|
||||
readonly tableName: string;
|
||||
updateEntity<T extends object>(entity: TableEntity<T>, mode: UpdateMode, options?: UpdateTableEntityOptions): Promise<UpdateEntityResponse>;
|
||||
upsertEntity<T extends object>(entity: TableEntity<T>, mode: UpdateMode, options?: UpsertTableEntityOptions): Promise<UpsertEntityResponse>;
|
||||
|
@ -371,7 +361,6 @@ export type TableEntity<T extends object> = T & {
|
|||
export interface TableEntityQueryOptions {
|
||||
filter?: string;
|
||||
select?: string[];
|
||||
top?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -467,7 +456,6 @@ export interface TableQueryHeaders {
|
|||
// @public
|
||||
export interface TableQueryOptions {
|
||||
filter?: string;
|
||||
top?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -493,22 +481,16 @@ export interface TableResponseProperties {
|
|||
export class TableServiceClient {
|
||||
constructor(url: string, credential: TablesSharedKeyCredential, options?: TableServiceClientOptions);
|
||||
constructor(url: string, options?: TableServiceClientOptions);
|
||||
createEntity<T extends object>(tableName: string, entity: TableEntity<T>, options?: CreateTableEntityOptions): Promise<CreateTableEntityResponse>;
|
||||
createTable(tableName: string, options?: CreateTableOptions): Promise<CreateTableItemResponse>;
|
||||
deleteEntity(tableName: string, partitionKey: string, rowKey: string, options?: DeleteTableEntityOptions): Promise<DeleteTableEntityResponse>;
|
||||
deleteTable(tableName: string, options?: DeleteTableOptions): Promise<DeleteTableResponse>;
|
||||
static fromConnectionString(connectionString: string, options?: TableServiceClientOptions): TableServiceClient;
|
||||
getAccessPolicy(tableName: string, options?: GetAccessPolicyOptions): Promise<GetAccessPolicyResponse>;
|
||||
getEntity<T extends object>(tableName: string, partitionKey: string, rowKey: string, options?: GetTableEntityOptions): Promise<GetTableEntityResponse<T>>;
|
||||
getProperties(options?: GetPropertiesOptions): Promise<GetPropertiesResponse>;
|
||||
getStatistics(options?: GetStatisticsOptions): Promise<GetStatisticsResponse>;
|
||||
listEntities<T extends object>(tableName: string, options?: ListTableEntitiesOptions): Promise<ListEntitiesResponse<T>>;
|
||||
listTables(options?: ListTablesOptions): Promise<ListTableItemsResponse>;
|
||||
listTables(options?: ListTableItemsOptions): PagedAsyncIterableIterator<TableResponseProperties, ListTableItemsResponse>;
|
||||
setAccessPolicy(tableName: string, options?: SetAccessPolicyOptions): Promise<SetAccessPolicyResponse>;
|
||||
setProperties(properties: ServiceProperties, options?: SetPropertiesOptions): Promise<SetPropertiesResponse>;
|
||||
updateEntity<T extends object>(tableName: string, entity: TableEntity<T>, mode: UpdateMode, options?: UpdateTableEntityOptions): Promise<UpdateEntityResponse>;
|
||||
upsertEntity<T extends object>(tableName: string, entity: TableEntity<T>, mode: UpdateMode, options?: UpsertTableEntityOptions): Promise<UpsertEntityResponse>;
|
||||
}
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface TableServiceClientOptions extends coreHttp.ServiceClientOptions {
|
||||
|
@ -534,12 +516,12 @@ export class TablesSharedKeyCredential implements RequestPolicyFactory {
|
|||
constructor(accountName: string, accountKey: string);
|
||||
readonly accountName: string;
|
||||
computeHMACSHA256(stringToSign: string): string;
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): TablesSharedKeyCredentialPolicy;
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): TablesSharedKeyCredentialPolicy;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class TablesSharedKeyCredentialPolicy extends BaseRequestPolicy {
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, factory: TablesSharedKeyCredential);
|
||||
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, factory: TablesSharedKeyCredential);
|
||||
sendRequest(request: WebResource): Promise<HttpOperationResponse>;
|
||||
protected signRequest(request: WebResource): WebResource;
|
||||
}
|
||||
|
|
|
@ -169,8 +169,15 @@ export function browserTestConfig(testMode) {
|
|||
baseConfig.input = input;
|
||||
baseConfig.plugins.unshift(multiEntry({ exports: false }));
|
||||
baseConfig.output.file = `dist-test/${testMode}.index.browser.js`;
|
||||
|
||||
// mark fs-extra as external
|
||||
baseConfig.external = ["fs-extra"];
|
||||
baseConfig.external = ["fs-extra", "process"];
|
||||
|
||||
baseConfig.output.globals = {
|
||||
...baseConfig.output.globals,
|
||||
"fs-extra": "fs",
|
||||
process: "process"
|
||||
};
|
||||
|
||||
baseConfig.context = "null";
|
||||
|
||||
|
|
|
@ -13,17 +13,23 @@ const connectionString = process.env["ACCOUNT_CONNECTION_STRING"] || "";
|
|||
async function listTables() {
|
||||
const client = TableServiceClient.fromConnectionString(connectionString);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
console.log(tables.value);
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
const client = TableClient.fromConnectionString(connectionString, "test1");
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
console.log(entities.value);
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
|
@ -14,9 +14,12 @@ async function listTables() {
|
|||
const accountUrl = `https://${accountName}.table.core.windows.net${accountSas}`;
|
||||
const client = new TableServiceClient(accountUrl);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
console.log(tables.value);
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
|
@ -24,9 +27,12 @@ async function listEntities() {
|
|||
const tableName = "test1";
|
||||
const client = new TableClient(accountUrl, tableName);
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
console.log(entities.value);
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
|
@ -19,9 +19,12 @@ async function listTables() {
|
|||
const credential = new TablesSharedKeyCredential(accountName, accountKey);
|
||||
const client = new TableServiceClient(accountUrl, credential);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
console.log(tables.value);
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
|
@ -29,9 +32,12 @@ async function listEntities() {
|
|||
const credential = new TablesSharedKeyCredential(accountName, accountKey);
|
||||
const client = new TableClient(accountUrl, tableName, credential);
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
console.log(entities.value);
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
|
@ -12,20 +12,22 @@ const connectionString = process.env["ACCOUNT_CONNECTION_STRING"] || "";
|
|||
async function listTables() {
|
||||
const client = TableServiceClient.fromConnectionString(connectionString);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
for (let table of tables) {
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
const client = TableClient.fromConnectionString(connectionString, "test1");
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
for (let entity of entities) {
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,9 +14,12 @@ async function listTables() {
|
|||
const accountUrl = `https://${accountName}.table.core.windows.net${accountSas}`;
|
||||
const client = new TableServiceClient(accountUrl);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
console.log(tables.value);
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
|
@ -24,9 +27,12 @@ async function listEntities() {
|
|||
const tableName = "test1";
|
||||
const client = new TableClient(accountUrl, tableName);
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
console.log(entities.value);
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
|
@ -15,9 +15,12 @@ async function listTables() {
|
|||
const credential = new TablesSharedKeyCredential(accountName, accountKey);
|
||||
const client = new TableServiceClient(accountUrl, credential);
|
||||
|
||||
const tables = await client.listTables();
|
||||
const tables = client.listTables();
|
||||
|
||||
console.log(tables.value);
|
||||
for await (let table of tables) {
|
||||
console.log(table);
|
||||
// {TableName: "TestTable"}
|
||||
}
|
||||
}
|
||||
|
||||
async function listEntities() {
|
||||
|
@ -25,9 +28,12 @@ async function listEntities() {
|
|||
const credential = new TablesSharedKeyCredential(accountName, accountKey);
|
||||
const client = new TableClient(accountUrl, tableName, credential);
|
||||
|
||||
const entities = await client.listEntities();
|
||||
const entities = client.listEntities();
|
||||
|
||||
console.log(entities.value);
|
||||
for await (const entity of entities) {
|
||||
console.log(entity);
|
||||
// {PartitionKey: "P1", RowKey: "R1", foo: "Bar"}
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { TableServiceClient } from "./TableServiceClient";
|
||||
import {
|
||||
TableEntity,
|
||||
ListTableEntitiesOptions,
|
||||
|
@ -13,7 +12,10 @@ import {
|
|||
DeleteTableEntityOptions,
|
||||
GetTableEntityOptions,
|
||||
UpdateMode,
|
||||
CreateTableEntityResponse
|
||||
CreateTableEntityResponse,
|
||||
TableEntityQueryOptions,
|
||||
CreateTableOptions,
|
||||
CreateTableItemResponse
|
||||
} from "./models";
|
||||
import {
|
||||
TableServiceClientOptions as TableClientOptions,
|
||||
|
@ -21,21 +23,22 @@ import {
|
|||
DeleteTableResponse,
|
||||
UpdateEntityResponse,
|
||||
UpsertEntityResponse,
|
||||
GetAccessPolicyOptions,
|
||||
GetAccessPolicyResponse,
|
||||
SetAccessPolicyResponse,
|
||||
SetAccessPolicyOptions,
|
||||
DeleteTableEntityResponse
|
||||
} from "./generatedModels";
|
||||
import { QueryOptions as GeneratedQueryOptions } from "./generated/models";
|
||||
import { getClientParamsFromConnectionString } from "./utils/connectionString";
|
||||
import { TablesSharedKeyCredential } from "./TablesSharedKeyCredential";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { GeneratedClient, TableDeleteEntityOptionalParams } from "./generated";
|
||||
import { deserialize, deserializeObjectsArray, serialize } from "./serialization";
|
||||
import { Table } from "./generated/operations";
|
||||
|
||||
/**
|
||||
* A TableClient represents a Client to the Azure Tables service allowing you
|
||||
* to perform operations on a single table.
|
||||
*/
|
||||
export class TableClient {
|
||||
private client: TableServiceClient;
|
||||
private table: Table;
|
||||
/**
|
||||
* Name of the table to perform operations on.
|
||||
*/
|
||||
|
@ -103,12 +106,23 @@ export class TableClient {
|
|||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: TableClientOptions
|
||||
) {
|
||||
if (credentialOrOptions instanceof TablesSharedKeyCredential) {
|
||||
this.client = new TableServiceClient(url, credentialOrOptions, options);
|
||||
} else {
|
||||
this.client = new TableServiceClient(url, credentialOrOptions);
|
||||
const credential =
|
||||
credentialOrOptions instanceof TablesSharedKeyCredential ? credentialOrOptions : undefined;
|
||||
const clientOptions =
|
||||
(!(credentialOrOptions instanceof TablesSharedKeyCredential)
|
||||
? credentialOrOptions
|
||||
: options) || {};
|
||||
|
||||
if (credential) {
|
||||
clientOptions.requestPolicyFactories = (defaultFactories) => [
|
||||
...defaultFactories,
|
||||
credential
|
||||
];
|
||||
}
|
||||
|
||||
this.tableName = tableName;
|
||||
const { table } = new GeneratedClient(url, clientOptions);
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,8 +130,17 @@ export class TableClient {
|
|||
* @param options The options parameters.
|
||||
*/
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
delete(options?: DeleteTableOptions): Promise<DeleteTableResponse> {
|
||||
return this.client.deleteTable(this.tableName, options);
|
||||
public delete(options?: DeleteTableOptions): Promise<DeleteTableResponse> {
|
||||
return this.table.delete(this.tableName, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the current table it it doesn't exist
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
public create(options?: CreateTableOptions): Promise<CreateTableItemResponse> {
|
||||
return this.table.create({ tableName: this.tableName }, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,23 +149,120 @@ export class TableClient {
|
|||
* @param rowKey The row key of the entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public getEntity<T extends object>(
|
||||
public async getEntity<T extends object>(
|
||||
partitionKey: string,
|
||||
rowKey: string,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: GetTableEntityOptions
|
||||
): Promise<GetTableEntityResponse<T>> {
|
||||
return this.client.getEntity<T>(this.tableName, partitionKey, rowKey, options);
|
||||
const { queryOptions, ...getEntityOptions } = options || {};
|
||||
const { _response } = await this.table.queryEntitiesWithPartitionAndRowKey(
|
||||
this.tableName,
|
||||
partitionKey,
|
||||
rowKey,
|
||||
{ ...getEntityOptions, queryOptions: this.convertQueryOptions(queryOptions || {}) }
|
||||
);
|
||||
const tableEntity = deserialize<TableEntity<T>>(_response.parsedBody);
|
||||
|
||||
return Object.defineProperty({ ...tableEntity }, "_response", {
|
||||
enumerable: false,
|
||||
value: _response
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries entities in the table.
|
||||
* @param query The OData query parameters.
|
||||
* Queries entities in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listEntities<T extends object>(
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: ListTableEntitiesOptions
|
||||
): PagedAsyncIterableIterator<T, ListEntitiesResponse<T>> {
|
||||
const tableName = this.tableName;
|
||||
const iter = this.listEntitiesAll<T>(tableName, options);
|
||||
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings) => {
|
||||
const pageOptions = {
|
||||
...options,
|
||||
queryOptions: { ...options?.queryOptions, top: settings?.maxPageSize }
|
||||
};
|
||||
return this.listEntitiesPage(tableName, pageOptions);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listEntitiesAll<T extends object>(
|
||||
tableName: string,
|
||||
options?: ListTableEntitiesOptions
|
||||
): AsyncIterableIterator<T> {
|
||||
const firstPage = await this._listEntities<T>(tableName, options);
|
||||
const { nextPartitionKey, nextRowKey } = firstPage;
|
||||
yield* firstPage;
|
||||
if (nextRowKey && nextPartitionKey) {
|
||||
const optionsWithContinuation: ListTableEntitiesOptions = {
|
||||
...options,
|
||||
nextPartitionKey,
|
||||
nextRowKey
|
||||
};
|
||||
for await (const page of this.listEntitiesPage<T>(tableName, optionsWithContinuation)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async *listEntitiesPage<T extends object>(
|
||||
tableName: string,
|
||||
options?: InternalListTableEntitiesOptions
|
||||
): AsyncIterableIterator<ListEntitiesResponse<T>> {
|
||||
let result = await this._listEntities<T>(tableName, options);
|
||||
|
||||
yield result;
|
||||
|
||||
while (result.nextPartitionKey && result.nextRowKey) {
|
||||
const optionsWithContinuation: ListTableEntitiesOptions = {
|
||||
...options,
|
||||
nextPartitionKey: result.nextPartitionKey,
|
||||
nextRowKey: result.nextRowKey
|
||||
};
|
||||
result = await this._listEntities(tableName, optionsWithContinuation);
|
||||
yield result;
|
||||
}
|
||||
}
|
||||
|
||||
private async _listEntities<T extends object>(
|
||||
tableName: string,
|
||||
options?: ListTableEntitiesOptions
|
||||
): Promise<ListEntitiesResponse<T>> {
|
||||
return this.client.listEntities<T>(this.tableName, options);
|
||||
const queryOptions = this.convertQueryOptions(options?.queryOptions || {});
|
||||
const {
|
||||
xMsContinuationNextPartitionKey: nextPartitionKey,
|
||||
xMsContinuationNextRowKey: nextRowKey,
|
||||
value,
|
||||
_response
|
||||
} = await this.table.queryEntities(tableName, {
|
||||
...options,
|
||||
queryOptions
|
||||
});
|
||||
|
||||
const tableEntities = deserializeObjectsArray<TableEntity<T>>(value || []);
|
||||
|
||||
const resultArray = Object.assign([...tableEntities], {
|
||||
nextPartitionKey,
|
||||
nextRowKey
|
||||
});
|
||||
|
||||
return Object.defineProperty(resultArray, "_response", {
|
||||
enumerable: false,
|
||||
value: _response
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,9 +272,16 @@ export class TableClient {
|
|||
*/
|
||||
public createEntity<T extends object>(
|
||||
entity: TableEntity<T>,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: CreateTableEntityOptions
|
||||
): Promise<CreateTableEntityResponse> {
|
||||
return this.client.createEntity(this.tableName, entity, options);
|
||||
const { queryOptions, ...createTableEntity } = options || {};
|
||||
return this.table.insertEntity(this.tableName, {
|
||||
...createTableEntity,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
tableEntityProperties: serialize(entity),
|
||||
responsePreference: "return-no-content"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,9 +293,15 @@ export class TableClient {
|
|||
public deleteEntity(
|
||||
partitionKey: string,
|
||||
rowKey: string,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: DeleteTableEntityOptions
|
||||
): Promise<DeleteTableEntityResponse> {
|
||||
return this.client.deleteEntity(this.tableName, partitionKey, rowKey, options);
|
||||
const { etag = "*", queryOptions, ...rest } = options || {};
|
||||
const deleteOptions: TableDeleteEntityOptionalParams = {
|
||||
...rest,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {})
|
||||
};
|
||||
return this.table.deleteEntity(this.tableName, partitionKey, rowKey, etag, deleteOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,9 +315,30 @@ export class TableClient {
|
|||
public updateEntity<T extends object>(
|
||||
entity: TableEntity<T>,
|
||||
mode: UpdateMode,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: UpdateTableEntityOptions
|
||||
): Promise<UpdateEntityResponse> {
|
||||
return this.client.updateEntity(this.tableName, entity, mode, options);
|
||||
if (!entity.PartitionKey || !entity.RowKey) {
|
||||
throw new Error("PartitionKey and RowKey must be defined");
|
||||
}
|
||||
|
||||
const { etag = "*", ...updateOptions } = options || {};
|
||||
if (mode === "Merge") {
|
||||
return this.table.mergeEntity(this.tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: serialize(entity),
|
||||
ifMatch: etag,
|
||||
...updateOptions
|
||||
});
|
||||
}
|
||||
if (mode === "Replace") {
|
||||
return this.table.updateEntity(this.tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: serialize(entity),
|
||||
ifMatch: etag,
|
||||
...updateOptions
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error(`Unexpected value for update mode: ${mode}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -199,27 +353,41 @@ export class TableClient {
|
|||
public upsertEntity<T extends object>(
|
||||
entity: TableEntity<T>,
|
||||
mode: UpdateMode,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: UpsertTableEntityOptions
|
||||
): Promise<UpsertEntityResponse> {
|
||||
return this.client.upsertEntity(this.tableName, entity, mode, options);
|
||||
if (!entity.PartitionKey || !entity.RowKey) {
|
||||
throw new Error("PartitionKey and RowKey must be defined");
|
||||
}
|
||||
|
||||
const { queryOptions, etag = "*", ...upsertOptions } = options || {};
|
||||
if (mode === "Merge") {
|
||||
return this.table.mergeEntity(this.tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: serialize(entity),
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
...upsertOptions,
|
||||
ifMatch: etag
|
||||
});
|
||||
}
|
||||
|
||||
if (mode === "Replace") {
|
||||
return this.table.updateEntity(this.tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: serialize(entity),
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
...upsertOptions,
|
||||
ifMatch: etag
|
||||
});
|
||||
}
|
||||
throw new Error(`Unexpected value for update mode: ${mode}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves details about any stored access policies specified on the table that may be used with
|
||||
* Shared Access Signatures.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public getAccessPolicy(options?: GetAccessPolicyOptions): Promise<GetAccessPolicyResponse> {
|
||||
return this.client.getAccessPolicy(this.tableName, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stored access policies for the table that may be used with Shared Access Signatures.
|
||||
* @param acl The Access Control List for the table.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public setAccessPolicy(options?: SetAccessPolicyOptions): Promise<SetAccessPolicyResponse> {
|
||||
return this.client.setAccessPolicy(this.tableName, options);
|
||||
private convertQueryOptions(query: TableEntityQueryOptions): GeneratedQueryOptions {
|
||||
const { select, ...queryOptions } = query;
|
||||
const mappedQuery: GeneratedQueryOptions = { ...queryOptions };
|
||||
if (select) {
|
||||
mappedQuery.select = select.join(",");
|
||||
}
|
||||
return mappedQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -248,3 +416,7 @@ export class TableClient {
|
|||
return new TableClient(url, tableName, clientOptions);
|
||||
}
|
||||
}
|
||||
|
||||
type InternalListTableEntitiesOptions = ListTableEntitiesOptions & {
|
||||
queryOptions?: TableEntityQueryOptions & { top?: number };
|
||||
};
|
||||
|
|
|
@ -5,22 +5,11 @@ import { GeneratedClient } from "./generated/generatedClient";
|
|||
import { Service } from "./generated/operations";
|
||||
import { Table } from "./generated/operations";
|
||||
import {
|
||||
TableEntity,
|
||||
ListTablesOptions,
|
||||
ListTableEntitiesOptions,
|
||||
GetTableEntityResponse,
|
||||
ListEntitiesResponse,
|
||||
CreateTableEntityOptions,
|
||||
UpdateTableEntityOptions,
|
||||
UpsertTableEntityOptions,
|
||||
UpdateMode,
|
||||
TableEntityQueryOptions,
|
||||
DeleteTableEntityOptions,
|
||||
ListTableItemsOptions,
|
||||
CreateTableOptions,
|
||||
GetTableEntityOptions,
|
||||
ListTableItemsResponse,
|
||||
CreateTableEntityResponse,
|
||||
CreateTableItemResponse
|
||||
CreateTableItemResponse,
|
||||
TableQueryOptions
|
||||
} from "./models";
|
||||
import {
|
||||
TableServiceClientOptions,
|
||||
|
@ -33,21 +22,15 @@ import {
|
|||
SetPropertiesResponse,
|
||||
DeleteTableOptions,
|
||||
DeleteTableResponse,
|
||||
DeleteTableEntityResponse,
|
||||
UpdateEntityResponse,
|
||||
UpsertEntityResponse,
|
||||
GetAccessPolicyOptions,
|
||||
GetAccessPolicyResponse,
|
||||
SetAccessPolicyResponse,
|
||||
SetAccessPolicyOptions
|
||||
SetAccessPolicyOptions,
|
||||
TableResponseProperties
|
||||
} from "./generatedModels";
|
||||
import {
|
||||
QueryOptions as GeneratedQueryOptions,
|
||||
TableDeleteEntityOptionalParams
|
||||
} from "./generated/models";
|
||||
import { getClientParamsFromConnectionString } from "./utils/connectionString";
|
||||
import { TablesSharedKeyCredential } from "./TablesSharedKeyCredential";
|
||||
import { serialize, deserialize, deserializeObjectsArray } from "./serialization";
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
|
||||
/**
|
||||
* A TableServiceClient represents a Client to the Azure Tables service allowing you
|
||||
|
@ -191,7 +174,64 @@ export class TableServiceClient {
|
|||
* Queries tables under the given account.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public async listTables(options?: ListTablesOptions): Promise<ListTableItemsResponse> {
|
||||
public listTables(
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options?: ListTableItemsOptions
|
||||
): PagedAsyncIterableIterator<TableResponseProperties, ListTableItemsResponse> {
|
||||
const iter = this.listTablesAll(options);
|
||||
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings) => {
|
||||
const pageOptions = {
|
||||
...options,
|
||||
queryOptions: { top: settings?.maxPageSize }
|
||||
};
|
||||
return this.listTablesPage(pageOptions);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listTablesAll(
|
||||
options?: ListTableItemsOptions
|
||||
): AsyncIterableIterator<TableResponseProperties> {
|
||||
const firstPage = await this._listTables(options);
|
||||
const { nextTableName } = firstPage;
|
||||
yield* firstPage;
|
||||
if (nextTableName) {
|
||||
const optionsWithContinuation: ListTableItemsOptions = {
|
||||
...options,
|
||||
nextTableName
|
||||
};
|
||||
for await (const page of this.listTablesPage(optionsWithContinuation)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async *listTablesPage(
|
||||
options?: InternalListTablesOptions
|
||||
): AsyncIterableIterator<ListTableItemsResponse> {
|
||||
let result = await this._listTables(options);
|
||||
|
||||
yield result;
|
||||
|
||||
while (result.nextTableName) {
|
||||
const optionsWithContinuation: ListTableItemsOptions = {
|
||||
...options,
|
||||
nextTableName: result.nextTableName
|
||||
};
|
||||
result = await this._listTables(optionsWithContinuation);
|
||||
yield result;
|
||||
}
|
||||
}
|
||||
|
||||
private async _listTables(options?: InternalListTablesOptions): Promise<ListTableItemsResponse> {
|
||||
const {
|
||||
_response,
|
||||
xMsContinuationNextTableName: nextTableName,
|
||||
|
@ -201,174 +241,6 @@ export class TableServiceClient {
|
|||
return Object.assign([...value], { _response, nextTableName });
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single entity in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param partitionKey The partition key of the entity.
|
||||
* @param rowKey The row key of the entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public async getEntity<T extends object>(
|
||||
tableName: string,
|
||||
partitionKey: string,
|
||||
rowKey: string,
|
||||
options?: GetTableEntityOptions
|
||||
): Promise<GetTableEntityResponse<T>> {
|
||||
const { queryOptions, ...getEntityOptions } = options || {};
|
||||
const { _response } = await this.table.queryEntitiesWithPartitionAndRowKey(
|
||||
tableName,
|
||||
partitionKey,
|
||||
rowKey,
|
||||
{ ...getEntityOptions, queryOptions: this.convertQueryOptions(queryOptions || {}) }
|
||||
);
|
||||
const tableEntity = deserialize<TableEntity<T>>(_response.parsedBody);
|
||||
return { ...tableEntity, _response };
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries entities in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public async listEntities<T extends object>(
|
||||
tableName: string,
|
||||
options?: ListTableEntitiesOptions
|
||||
): Promise<ListEntitiesResponse<T>> {
|
||||
const queryOptions = this.convertQueryOptions(options?.queryOptions || {});
|
||||
const {
|
||||
_response,
|
||||
xMsContinuationNextPartitionKey: nextPartitionKey,
|
||||
xMsContinuationNextRowKey: nextRowKey,
|
||||
value
|
||||
} = await this.table.queryEntities(tableName, {
|
||||
...options,
|
||||
queryOptions
|
||||
});
|
||||
const tableEntities = deserializeObjectsArray<TableEntity<T>>(value || []);
|
||||
return Object.assign([...tableEntities], {
|
||||
_response,
|
||||
nextPartitionKey,
|
||||
nextRowKey
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert entity in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param entity The properties for the table entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public createEntity<T extends object>(
|
||||
tableName: string,
|
||||
entity: TableEntity<T>,
|
||||
options?: CreateTableEntityOptions
|
||||
): Promise<CreateTableEntityResponse> {
|
||||
const { queryOptions, ...createTableEntity } = options || {};
|
||||
return this.table.insertEntity(tableName, {
|
||||
...createTableEntity,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
tableEntityProperties: serialize(entity),
|
||||
responsePreference: "return-no-content"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the specified entity in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param partitionKey The partition key of the entity.
|
||||
* @param rowKey The row key of the entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public deleteEntity(
|
||||
tableName: string,
|
||||
partitionKey: string,
|
||||
rowKey: string,
|
||||
options?: DeleteTableEntityOptions
|
||||
): Promise<DeleteTableEntityResponse> {
|
||||
const { etag = "*", queryOptions, ...rest } = options || {};
|
||||
const deleteOptions: TableDeleteEntityOptionalParams = {
|
||||
...rest,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {})
|
||||
};
|
||||
return this.table.deleteEntity(tableName, partitionKey, rowKey, etag, deleteOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an entity in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param entity The properties of the entity to be updated.
|
||||
* @param mode The different modes for updating the entity:
|
||||
* - Merge: Updates an entity by updating the entity's properties without replacing the existing entity.
|
||||
* - Replace: Updates an existing entity by replacing the entire entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public updateEntity<T extends object>(
|
||||
tableName: string,
|
||||
entity: TableEntity<T>,
|
||||
mode: UpdateMode,
|
||||
options?: UpdateTableEntityOptions
|
||||
): Promise<UpdateEntityResponse> {
|
||||
if (!entity.PartitionKey || !entity.RowKey) {
|
||||
throw new Error("PartitionKey and RowKey must be defined");
|
||||
}
|
||||
|
||||
const { etag = "*", ...updateOptions } = options || {};
|
||||
if (mode === "Merge") {
|
||||
return this.table.mergeEntity(tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: entity,
|
||||
ifMatch: etag,
|
||||
...updateOptions
|
||||
});
|
||||
}
|
||||
if (mode === "Replace") {
|
||||
return this.table.updateEntity(tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: entity,
|
||||
ifMatch: etag,
|
||||
...updateOptions
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error(`Unexpected value for update mode: ${mode}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upsert an entity in a table.
|
||||
* @param tableName The name of the table.
|
||||
* @param entity The properties for the table entity.
|
||||
* @param mode The different modes for updating the entity:
|
||||
* - Merge: Updates an entity by updating the entity's properties without replacing the existing entity.
|
||||
* - Replace: Updates an existing entity by replacing the entire entity.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public upsertEntity<T extends object>(
|
||||
tableName: string,
|
||||
entity: TableEntity<T>,
|
||||
mode: UpdateMode,
|
||||
options?: UpsertTableEntityOptions
|
||||
): Promise<UpsertEntityResponse> {
|
||||
if (!entity.PartitionKey || !entity.RowKey) {
|
||||
throw new Error("PartitionKey and RowKey must be defined");
|
||||
}
|
||||
|
||||
const { queryOptions, etag = "*", ...upsertOptions } = options || {};
|
||||
if (mode === "Merge") {
|
||||
return this.table.mergeEntity(tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: entity,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
...upsertOptions
|
||||
});
|
||||
}
|
||||
|
||||
if (mode === "Replace") {
|
||||
return this.table.updateEntity(tableName, entity.PartitionKey, entity.RowKey, {
|
||||
tableEntityProperties: entity,
|
||||
queryOptions: this.convertQueryOptions(queryOptions || {}),
|
||||
...upsertOptions
|
||||
});
|
||||
}
|
||||
throw new Error(`Unexpected value for update mode: ${mode}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves details about any stored access policies specified on the table that may be used with
|
||||
* Shared Access Signatures.
|
||||
|
@ -395,15 +267,6 @@ export class TableServiceClient {
|
|||
return this.table.setAccessPolicy(tableName, options);
|
||||
}
|
||||
|
||||
private convertQueryOptions(query: TableEntityQueryOptions): GeneratedQueryOptions {
|
||||
const { select, ...queryOptions } = query;
|
||||
const mappedQuery: GeneratedQueryOptions = { ...queryOptions };
|
||||
if (select) {
|
||||
mappedQuery.select = select.join(",");
|
||||
}
|
||||
return mappedQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates an instance of TableServiceClient from connection string.
|
||||
|
@ -429,3 +292,7 @@ export class TableServiceClient {
|
|||
return new TableServiceClient(url, clientOptions);
|
||||
}
|
||||
}
|
||||
|
||||
type InternalListTablesOptions = ListTableItemsOptions & {
|
||||
queryOptions?: TableQueryOptions & { top?: number };
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
export class TablesSharedKeyCredential {}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { createHmac } from "crypto";
|
||||
import { RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http";
|
||||
import { RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from "@azure/core-http";
|
||||
|
||||
import { TablesSharedKeyCredentialPolicy } from "./TablesSharedKeyCredentialPolicy";
|
||||
|
||||
|
@ -43,12 +43,12 @@ export class TablesSharedKeyCredential implements RequestPolicyFactory {
|
|||
* Creates a {@link TablesSharedKeyCredentialPolicy} object.
|
||||
*
|
||||
* @param {RequestPolicy} nextPolicy
|
||||
* @param {RequestPolicyOptions} options
|
||||
* @param {RequestPolicyOptionsLike} options
|
||||
* @returns {TablesSharedKeyCredentialPolicy}
|
||||
*/
|
||||
public create(
|
||||
nextPolicy: RequestPolicy,
|
||||
options: RequestPolicyOptions
|
||||
options: RequestPolicyOptionsLike
|
||||
): TablesSharedKeyCredentialPolicy {
|
||||
return new TablesSharedKeyCredentialPolicy(nextPolicy, options, this);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import {
|
||||
RequestPolicy,
|
||||
RequestPolicyOptions,
|
||||
RequestPolicyOptionsLike,
|
||||
WebResource,
|
||||
BaseRequestPolicy,
|
||||
HttpOperationResponse
|
||||
|
@ -35,7 +35,7 @@ export class TablesSharedKeyCredentialPolicy extends BaseRequestPolicy {
|
|||
*/
|
||||
constructor(
|
||||
nextPolicy: RequestPolicy,
|
||||
options: RequestPolicyOptions,
|
||||
options: RequestPolicyOptionsLike,
|
||||
factory: TablesSharedKeyCredential
|
||||
) {
|
||||
super(nextPolicy, options);
|
||||
|
@ -130,7 +130,7 @@ export class TablesSharedKeyCredentialPolicy extends BaseRequestPolicy {
|
|||
if (queries) {
|
||||
const queryKeys: string[] = [];
|
||||
for (const key in queries) {
|
||||
if (queries.hasOwnProperty(key)) {
|
||||
if (key in queries) {
|
||||
const lowercaseKey = key.toLowerCase();
|
||||
lowercaseQueries[lowercaseKey] = queries.get(key) || "";
|
||||
queryKeys.push(lowercaseKey);
|
||||
|
|
|
@ -12,7 +12,6 @@ export {
|
|||
ServiceSetPropertiesResponse as SetPropertiesResponse,
|
||||
TableDeleteOptionalParams as DeleteTableOptions,
|
||||
TableDeleteResponse as DeleteTableResponse,
|
||||
TableQueryOperationResponse as ListTablesResponse,
|
||||
TableQueryEntitiesWithPartitionAndRowKeyResponse,
|
||||
TableDeleteEntityResponse as DeleteTableEntityResponse,
|
||||
TableUpdateEntityResponse as UpdateEntityResponse,
|
||||
|
|
|
@ -100,7 +100,7 @@ export type ListEntitiesResponse<T extends object> = Array<TableEntity<T>> & {
|
|||
/**
|
||||
* Contains the continuation token value for row key.
|
||||
*/
|
||||
nextextRowKey?: string;
|
||||
nextRowKey?: string;
|
||||
/**
|
||||
* The underlying HTTP response.
|
||||
*/
|
||||
|
@ -185,10 +185,6 @@ export type CreateTableOptions = OperationOptions & {
|
|||
* OData Query options to limit the set of tables returned.
|
||||
*/
|
||||
export interface TableQueryOptions {
|
||||
/**
|
||||
* Maximum number of records to return.
|
||||
*/
|
||||
top?: number;
|
||||
/**
|
||||
* OData filter expression.
|
||||
*/
|
||||
|
@ -199,10 +195,6 @@ export interface TableQueryOptions {
|
|||
* OData Query options to limit the set of entities returned.
|
||||
*/
|
||||
export interface TableEntityQueryOptions {
|
||||
/**
|
||||
* Maximum number of records to return.
|
||||
*/
|
||||
top?: number;
|
||||
/**
|
||||
* OData filter expression.
|
||||
*/
|
||||
|
@ -216,11 +208,7 @@ export interface TableEntityQueryOptions {
|
|||
/**
|
||||
* List tables optional parameters.
|
||||
*/
|
||||
export interface ListTablesOptions {
|
||||
/**
|
||||
* Query options group
|
||||
*/
|
||||
queryOptions?: TableQueryOptions;
|
||||
export interface ListTableItemsOptions {
|
||||
/**
|
||||
* Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled.
|
||||
*/
|
||||
|
|
|
@ -74,8 +74,8 @@ export function extractConnectionStringParts(connectionString: string): Connecti
|
|||
}
|
||||
|
||||
function getSASConnectionString(connectionString: string, tableEndpoint: string): ConnectionString {
|
||||
let accountName = getAccountNameFromUrl(tableEndpoint);
|
||||
let accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
|
||||
const accountName = getAccountNameFromUrl(tableEndpoint);
|
||||
const accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
|
||||
if (!tableEndpoint) {
|
||||
throw new Error("Invalid TableEndpoint in the provided SAS Connection String");
|
||||
} else if (!accountSas) {
|
||||
|
@ -142,7 +142,7 @@ function getValueInConnString(
|
|||
| "DefaultEndpointsProtocol"
|
||||
| "EndpointSuffix"
|
||||
| "SharedAccessSignature"
|
||||
) {
|
||||
): string {
|
||||
const elements = connectionString.split(";");
|
||||
for (const element of elements) {
|
||||
if (element.trim().startsWith(argument)) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import { ConnectionString } from "./connectionString";
|
|||
* @param _extractedCreds parsed connection string
|
||||
* @param _options TablesServiceClient options
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export function fromAccountConnectionString(
|
||||
_connectionString: ConnectionString,
|
||||
_options?: TableServiceClientOptions
|
||||
|
|
|
@ -11,6 +11,7 @@ import { TablesSharedKeyCredential } from "../TablesSharedKeyCredential";
|
|||
* @param extractedCreds parsed connection string
|
||||
* @param options TablesServiceClient options
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export function fromAccountConnectionString(
|
||||
extractedCreds: ConnectionString,
|
||||
options?: TableServiceClientOptions
|
||||
|
|
|
@ -1,29 +1,39 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { TableClient, TableEntity, Edm } from "../../src";
|
||||
import { TableClient, TableEntity, Edm, odata } from "../../src";
|
||||
import { assert } from "chai";
|
||||
import { record, Recorder } from "@azure/test-utils-recorder";
|
||||
import { recordedEnvironmentSetup, createTableClient } from "./utils/recordedClient";
|
||||
import { isNode } from "@azure/core-http";
|
||||
|
||||
/**
|
||||
* NOTE: For running this tests with a TEST_MODE different to "playback", you will need to make
|
||||
* sure that the storage account these tests are run against meets the following requirements
|
||||
*
|
||||
* 1) Have a CORS rule to allow connections from browser tests
|
||||
* 2) Have 7000 entities in total of which
|
||||
* 2.1) 1000 are in this form {foo: "testEntity"} - PartitionKey and RowKey don't have any specific requirements
|
||||
* 2.1) 1 {RowKey: "binary1", foo: Buffer.from("Bar")} - PartitionKey doesn't have any specific requirements
|
||||
*
|
||||
* With Issue #10918 we'll have ARM templates that should make running live tests locally much easier
|
||||
*/
|
||||
describe("TableClient", () => {
|
||||
let client: TableClient;
|
||||
let recorder: Recorder;
|
||||
const suffix = isNode ? "_node" : "_browser";
|
||||
|
||||
beforeEach(function() {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
recorder = record(this, recordedEnvironmentSetup);
|
||||
const tableName = "integration";
|
||||
client = createTableClient(tableName);
|
||||
});
|
||||
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
describe("createEntity and getEntity", () => {
|
||||
beforeEach(function() {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
recorder = record(this, recordedEnvironmentSetup);
|
||||
const tableName = "integration";
|
||||
client = createTableClient(tableName);
|
||||
});
|
||||
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
it("should createEntity with only primitives", async () => {
|
||||
type TestType = { testField: string };
|
||||
const testEntity: TableEntity<TestType> = {
|
||||
|
@ -31,7 +41,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R1",
|
||||
testField: "testEntity"
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<TestType>(testEntity.PartitionKey, testEntity.RowKey);
|
||||
|
||||
assert.equal(createResult._response.status, 204);
|
||||
|
@ -48,7 +58,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R2",
|
||||
testField: testDate
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<TestType>(testEntity.PartitionKey, testEntity.RowKey);
|
||||
|
||||
assert.equal(createResult._response.status, 204);
|
||||
|
@ -71,7 +81,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R3",
|
||||
testField: testGuid
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<TestType>(testEntity.PartitionKey, testEntity.RowKey);
|
||||
|
||||
assert.equal(createResult._response.status, 204);
|
||||
|
@ -93,7 +103,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R4",
|
||||
testField: testInt64
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<TestType>(testEntity.PartitionKey, testEntity.RowKey);
|
||||
|
||||
assert.equal(createResult._response.status, 204);
|
||||
|
@ -119,7 +129,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R5",
|
||||
testField: testInt32
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<ResponseType>(
|
||||
testEntity.PartitionKey,
|
||||
testEntity.RowKey
|
||||
|
@ -151,7 +161,7 @@ describe("TableClient", () => {
|
|||
RowKey: "R6",
|
||||
testField: testBoolean
|
||||
};
|
||||
const createResult = await client.createEntity(testEntity, {});
|
||||
const createResult = await client.createEntity(testEntity);
|
||||
const result = await client.getEntity<ResponseType>(
|
||||
testEntity.PartitionKey,
|
||||
testEntity.RowKey
|
||||
|
@ -210,4 +220,96 @@ describe("TableClient", () => {
|
|||
assert.equal(result.floatingPointNumber, 3.14);
|
||||
});
|
||||
});
|
||||
|
||||
describe("listEntities", () => {
|
||||
beforeEach(function() {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
recorder = record(this, recordedEnvironmentSetup);
|
||||
const tableName = "list";
|
||||
client = createTableClient(tableName);
|
||||
});
|
||||
|
||||
afterEach(async function() {
|
||||
await recorder.stop();
|
||||
});
|
||||
|
||||
type StringEntity = { foo: string };
|
||||
type NumberEntity = { foo: number };
|
||||
type DateEntity = { foo: Date };
|
||||
type BooleanEntity = { foo: boolean };
|
||||
type Int64Entity = { foo: Edm<"Int64"> };
|
||||
type Int32Entity = { foo: Edm<"Int32"> };
|
||||
type BinaryEntity = { foo: Uint8Array };
|
||||
type TestEntity =
|
||||
| TableEntity<StringEntity>
|
||||
| TableEntity<NumberEntity>
|
||||
| TableEntity<DateEntity>
|
||||
| TableEntity<BooleanEntity>
|
||||
| TableEntity<Int64Entity>
|
||||
| TableEntity<Int32Entity>
|
||||
| TableEntity<BinaryEntity>;
|
||||
|
||||
it("should list all", async function() {
|
||||
const totalItems = 7000;
|
||||
const entities = client.listEntities<TestEntity>();
|
||||
const all: TestEntity[] = [];
|
||||
for await (const entity of entities) {
|
||||
all.push(entity);
|
||||
}
|
||||
|
||||
assert.lengthOf(all, totalItems);
|
||||
}).timeout(60000);
|
||||
|
||||
it("should list by page", async function() {
|
||||
const totalItems = 7000;
|
||||
const maxPageSize = 500;
|
||||
const entities = client.listEntities<TestEntity>();
|
||||
let all: TestEntity[] = [];
|
||||
let i = 0;
|
||||
for await (const entity of entities.byPage({
|
||||
maxPageSize
|
||||
})) {
|
||||
i++;
|
||||
all = [...all, ...entity];
|
||||
}
|
||||
|
||||
assert.lengthOf(all, 7000);
|
||||
assert.equal(i, totalItems / maxPageSize);
|
||||
}).timeout(60000);
|
||||
|
||||
it("should list with filter", async function() {
|
||||
const barItems = 1000;
|
||||
const strValue = "testEntity";
|
||||
const entities = client.listEntities<TableEntity<StringEntity>>({
|
||||
queryOptions: { filter: odata`foo eq ${strValue}` }
|
||||
});
|
||||
let all: TableEntity<StringEntity>[] = [];
|
||||
for await (const entity of entities) {
|
||||
all = [...all, entity];
|
||||
}
|
||||
|
||||
assert.lengthOf(all, barItems);
|
||||
});
|
||||
|
||||
it("should list binary with filter", async function() {
|
||||
const strValue = "binary1";
|
||||
const entities = client.listEntities<TableEntity<BinaryEntity>>({
|
||||
queryOptions: { filter: odata`RowKey eq ${strValue}` }
|
||||
});
|
||||
let all: TableEntity<BinaryEntity>[] = [];
|
||||
for await (const entity of entities) {
|
||||
all = [...all, entity];
|
||||
}
|
||||
|
||||
assert.lengthOf(all, 1);
|
||||
|
||||
if (isNode) {
|
||||
assert.deepEqual(all[0].foo, Buffer.from("Bar"));
|
||||
}
|
||||
|
||||
if (!isNode) {
|
||||
assert.deepEqual(String.fromCharCode(...all[0].foo), "Bar");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
// TODO: Add tests for the TableServiceClient operations #9910
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { TableServiceClient } from "../../src";
|
||||
import { TableResponseProperties, TableServiceClient } from "../../src";
|
||||
import { record, Recorder } from "@azure/test-utils-recorder";
|
||||
import { recordedEnvironmentSetup, createTableServiceClient } from "./utils/recordedClient";
|
||||
import { isNode } from "@azure/core-http";
|
||||
import { assert } from "chai";
|
||||
|
||||
/**
|
||||
* NOTE: For running this tests with a TEST_MODE different to "playback", you will need to make
|
||||
* sure that the storage account these tests are run against meets the following requirements
|
||||
*
|
||||
* 1) Have a CORS rule to allow connections from browser tests
|
||||
* 2) Create 3553 tables so that list tests can be run. Alternatively you can create as many tables
|
||||
* as you need but will need to update the expected values in the test below.
|
||||
*
|
||||
* With Issue #10918 we'll have ARM templates that should make running live tests locally much easier
|
||||
*/
|
||||
describe("TableServiceClient", () => {
|
||||
let client: TableServiceClient;
|
||||
let recorder: Recorder;
|
||||
|
@ -30,11 +36,44 @@ describe("TableServiceClient", () => {
|
|||
it("should create new table", async () => {
|
||||
const tableName = `testTable${suffix}`;
|
||||
const createResult = await client.createTable(tableName);
|
||||
const result = await client.listTables();
|
||||
const hasTable = result.some((r) => r.tableName === tableName);
|
||||
const result = client.listTables();
|
||||
let hasTable = false;
|
||||
for await (const table of result) {
|
||||
if (table.tableName === tableName) {
|
||||
hasTable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assert.equal(createResult._response.status, 201);
|
||||
assert.isTrue(hasTable);
|
||||
});
|
||||
});
|
||||
|
||||
describe("listTables", () => {
|
||||
it("should list all", async () => {
|
||||
const totalItems = 3553;
|
||||
const entities = client.listTables();
|
||||
const all: TableResponseProperties[] = [];
|
||||
for await (const entity of entities) {
|
||||
all.push(entity);
|
||||
}
|
||||
|
||||
assert.equal(all.length, totalItems);
|
||||
}).timeout(60000);
|
||||
|
||||
it("should list by page", async function() {
|
||||
const maxPageSize = 500;
|
||||
const entities = client.listTables();
|
||||
let totalItems = 0;
|
||||
for await (const page of entities.byPage({
|
||||
maxPageSize
|
||||
})) {
|
||||
totalItems += page.length;
|
||||
assert.isTrue(page.length <= 500);
|
||||
}
|
||||
|
||||
assert.equal(totalItems, 3553);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,6 +12,7 @@ describe("Utility Helpers", () => {
|
|||
beforeEach(function() {
|
||||
if (!isNode) {
|
||||
// Account connection string is not supported for Browsers
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
@ -62,8 +63,6 @@ describe("Utility Helpers", () => {
|
|||
url: "https://teststorageaccount.table.core.windows.net"
|
||||
};
|
||||
|
||||
beforeEach(() => {});
|
||||
|
||||
it("should handle format 'protocol://accountName.table.endpointSuffix'", () => {
|
||||
const validSAS =
|
||||
"BlobEndpoint=https://teststorageaccount.blob.core.windows.net/;QueueEndpoint=https://teststorageaccount.queue.core.windows.net/;FileEndpoint=https://teststorageaccount.file.core.windows.net/;TableEndpoint=https://teststorageaccount.table.core.windows.net/;SharedAccessSignature=REDACTED";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"compilerOptions": {
|
||||
"outDir": "./dist-esm",
|
||||
"declarationDir": "./types",
|
||||
"lib": ["dom"]
|
||||
"lib": ["dom", "esnext"]
|
||||
},
|
||||
"exclude": ["node_modules", "types", "temp", "browser", "dist", "dist-esm", "./samples/**/*.ts"]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче