@@ -52,6 +52,7 @@ import {
5252} from "./utils/internalModels" ;
5353import { Uuid } from "./utils/uuid" ;
5454import { parseXML , stringifyXML } from "@azure/core-xml" ;
55+ import { Pipeline } from "@azure/core-rest-pipeline" ;
5556
5657/**
5758 * A TableClient represents a Client to the Azure Tables service allowing you
@@ -62,6 +63,11 @@ export class TableClient {
6263 * Table Account URL
6364 */
6465 public url : string ;
66+ /**
67+ * Represents a pipeline for making a HTTP request to a URL.
68+ * Pipelines can have multiple policies to manage manipulating each request before and after it is made to the server.
69+ */
70+ public pipeline : Pipeline ;
6571 private table : Table ;
6672 private credential : TablesSharedKeyCredentialLike | undefined ;
6773 private interceptClient : TableClientLike | undefined ;
@@ -183,6 +189,7 @@ export class TableClient {
183189 generatedClient . pipeline . addPolicy ( tablesSharedKeyCredentialPolicy ( credential ) ) ;
184190 }
185191 this . table = generatedClient . table ;
192+ this . pipeline = generatedClient . pipeline ;
186193 }
187194
188195 /**
@@ -250,13 +257,16 @@ export class TableClient {
250257 }
251258
252259 try {
253- const { queryOptions, ...getEntityOptions } = updatedOptions || { } ;
260+ const { disableTypeConversion , queryOptions, ...getEntityOptions } = updatedOptions || { } ;
254261 await this . table . queryEntitiesWithPartitionAndRowKey ( this . tableName , partitionKey , rowKey , {
255262 ...getEntityOptions ,
256263 queryOptions : this . convertQueryOptions ( queryOptions || { } ) ,
257264 onResponse
258265 } ) ;
259- const tableEntity = deserialize < TableEntityResult < T > > ( parsedBody ) ;
266+ const tableEntity = deserialize < TableEntityResult < T > > (
267+ parsedBody ,
268+ disableTypeConversion ?? false
269+ ) ;
260270
261271 return tableEntity ;
262272 } catch ( e ) {
@@ -348,9 +358,10 @@ export class TableClient {
348358
349359 private async _listEntities < T extends object > (
350360 tableName : string ,
351- options ? : InternalListTableEntitiesOptions
361+ options : InternalListTableEntitiesOptions = { }
352362 ) : Promise < ListEntitiesResponse < TableEntityResult < T > > > {
353- const queryOptions = this . convertQueryOptions ( options ?. queryOptions || { } ) ;
363+ const { disableTypeConversion = false } = options ;
364+ const queryOptions = this . convertQueryOptions ( options . queryOptions || { } ) ;
354365 const {
355366 xMsContinuationNextPartitionKey : nextPartitionKey ,
356367 xMsContinuationNextRowKey : nextRowKey ,
@@ -360,7 +371,10 @@ export class TableClient {
360371 queryOptions
361372 } ) ;
362373
363- const tableEntities = deserializeObjectsArray < TableEntityResult < T > > ( value || [ ] ) ;
374+ const tableEntities = deserializeObjectsArray < TableEntityResult < T > > (
375+ value ?? [ ] ,
376+ disableTypeConversion
377+ ) ;
364378
365379 return Object . assign ( [ ...tableEntities ] , {
366380 nextPartitionKey,
@@ -678,6 +692,12 @@ interface InternalListTableEntitiesOptions extends ListTableEntitiesOptions {
678692 * An entity query continuation token from a previous call.
679693 */
680694 nextRowKey ?: string ;
695+ /**
696+ * If true, automatic type conversion will be disabled and entity properties will
697+ * be represented by full metadata types. For example, an Int32 value will be \{value: "123", type: "Int32"\} instead of 123.
698+ * This option applies for all the properties
699+ */
700+ disableTypeConversion ?: boolean ;
681701}
682702
683703function isInternalClientOptions ( options : any ) : options is InternalTransactionClientOptions {
0 commit comments