diff --git a/docs/2.drivers/azure.md b/docs/2.drivers/azure.md index 6db38c3a9..e648ad5a9 100644 --- a/docs/2.drivers/azure.md +++ b/docs/2.drivers/azure.md @@ -201,27 +201,25 @@ The driver supports the following authentication methods: ## Azure Table Storage -Store data in a Azure table storage. +Store data in Azure Table Storage. ### Usage **Driver name:** `azure-storage-table` ::note{to="https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/tables/data-tables"} -Learn more about Azure table storage. +Learn more about Azure Table Storage. :: ::warning -This driver is currently not compatible with edge workers like Cloudflare Workers or Vercel Edge Functions. There may be a http based driver in the future. +This driver is currently not compatible with edge workers like Cloudflare Workers or Vercel Edge Functions. There may be an HTTP-based driver in the future. :: -Store data in a [data-tables](). +This driver stores key-value information in Azure Table Storage. All entries are stored in the same table and partition (by default, both are named `unstorage`). The value is stored in the `unstorageValue` field, and the key is used as the `rowKey`. -This driver stores KV information in a Azure table storage. The same partition key is used for all keys and the field `unstorageValue` is used to store the value. +To use it, you will need to install `@azure/data-tables` and `@azure/identity` in your project: -To use it, you will need to install `@azure/data-table` and `@azure/identity` in your project: - -:pm-install{name="@azure/data-table @azure/identity"} +:pm-install{name="@azure/data-tables @azure/identity"} Please make sure that the table you want to use exists in your storage account. @@ -246,12 +244,21 @@ The driver supports the following authentication methods: - **`AzureNamedKeyCredential`** (only available in Node.js runtime): This will use the `accountName` and `accountKey` to authenticate the request. - **`AzureSASCredential`**: This will use the `accountName` and `sasToken` to authenticate the request. -- **connection string** (only available in Node.js runtime): This will use the `connectionString` to authenticate the request. This is not recommended as it will expose your account key in plain text. +- **Connection string** (only available in Node.js runtime): This will use the `connectionString` to authenticate the request. This is not recommended as it will expose your account key in plain text. **Options:** - **`accountName`** (required): The name of your storage account. - `tableName`: The name of the table to use. Defaults to `unstorage`. - `partitionKey`: The partition key to use. Defaults to `unstorage`. -- `accountKey`: The account key to use for authentication. This is only required if you are using `AzureNamedKeyCredential`. -- +- `accountKey`: The account key for authentication (used with `AzureNamedKeyCredential`). +- `sasKey`: The SAS token for authentication (used with `AzureSASCredential`). +- `connectionString`: The storage account connection string (takes precedence over `accountKey` and `sasKey`). +- `pageSize`: The number of entries to retrieve per request (affects `getKeys()` and `clear()` performance). Maximum is 1000. Defaults to 1000. + +**Driver behavior:** + +- All entries are stored in the same table and partition. +- The key is stored as the `rowKey`, and the value as `unstorageValue`. +- `getKeys()` and `clear()` use paginated queries, with the page size controlled by `pageSize`. +- Metadata (`getMeta`) includes the entity's last modified time (`timestamp`) and ETag.