Class TableService

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): TableService

Creates a new TableService object. Uses the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables.

constructor
extends

{ServiceClient}

Returns

TableService

constructor(connectionString: string): TableService

Creates a new TableService object. Uses a connectionString to connect

constructor
extends

{ServiceClient}

Parameters

  • connectionString: string

    The connection string.

Returns

TableService

constructor(storageAccount: string, storageAccessKey: string, host?: string, authenticationProvider?: string): TableService

Creates a new TableService object. Uses a storage account and an access key.

constructor
extends

{ServiceClient}

Parameters

  • storageAccount: string

    The storage account or the connection string.

  • storageAccessKey: string

    The storage access key.

  • host?: string optional

    The host address.

  • authenticationProvider?: string optional

    The authentication provider.

Returns

TableService

Properties

public apiVersion: string

public static incorrectCallbackErr: string

public static incorrectPartitionErr: string

public static incorrectTableNameErr: string

public static incorrectTableQuery: string

public operations: Array<any>

public usePathStyleUri: string

Methods

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public addOperation(webResource: WebResource, outputData: any)

Parameters

public beginBatch()

public commitBatch(callback: (error: any, operationResponses: any[], response: any) => void)

Parameters

  • callback: (error: any, operationResponses: any[], response: any) => void

public commitBatch(options: any, callback: (error: any, operationResponses: any[], response: any) => void)

Parameters

  • options: any
  • callback: (error: any, operationResponses: any[], response: any) => void

public createTable(table: string, callback?: TableRequestCallback)

Parameters

public createTable(table: string, options: TimeoutIntervalOptions, callback?: TableRequestCallback)

Parameters

public createTableIfNotExists(table: string, callback?: CreateTableIfNotExistsCallback)

Parameters

public createTableIfNotExists(table: string, options: TimeoutIntervalOptions, callback?: CreateTableIfNotExistsCallback)

Parameters

public deleteEntity(tableName: string, entityDescriptor: Entity, callback?: DeleteEntityCallback)

Parameters

public deleteEntity(tableName: string, entityDescriptor: Entity, options: UpdateEntityOptions, callback?: DeleteEntityCallback)

Parameters

public deleteTable(table: string, callback?: DeleteTableCallback)

Parameters

public deleteTable(table: string, options: TimeoutIntervalOptions, callback?: DeleteTableCallback)

Parameters

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public getServiceProperties(callback?: (error: any, servicePropertiesResult: any, response: any) => void)

Parameters

  • callback?: (error: any, servicePropertiesResult: any, response: any) => void optional

public getServiceProperties(options: TimeoutIntervalOptions, callback?: (error: any, servicePropertiesResult: any, response: any) => void)

Parameters

  • options: TimeoutIntervalOptions
  • callback?: (error: any, servicePropertiesResult: any, response: any) => void optional

public getTable(table: string, callback?: TableRequestCallback)

Parameters

public getTable(table: string, options: TimeoutIntervalOptions, callback?: TableRequestCallback)

Parameters

public hasOperations(): boolean

Returns

boolean

public insertEntity(tableName: string, entityDescriptor: Entity, callback?: ModifyEntityCallback)

Parameters

public insertEntity(tableName: string, entityDescriptor: Entity, options: TimeoutIntervalOptions, callback?: ModifyEntityCallback)

Parameters

public insertOrMergeEntity(tableName: string, entityDescriptor: Entity, callback?: ModifyEntityCallback)

Parameters

public insertOrMergeEntity(tableName: string, entityDescriptor: Entity, options: UpdateEntityOptions, callback?: ModifyEntityCallback)

Parameters

public insertOrReplaceEntity(tableName: string, entityDescriptor: Entity, callback?: ModifyEntityCallback)

Parameters

public insertOrReplaceEntity(tableName: string, entityDescriptor: Entity, options: TimeoutIntervalOptions, callback?: ModifyEntityCallback)

Parameters

public isEmulated(): boolean

Returns

boolean

public isInBatch(): boolean

Returns

boolean

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public mergeEntity(tableName: string, entityDescriptor: Entity, callback?: ModifyEntityCallback)

Parameters

public mergeEntity(tableName: string, entityDescriptor: Entity, options: UpdateEntityOptions, callback?: ModifyEntityCallback)

Parameters

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public parseMetadataHeaders(headers: any): any

Parameters

  • headers: any

Returns

any

public performRequest(webResource: WebResource, outputData: string, options: any, callback: Function)

Parameters

  • webResource: WebResource
  • outputData: string
  • options: any
  • callback: Function

public performRequestInputStream(webResource: WebResource, outputData: string, inputStream: any, options: any, callback: Function)

Parameters

  • webResource: WebResource
  • outputData: string
  • inputStream: any
  • options: any
  • callback: Function

public performRequestOutputStream(webResource: WebResource, outputStream: any, options: any, callback: Function)

Parameters

  • webResource: WebResource
  • outputStream: any
  • options: any
  • callback: Function

public processOperation(webResource: WebResource, rawResponse: string): any

Parameters

Returns

any

public processResponse(responseObject: any, requestOperations: Array<any>): Array<any>

Parameters

  • responseObject: any
  • requestOperations: Array<any>

Returns

Array<any>

public queryEntities(tableQuery: TableQuery, callback?: QueryEntitiesCallback)

Parameters

public queryEntities(tableQuery: TableQuery, options: TimeoutIntervalOptions, callback?: QueryEntitiesCallback)

Parameters

public queryEntity(table: string, partitionKey: string, rowKey: string, callback?: QueryEntityCallback)

Parameters

public queryEntity(table: string, partitionKey: string, rowKey: string, options: TimeoutIntervalOptions, callback?: QueryEntityCallback)

Parameters

public queryTables(callback?: QueryTablesCallback)

Parameters

public queryTables(options: QueryTablesOptions, callback?: QueryTablesCallback)

Parameters

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public rollback()

public setHost(host: string)

Parameters

  • host: string

public setMaxListeners(n: number)

Parameters

  • n: number

public setProxy(proxyUrl: string, proxyPort: number)

Parameters

  • proxyUrl: string
  • proxyPort: number

public setServiceProperties(serviceProperties: any, options: TimeoutIntervalOptions, callback?: Function)

Parameters

public updateEntity(tableName: string, entityDescriptor: Entity, callback?: ModifyEntityCallback)

Parameters

public updateEntity(tableName: string, entityDescriptor: Entity, options: UpdateEntityOptions, callback?: ModifyEntityCallback)

Parameters

public withFilter(newFilter: { handle: (requestOptions: any, next: Function) => void; }): ServiceClient

Parameters

  • newFilter: { handle: (requestOptions: any, next: Function) => void; }

Returns

ServiceClient