TableService interface
- Extends
-
azure-storage.export=.common.services.storageserviceclient.StorageServiceClient
Properties
default |
Inherited Properties
default |
The default timeout of client requests, in milliseconds, to use for the request. |
default |
The default location mode for requests made via the service. |
default |
The default maximum execution time across all potential retries, for requests made via the service. |
default |
The default timeout interval, in milliseconds, to use for request made via the service. |
enable |
Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use http(s).Agent({keepAlive:true}). |
logger | The logging settings object. |
proxy | The proxy object specified by caller. |
use |
Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the Nagle algorithm; otherwise, false. The default value is false. |
Methods
create |
Creates a new table within a storage account. |
create |
Creates a new table within a storage account. |
create |
Creates a new table within a storage account if it does not exists. Example
|
create |
Creates a new table within a storage account if it does not exists. Example
|
delete |
Deletes an entity within a table. To delete conditionally based on etag, set entity['.metadata']['etag']. |
delete |
Deletes an entity within a table. To delete conditionally based on etag, set entity['.metadata']['etag']. |
delete |
Deletes a table from a storage account. |
delete |
Deletes a table from a storage account. |
delete |
Deletes a table from a storage account, if it exists. |
delete |
Deletes a table from a storage account, if it exists. |
does |
Checks whether or not a table exists on the service. |
does |
Checks whether or not a table exists on the service. |
execute |
Executes the operations in the batch. |
execute |
Executes the operations in the batch. |
generate |
Retrieves a shared access signature token. |
generate |
Retrieves a shared access signature token. |
get |
Gets the properties of a storage account’s Table service, including Azure Storage Analytics. |
get |
Gets the properties of a storage account’s Table service, including Azure Storage Analytics. |
get |
Gets the service stats for a storage account’s Table service. |
get |
Gets the service stats for a storage account’s Table service. |
get |
Gets the table's ACL. |
get |
Gets the table's ACL. |
get |
|
insert |
Inserts a new entity into a table. |
insert |
Inserts a new entity into a table. Example
|
insert |
Inserts a new entity into a table. |
insert |
Inserts or updates an existing entity within a table by merging new property values into the entity. |
insert |
Inserts or updates an existing entity within a table by merging new property values into the entity. |
insert |
Inserts or updates a new entity into a table. |
insert |
Inserts or updates a new entity into a table. |
list |
Lists a segment containing a collection of table items under the specified account. |
list |
Lists a segment containing a collection of table items under the specified account. |
list |
Lists a segment containing a collection of table items under the specified account. |
list |
Lists a segment containing a collection of table items under the specified account. |
merge |
Updates an existing entity within a table by merging new property values into the entity. To merge conditionally based on etag, set entity['.metadata']['etag']. |
merge |
Updates an existing entity within a table by merging new property values into the entity. To merge conditionally based on etag, set entity['.metadata']['etag']. |
query |
Queries data in a table. To retrieve a single entity by partition key and row key, use retrieve entity. |
query |
Queries data in a table. To retrieve a single entity by partition key and row key, use retrieve entity. Example
|
replace |
Replaces an existing entity within a table. To replace conditionally based on etag, set entity['.metadata']['etag']. |
replace |
Replaces an existing entity within a table. To replace conditionally based on etag, set entity['.metadata']['etag']. |
retrieve |
Retrieves an entity from a table. |
retrieve |
Retrieves an entity from a table. Example
|
set |
Sets the properties of a storage account’s Table service, including Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified. |
set |
Sets the properties of a storage account’s Table service, including Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified. |
set |
Updates the table's ACL. |
set |
Updates the table's ACL. |
with |
Associate a filtering operation with this TableService. Filtering operations can include logging, automatically retrying, etc. Filter operations are objects that implement a method with the signature:
After doing its preprocessing on the request options, the method needs to call "next" passing a callback with the following signature: signature:
In this callback, and after processing the returnObject (the response from the request to the server), the callback needs to either invoke next if it exists to continue processing other filters or simply invoke finalCallback otherwise to end up the service invocation. |
Inherited Methods
Property Details
defaultPayloadFormat
defaultPayloadFormat: string
Property Value
string
Inherited Property Details
defaultClientRequestTimeoutInMs
The default timeout of client requests, in milliseconds, to use for the request.
defaultClientRequestTimeoutInMs: number
Property Value
number
Inherited From StorageServiceClient.defaultClientRequestTimeoutInMs
defaultLocationMode
The default location mode for requests made via the service.
defaultLocationMode: LocationMode
Property Value
azure-storage.export=.common.util.storageutilities.LocationMode
Inherited From StorageServiceClient.defaultLocationMode
defaultMaximumExecutionTimeInMs
The default maximum execution time across all potential retries, for requests made via the service.
defaultMaximumExecutionTimeInMs: number
Property Value
number
Inherited From StorageServiceClient.defaultMaximumExecutionTimeInMs
defaultTimeoutIntervalInMs
The default timeout interval, in milliseconds, to use for request made via the service.
defaultTimeoutIntervalInMs: number
Property Value
number
Inherited From StorageServiceClient.defaultTimeoutIntervalInMs
enableGlobalHttpAgent
Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use http(s).Agent({keepAlive:true}).
enableGlobalHttpAgent: boolean
Property Value
boolean
Inherited From StorageServiceClient.enableGlobalHttpAgent
logger
The logging settings object.
logger: Logger
Property Value
azure-storage.export=.common.diagnostics.logger.Logger
Inherited From StorageServiceClient.logger
proxy
The proxy object specified by caller.
proxy: Proxy
Property Value
azure-storage.export=.common.services.storageserviceclient.Proxy
Inherited From StorageServiceClient.proxy
useNagleAlgorithm
Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the Nagle algorithm; otherwise, false. The default value is false.
useNagleAlgorithm: boolean
Property Value
boolean
Inherited From StorageServiceClient.useNagleAlgorithm
Method Details
createTable(string, ErrorOrResult<TableResult>)
Creates a new table within a storage account.
function createTable(table: string, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
otherwise result
will contain the new table information.
response
will contain information related to this operation.
createTable(string, RequestOptions, ErrorOrResult<TableResult>)
Creates a new table within a storage account.
function createTable(table: string, options?: RequestOptions, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
otherwise result
will contain the new table information.
response
will contain information related to this operation.
createTableIfNotExists(string, ErrorOrResult<TableResult>)
Creates a new table within a storage account if it does not exists.
Example
var azure = require('azure-storage');
var tableService = azure.createTableService();
tableService.createTableIfNotExists('tasktable', function(error) {
if(!error) {
// Table created or exists
}
});
function createTableIfNotExists(table: string, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
result
will be true
if table was created, false otherwise
response
will contain information related to this operation.
createTableIfNotExists(string, RequestOptions, ErrorOrResult<TableResult>)
Creates a new table within a storage account if it does not exists.
Example
var azure = require('azure-storage');
var tableService = azure.createTableService();
tableService.createTableIfNotExists('tasktable', function(error) {
if(!error) {
// Table created or exists
}
});
function createTableIfNotExists(table: string, options?: RequestOptions, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
result
will be true
if table was created, false otherwise
response
will contain information related to this operation.
deleteEntity<T>(string, T, ErrorOrResponse)
Deletes an entity within a table. To delete conditionally based on etag, set entity['.metadata']['etag'].
function deleteEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResponse)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
deleteEntity<T>(string, T, RequestOptions, ErrorOrResponse)
Deletes an entity within a table. To delete conditionally based on etag, set entity['.metadata']['etag'].
function deleteEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResponse)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
deleteTable(string, ErrorOrResponse)
Deletes a table from a storage account.
function deleteTable(table: string, callback: ErrorOrResponse)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
deleteTable(string, RequestOptions, ErrorOrResponse)
Deletes a table from a storage account.
function deleteTable(table: string, options?: RequestOptions, callback: ErrorOrResponse)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
deleteTableIfExists(string, ErrorOrResult<boolean>)
Deletes a table from a storage account, if it exists.
function deleteTableIfExists(table: string, callback: ErrorOrResult<boolean>)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResult<boolean>
error
will contain information if an error occurs;
result
will be true
if table was deleted, false otherwise
response
will contain information related to this operation.
deleteTableIfExists(string, RequestOptions, ErrorOrResult<boolean>)
Deletes a table from a storage account, if it exists.
function deleteTableIfExists(table: string, options?: RequestOptions, callback: ErrorOrResult<boolean>)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<boolean>
error
will contain information if an error occurs;
result
will be true
if table was deleted, false otherwise
response
will contain information related to this operation.
doesTableExist(string, ErrorOrResult<TableResult>)
Checks whether or not a table exists on the service.
function doesTableExist(table: string, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
otherwise result
will contain be true if the table exists, or false if the table does not exist.
response
will contain information related to this operation.
doesTableExist(string, RequestOptions, ErrorOrResult<TableResult>)
Checks whether or not a table exists on the service.
function doesTableExist(table: string, options?: RequestOptions, callback: ErrorOrResult<TableResult>)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.TableResult>
error
will contain information if an error occurs;
otherwise result
will contain be true if the table exists, or false if the table does not exist.
response
will contain information related to this operation.
executeBatch(string, TableBatch, ErrorOrResult<BatchResult[]>)
Executes the operations in the batch.
function executeBatch(table: string, batch: TableBatch, callback: ErrorOrResult<BatchResult[]>)
Parameters
- table
-
string
The table name.
- batch
-
TableBatch
The table batch to execute.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.BatchResult[]>
error
will contain information if an error occurs;
otherwise result
will contain responses for each operation executed in the batch;
result.entity
will contain the entity information for each operation executed.
result.response
will contain the response for each operations executed.
response
will contain information related to this operation.
executeBatch(string, TableBatch, TableEntityRequestOptions, ErrorOrResult<BatchResult[]>)
Executes the operations in the batch.
function executeBatch(table: string, batch: TableBatch, options?: TableEntityRequestOptions, callback: ErrorOrResult<BatchResult[]>)
Parameters
- table
-
string
The table name.
- batch
-
TableBatch
The table batch to execute.
- options
-
azure-storage.export=.services.table.TableService.TableEntityRequestOptions
The create options or callback function.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.BatchResult[]>
error
will contain information if an error occurs;
otherwise result
will contain responses for each operation executed in the batch;
result.entity
will contain the entity information for each operation executed.
result.response
will contain the response for each operations executed.
response
will contain information related to this operation.
generateSharedAccessSignature(string, TableSharedAccessPolicy)
Retrieves a shared access signature token.
function generateSharedAccessSignature(table: string, sharedAccessPolicy: TableSharedAccessPolicy): string
Parameters
- table
-
string
The table name.
- sharedAccessPolicy
-
azure-storage.export=.services.table.TableService.TableSharedAccessPolicy
The shared access policy.
Returns
string
An object with the shared access signature.
generateSharedAccessSignatureWithVersion(string, TableSharedAccessPolicy, string)
Retrieves a shared access signature token.
function generateSharedAccessSignatureWithVersion(table: string, sharedAccessPolicy: TableSharedAccessPolicy, sasVersion?: string): string
Parameters
- table
-
string
The table name.
- sharedAccessPolicy
-
azure-storage.export=.services.table.TableService.TableSharedAccessPolicy
The shared access policy.
- sasVersion
-
string
An optional string indicating the desired SAS version to use. Value must be 2012-02-12 or later.
Returns
string
An object with the shared access signature.
getServiceProperties(ErrorOrResult<ServiceProperties>)
Gets the properties of a storage account’s Table service, including Azure Storage Analytics.
function getServiceProperties(callback: ErrorOrResult<ServiceProperties>)
Parameters
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.common.models.ServicePropertiesResult.ServiceProperties>
error
will contain information if an error occurs;
otherwise result
will contain the properties.
response
will contain information related to this operation.
getServiceProperties(RequestOptions, ErrorOrResult<ServiceProperties>)
Gets the properties of a storage account’s Table service, including Azure Storage Analytics.
function getServiceProperties(options?: RequestOptions, callback: ErrorOrResult<ServiceProperties>)
Parameters
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.common.models.ServicePropertiesResult.ServiceProperties>
error
will contain information if an error occurs;
otherwise result
will contain the properties.
response
will contain information related to this operation.
getServiceStats(ErrorOrResult<ServiceStats>)
Gets the service stats for a storage account’s Table service.
function getServiceStats(callback: ErrorOrResult<ServiceStats>)
Parameters
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.common.models.ServiceStats>
error
will contain information if an error occurs;
otherwise result
will contain the properties.
response
will contain information related to this operation.
getServiceStats(RequestOptions, ErrorOrResult<ServiceStats>)
Gets the service stats for a storage account’s Table service.
function getServiceStats(options?: RequestOptions, callback: ErrorOrResult<ServiceStats>)
Parameters
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.common.models.ServiceStats>
error
will contain information if an error occurs;
otherwise result
will contain the properties.
response
will contain information related to this operation.
getTableAcl(string, ErrorOrResult<GetTableAclResult>)
Gets the table's ACL.
function getTableAcl(table: string, callback: ErrorOrResult<GetTableAclResult>)
Parameters
- table
-
string
The table name.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.GetTableAclResult>
error
will contain information if an error occurs;
otherwise result
will contain the ACL information for the table.
response
will contain information related to this operation.
getTableAcl(string, RequestOptions, ErrorOrResult<GetTableAclResult>)
Gets the table's ACL.
function getTableAcl(table: string, options?: RequestOptions, callback: ErrorOrResult<GetTableAclResult>)
Parameters
- table
-
string
The table name.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.GetTableAclResult>
error
will contain information if an error occurs;
otherwise result
will contain the ACL information for the table.
response
will contain information related to this operation.
getUrl(string, string, boolean)
function getUrl(table: string, sasToken?: string, primary?: boolean): string
Parameters
- table
-
string
- sasToken
-
string
- primary
-
boolean
Returns
string
insertEntity<T>(string, T, ErrorOrResult<EntityMetadata>)
Inserts a new entity into a table.
function insertEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertEntity<T>(string, T, InsertEntityRequestOptions, ErrorOrResult<T | EntityMetadata>)
Inserts a new entity into a table.
Example
var azure = require('azure-storage');
var tableService = azure.createTableService();
var task1 = {
PartitionKey : {'_': 'tasksSeattle', '$':'Edm.String'},
RowKey: {'_': '1', '$':'Edm.String'},
Description: {'_': 'Take out the trash', '$':'Edm.String'},
DueDate: {'_': new Date(2011, 12, 14, 12), '$':'Edm.DateTime'}
};
tableService.insertEntity('tasktable', task1, function(error) {
if(!error) {
// Entity inserted
}
});
function insertEntity<T>(table: string, entityDescriptor: T, options?: InsertEntityRequestOptions, callback: ErrorOrResult<T | EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.services.table.TableService.InsertEntityRequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<T | azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertEntity<T>(string, T, RequestOptions, ErrorOrResult<EntityMetadata>)
Inserts a new entity into a table.
function insertEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertOrMergeEntity<T>(string, T, ErrorOrResult<EntityMetadata>)
Inserts or updates an existing entity within a table by merging new property values into the entity.
function insertOrMergeEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertOrMergeEntity<T>(string, T, RequestOptions, ErrorOrResult<EntityMetadata>)
Inserts or updates an existing entity within a table by merging new property values into the entity.
function insertOrMergeEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertOrReplaceEntity<T>(string, T, ErrorOrResult<EntityMetadata>)
Inserts or updates a new entity into a table.
function insertOrReplaceEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
insertOrReplaceEntity<T>(string, T, RequestOptions, ErrorOrResult<EntityMetadata>)
Inserts or updates a new entity into a table.
function insertOrReplaceEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
listTablesSegmented(ListTablesContinuationToken, ErrorOrResult<ListTablesResponse>)
Lists a segment containing a collection of table items under the specified account.
function listTablesSegmented(currentToken: ListTablesContinuationToken, callback: ErrorOrResult<ListTablesResponse>)
Parameters
- currentToken
-
azure-storage.export=.services.table.TableService.ListTablesContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.ListTablesResponse>
error
will contain information if an error occurs;
otherwise result
will contain entries
and continuationToken
.
entries
gives a list of tables and the continuationToken
is used for the next listing operation.
response
will contain information related to this operation.
listTablesSegmented(ListTablesContinuationToken, ListTablesRequestOptions, ErrorOrResult<ListTablesResponse>)
Lists a segment containing a collection of table items under the specified account.
function listTablesSegmented(currentToken: ListTablesContinuationToken, options?: ListTablesRequestOptions, callback: ErrorOrResult<ListTablesResponse>)
Parameters
- currentToken
-
azure-storage.export=.services.table.TableService.ListTablesContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- options
-
azure-storage.export=.services.table.TableService.ListTablesRequestOptions
The create options or callback function.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.ListTablesResponse>
error
will contain information if an error occurs;
otherwise result
will contain entries
and continuationToken
.
entries
gives a list of tables and the continuationToken
is used for the next listing operation.
response
will contain information related to this operation.
listTablesSegmentedWithPrefix(string, ListTablesContinuationToken, ErrorOrResult<ListTablesResponse>)
Lists a segment containing a collection of table items under the specified account.
function listTablesSegmentedWithPrefix(prefix: string, currentToken: ListTablesContinuationToken, callback: ErrorOrResult<ListTablesResponse>)
Parameters
- prefix
-
string
The prefix of the table name.
- currentToken
-
azure-storage.export=.services.table.TableService.ListTablesContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.ListTablesResponse>
error
will contain information if an error occurs;
otherwise result
will contain entries
and continuationToken
.
entries
gives a list of tables and the continuationToken
is used for the next listing operation.
response
will contain information related to this operation.
listTablesSegmentedWithPrefix(string, ListTablesContinuationToken, ListTablesRequestOptions, ErrorOrResult<ListTablesResponse>)
Lists a segment containing a collection of table items under the specified account.
function listTablesSegmentedWithPrefix(prefix: string, currentToken: ListTablesContinuationToken, options?: ListTablesRequestOptions, callback: ErrorOrResult<ListTablesResponse>)
Parameters
- prefix
-
string
The prefix of the table name.
- currentToken
-
azure-storage.export=.services.table.TableService.ListTablesContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- options
-
azure-storage.export=.services.table.TableService.ListTablesRequestOptions
The create options or callback function.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.ListTablesResponse>
error
will contain information if an error occurs;
otherwise result
will contain entries
and continuationToken
.
entries
gives a list of tables and the continuationToken
is used for the next listing operation.
response
will contain information related to this operation.
mergeEntity<T>(string, T, ErrorOrResult<EntityMetadata>)
Updates an existing entity within a table by merging new property values into the entity. To merge conditionally based on etag, set entity['.metadata']['etag'].
function mergeEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response` will contain information related to this operation.
mergeEntity<T>(string, T, RequestOptions, ErrorOrResult<EntityMetadata>)
Updates an existing entity within a table by merging new property values into the entity. To merge conditionally based on etag, set entity['.metadata']['etag'].
function mergeEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response` will contain information related to this operation.
queryEntities<T>(string, TableQuery, TableContinuationToken, ErrorOrResult<QueryEntitiesResult<T>>)
Queries data in a table. To retrieve a single entity by partition key and row key, use retrieve entity.
function queryEntities<T>(table: string, tableQuery: TableQuery, currentToken: TableContinuationToken, callback: ErrorOrResult<QueryEntitiesResult<T>>)
Parameters
- table
-
string
The table name.
- tableQuery
-
TableQuery
The query to perform. Use null, undefined, or new TableQuery() to get all of the entities in the table.
- currentToken
-
azure-storage.export=.services.table.TableService.TableContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.QueryEntitiesResult<T>>
error
will contain information if an error occurs;
otherwise entities
will contain the entities returned by the query.
If more matching entities exist, and could not be returned,
queryResultContinuation
will contain a continuation token that can be used
to retrieve the next set of results.
response
will contain information related to this operation.
queryEntities<T>(string, TableQuery, TableContinuationToken, TableEntityRequestOptions, ErrorOrResult<QueryEntitiesResult<T>>)
Queries data in a table. To retrieve a single entity by partition key and row key, use retrieve entity.
Example
var azure = require('azure-storage');
var tableService = azure.createTableService();
// tasktable should already exist and have entities
// returns all entities in tasktable, and a continuation token for the next page of results if necessary
tableService.queryEntities('tasktable', null, null /*currentToken*/, function(error, result) {
if(!error) {
var entities = result.entities;
// do stuff with the returned entities if there are any
}
});
// returns field1 and field2 of the entities in tasktable, and a continuation token for the next page of results if necessary
var tableQuery = new TableQuery().select('field1', 'field2');
tableService.queryEntities('tasktable', tableQuery, null /*currentToken*/, function(error, result) {
if(!error) {
var entities = result.entities;
// do stuff with the returned entities if there are any
}
});
function queryEntities<T>(table: string, tableQuery: TableQuery, currentToken: TableContinuationToken, options?: TableEntityRequestOptions, callback: ErrorOrResult<QueryEntitiesResult<T>>)
Parameters
- table
-
string
The table name.
- tableQuery
-
TableQuery
The query to perform. Use null, undefined, or new TableQuery() to get all of the entities in the table.
- currentToken
-
azure-storage.export=.services.table.TableService.TableContinuationToken
A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
- options
-
azure-storage.export=.services.table.TableService.TableEntityRequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.QueryEntitiesResult<T>>
error
will contain information if an error occurs;
otherwise entities
will contain the entities returned by the query.
If more matching entities exist, and could not be returned,
queryResultContinuation
will contain a continuation token that can be used
to retrieve the next set of results.
response
will contain information related to this operation.
The logic for returning entity types can get complicated. Here is the algorithm used:
var propertyType;
if (propertyResovler) { // If the caller provides a propertyResolver in the options, use it
propertyType = propertyResolver(partitionKey, rowKey, propertyName, propertyValue, propertyTypeFromService);
} else if (propertyTypeFromService) { // If the service provides us a property type, use it. See below for an explanation of when this will and won't occur.
propertyType = propertyTypeFromService;
} else if (autoResolveProperties) { // If options.autoResolveProperties is set to true
if (javascript type is string) { // See below for an explanation of how and why autoResolveProperties works as it does.
propertyType = 'Edm.String';
} else if (javascript type is boolean) {
propertyType = 'Edm.Boolean';
}
}
if (propertyType) {
// Set the property type on the property.
} else {
// Property gets no EdmType.
}
Notes:
- The service only provides a type if JsonFullMetadata or JsonMinimalMetadata is used, and if the type is Int64, Guid, Binary, or DateTime.
- Explanation of autoResolveProperties:
- String gets correctly resolved to 'Edm.String'.
- Int64, Guid, Binary, and DateTime all get resolved to 'Edm.String.' This only happens if JsonNoMetadata is used (otherwise the service will provide the propertyType in a prior step).
- Boolean gets correctly resolved to 'Edm.Boolean'.
- For both Int32 and Double, no type information is returned, even in the case of autoResolveProperties = true. This is due to an inability to distinguish between the two in certain cases.
replaceEntity<T>(string, T, ErrorOrResult<EntityMetadata>)
Replaces an existing entity within a table. To replace conditionally based on etag, set entity['.metadata']['etag'].
function replaceEntity<T>(table: string, entityDescriptor: T, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
replaceEntity<T>(string, T, RequestOptions, ErrorOrResult<EntityMetadata>)
Replaces an existing entity within a table. To replace conditionally based on etag, set entity['.metadata']['etag'].
function replaceEntity<T>(table: string, entityDescriptor: T, options?: RequestOptions, callback: ErrorOrResult<EntityMetadata>)
Parameters
- table
-
string
The table name.
- entityDescriptor
-
T
The entity descriptor.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<azure-storage.export=.services.table.TableService.EntityMetadata>
error
will contain information if an error occurs;
otherwise result
will contain the entity information.
response
will contain information related to this operation.
retrieveEntity<T>(string, string, string, ErrorOrResult<T>)
Retrieves an entity from a table.
function retrieveEntity<T>(table: string, partitionKey: string, rowKey: string, callback: ErrorOrResult<T>)
Parameters
- table
-
string
The table name.
- partitionKey
-
string
The partition key.
- rowKey
-
string
The row key.
- callback
-
azure-storage.export=.ErrorOrResult<T>
error
will contain information if an error occurs;
otherwise result
will be the matching entity.
response
will contain information related to this operation.
retrieveEntity<T>(string, string, string, TableEntityRequestOptions, ErrorOrResult<T>)
Retrieves an entity from a table.
Example
var azure = require('azure-storage');
var tableService = azure.createTableService();
tableService.retrieveEntity('tasktable', 'tasksSeattle', '1', function(error, serverEntity) {
if(!error) {
// Entity available in serverEntity variable
}
});
function retrieveEntity<T>(table: string, partitionKey: string, rowKey: string, options?: TableEntityRequestOptions, callback: ErrorOrResult<T>)
Parameters
- table
-
string
The table name.
- partitionKey
-
string
The partition key.
- rowKey
-
string
The row key.
- options
-
azure-storage.export=.services.table.TableService.TableEntityRequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<T>
error
will contain information if an error occurs;
otherwise result
will be the matching entity.
response
will contain information related to this operation.
The logic for returning entity types can get complicated. Here is the algorithm used:
var propertyType;
if (propertyResovler) { // If the caller provides a propertyResolver in the options, use it
propertyType = propertyResolver(partitionKey, rowKey, propertyName, propertyValue, propertyTypeFromService);
} else if (propertyTypeFromService) { // If the service provides us a property type, use it. See below for an explanation of when this will and won't occur.
propertyType = propertyTypeFromService;
} else if (autoResolveProperties) { // If options.autoResolveProperties is set to true
if (javascript type is string) { // See below for an explanation of how and why autoResolveProperties works as it does.
propertyType = 'Edm.String';
} else if (javascript type is boolean) {
propertyType = 'Edm.Boolean';
}
}
if (propertyType) {
// Set the property type on the property.
} else {
// Property gets no EdmType.
}
Notes:
- The service only provides a type if JsonFullMetadata or JsonMinimalMetadata is used, and if the type is Int64, Guid, Binary, or DateTime.
- Explanation of autoResolveProperties:
- String gets correctly resolved to 'Edm.String'.
- Int64, Guid, Binary, and DateTime all get resolved to 'Edm.String.' This only happens if JsonNoMetadata is used (otherwise the service will provide the propertyType in a prior step).
- Boolean gets correctly resolved to 'Edm.Boolean'.
- For both Int32 and Double, no type information is returned, even in the case of autoResolveProperties = true. This is due to an inability to distinguish between the two in certain cases.
setServiceProperties(ServiceProperties, ErrorOrResponse)
Sets the properties of a storage account’s Table service, including Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.
function setServiceProperties(serviceProperties: ServiceProperties, callback: ErrorOrResponse)
Parameters
- serviceProperties
-
azure-storage.export=.common.models.ServicePropertiesResult.ServiceProperties
The service properties.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
setServiceProperties(ServiceProperties, RequestOptions, ErrorOrResponse)
Sets the properties of a storage account’s Table service, including Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.
function setServiceProperties(serviceProperties: ServiceProperties, options?: RequestOptions, callback: ErrorOrResponse)
Parameters
- serviceProperties
-
azure-storage.export=.common.models.ServicePropertiesResult.ServiceProperties
The service properties.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResponse
error
will contain information if an error occurs;
response
will contain information related to this operation.
setTableAcl(string, {[key: string]: common.AccessPolicy}, ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>)
Updates the table's ACL.
function setTableAcl(table: string, signedIdentifiers: {[key: string]: common.AccessPolicy}, callback: ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>)
Parameters
- table
-
string
The table name.
- signedIdentifiers
-
{[key: string]: azure-storage.export=.common.AccessPolicy}
The signed identifiers. Signed identifiers must be in an array.
- callback
-
azure-storage.export=.ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>
error
will contain information if an error occurs;
otherwise result
will contain information for the table.
response
will contain information related to this operation.
setTableAcl(string, {[key: string]: common.AccessPolicy}, RequestOptions, ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>)
Updates the table's ACL.
function setTableAcl(table: string, signedIdentifiers: {[key: string]: common.AccessPolicy}, options?: RequestOptions, callback: ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>)
Parameters
- table
-
string
The table name.
- signedIdentifiers
-
{[key: string]: azure-storage.export=.common.AccessPolicy}
The signed identifiers. Signed identifiers must be in an array.
- options
-
azure-storage.export=.common.RequestOptions
The request options.
- callback
-
azure-storage.export=.ErrorOrResult<{ TableName: string, signedIdentifiers: {[key: string]: common.AccessPolicy} }>
error
will contain information if an error occurs;
otherwise result
will contain information for the table.
response
will contain information related to this operation.
withFilter(IFilter)
Associate a filtering operation with this TableService. Filtering operations can include logging, automatically retrying, etc. Filter operations are objects that implement a method with the signature:
"function handle (requestOptions, next)".
After doing its preprocessing on the request options, the method needs to call "next" passing a callback with the following signature: signature:
"function (returnObject, finalCallback, next)"
In this callback, and after processing the returnObject (the response from the request to the server), the callback needs to either invoke next if it exists to continue processing other filters or simply invoke finalCallback otherwise to end up the service invocation.
function withFilter(newFilter: IFilter): TableService
Parameters
- newFilter
-
azure-storage.export=.common.filters.IFilter
Returns
TableService
A new service client with the filter applied.
Inherited Method Details
addListener(string, Function)
function addListener(event: string, listener: Function): TableService
Parameters
- event
-
string
- listener
-
Function
Returns
TableService
Inherited From StorageServiceClient.addListener
emit(string, any[])
function emit(event: string, args: any[]): boolean
Parameters
- event
-
string
- args
-
any[]
Returns
boolean
Inherited From StorageServiceClient.emit
listeners(string)
function listeners(event: string): Function[]
Parameters
- event
-
string
Returns
Function[]
Inherited From StorageServiceClient.listeners
on(string, Function)
function on(event: string, listener: Function): TableService
Parameters
- event
-
string
- listener
-
Function
Returns
TableService
Inherited From StorageServiceClient.on
once(string, Function)
function once(event: string, listener: Function): TableService
Parameters
- event
-
string
- listener
-
Function
Returns
TableService
Inherited From StorageServiceClient.once
removeAllListeners(string)
function removeAllListeners(event?: string): TableService
Parameters
- event
-
string
Returns
TableService
Inherited From StorageServiceClient.removeAllListeners
removeListener(string, Function)
function removeListener(event: string, listener: Function): TableService
Parameters
- event
-
string
- listener
-
Function
Returns
TableService
Inherited From StorageServiceClient.removeListener
setMaxListeners(number)
function setMaxListeners(n: number)
Parameters
- n
-
number
Inherited From StorageServiceClient.setMaxListeners
setProxy(Proxy)
Sets proxy object specified by caller.
function setProxy(proxy: Proxy)
Parameters
- proxy
-
azure-storage.export=.common.services.storageserviceclient.Proxy
proxy to use for tunneling { host: hostname port: port number proxyAuth: 'user:password' for basic auth headers: {...} headers for proxy server key: key for proxy server ca: ca for proxy server cert: cert for proxy server } if null or undefined, clears proxy
Inherited From StorageServiceClient.setProxy
Azure SDK for JavaScript
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for