
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
github.com/Azure/azure-sdk-for-go/sdk/tables/aztable
Azure Table storage is a service that stores large amounts of structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design.
Azure Cosmos DB provides a Table API for applications that are written for Azure Table storage that need premium capabilities like:
The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.
Install the Azure Tables client library for Go :
If you need to create either of these, you can use the Azure CLI.
Create a storage account mystorageaccount
in resource group MyResourceGroup
in the subscription MySubscription
in the West US region.
Create a Cosmos DB account MyCosmosDBDatabaseAccount
in resource group MyResourceGroup
in the subscription MySubscription
and a table named MyTableName
in the account.
Learn more about options for authentication (including Connection Strings, Shared Key, and Shared Key Signatures) in our samples.
TableServiceClient
- Client that provides methods to interact at the Table Service level such as creating, listing, and deleting tablesTableClient
- Client that provides methods to interact at an table entity level such as creating, querying, and deleting entities within a table.Table
- Tables store data as collections of entities.Entity
- Entities are similar to rows. An entity has a primary key and a set of properties. A property is a name value pair, similar to a column.Common uses of the Table service include:
First, we need to construct a TableServiceClient
.
Next, we can create a new table.
The set of existing Azure tables can be queries using an OData filter.
Individual tables can be deleted from the service.
To interact with table entities, we must first construct a TableClient
.
Let's define a new TableEntity
so that we can add it to the table.
Using the TableClient
we can now add our new entity to the table.
To inspect the set of existing table entities, we can query the table using an OData filter.
If you prefer LINQ style query expressions, we can query the table using that syntax as well.
If we no longer need our new table entity, it can be deleted.
When you interact with the Azure table library using the .NET SDK, errors returned by the service correspond to the same HTTP status codes returned for REST API requests.
For example, if you try to create a table that already exists, a 409
error is returned, indicating "Conflict".
The simplest way to see the logs is to enable the console logging. To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method.
To learn more about other logging mechanisms see here.
Get started with our Table samples.
A list of currently known issues relating to Cosmos DB table endpoints can be found here.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
From the tables dir:
autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztable --module=aztable --openapi-type="data-plane" --credential-scope=none
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.