Skip to content

Commit

Permalink
Fix typos in README.md and Javascript samples for Azure Tables (#11632)
Browse files Browse the repository at this point in the history
Closes #11489

- As the issue states, there are some unneeded exports in the Javascript samples for Azure Tables that have been removed.
- As reported by @joheredi , the following replacements in the `README.md` have been done (identified as a bug): `entity.PartitionKey` to `entity.partitionKey` and `entity.RowKey` to `entity.rowKey`.
- Also a little typo in the `README.md` in the same section has been fixed.
  • Loading branch information
piraces authored Oct 6, 2020
1 parent 35b68e4 commit 2fc97d9
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions sdk/tables/data-tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For example, you can create following CORS settings for debugging. But please cu

## Key concepts

- `TableServiceClient` - Client that provides functions to interact at a Table Service level sucn as create, list and delete tables
- `TableServiceClient` - Client that provides functions to interact at a Table Service level such as create, list and delete tables

- `TableClient` - Client that provides functions to interact at an entity level such as create, list and delete entities within a table.

Expand Down Expand Up @@ -275,7 +275,7 @@ async function main() {
let entitiesIter = client.listEntities();
let i = 1;
for await (const entity of entitiesIter) {
console.log(`Entity${i}: PartitionKey: ${entity.PartitionKey} RowKey: ${entity.RowKey}`);
console.log(`Entity${i}: PartitionKey: ${entity.partitionKey} RowKey: ${entity.rowKey}`);
i++;
// Output:
// Entity1: PartitionKey: P1 RowKey: R1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const tablesUrl = process.env["TABLES_URL"] || "";
const accountName = process.env["ACCOUNT_NAME"] || "";
const accountKey = process.env["ACCOUNT_KEY"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotenv.config();

const sasConnectionString = process.env["SAS_CONNECTION_STRING"] || "";

export async function createAndDeleteTable() {
async function createAndDeleteTable() {
console.log("== Delete and create table Sample ==");

// See authenticationMethods sample for other options of creating a new client
Expand All @@ -23,7 +23,7 @@ export async function createAndDeleteTable() {
await serviceClient.deleteTable(tableName);
}

export async function createAndDeleteTableWithTableClient() {
async function createAndDeleteTableWithTableClient() {
// A table can also be created and deleted using a TableClient
console.log("== Delete and create table with TableClient Sample ==");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dotenv.config();
const tablesUrl = process.env["TABLES_URL"] || "";
const sasToken = process.env["SAS_TOKEN"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotenv.config();

const accountConnectionString = process.env["ACCOUNT_CONNECTION_STRING"] || "";

export async function queryTables() {
async function queryTables() {
console.log("== Query tables Sample ==");

// See authenticationMethods sample for other options of creating a new client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dotenv.config();
const tablesUrl = process.env["TABLES_URL"] || "";
const sasToken = process.env["SAS_TOKEN"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function countTablesWithClient(client: TableServiceClient) {
console.log(`Listed ${count} tables`);
}

export async function main() {
async function main() {
console.log("== Client Authentication Methods Sample ==");

await tableServiceClientWithSasConnectionString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const tablesUrl = process.env["TABLES_URL"] || "";
const accountName = process.env["ACCOUNT_NAME"] || "";
const accountKey = process.env["ACCOUNT_KEY"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down Expand Up @@ -44,7 +44,7 @@ interface Entity {
quantity: number;
}

export async function main() {
async function main() {
await createAndDeleteEntities();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotenv.config();

const sasConnectionString = process.env["SAS_CONNECTION_STRING"] || "";

export async function createAndDeleteTable() {
async function createAndDeleteTable() {
console.log("== Delete and create table Sample ==");

// See authenticationMethods sample for other options of creating a new client
Expand All @@ -25,7 +25,7 @@ export async function createAndDeleteTable() {
await serviceClient.deleteTable(tableName);
}

export async function createAndDeleteTableWithTableClient() {
async function createAndDeleteTableWithTableClient() {
// A table can also be created and deleted using a TableClient
console.log("== Delete and create table with TableClient Sample ==");

Expand All @@ -44,7 +44,7 @@ export async function createAndDeleteTableWithTableClient() {
await client.delete();
}

export async function main() {
async function main() {
await createAndDeleteTable();
await createAndDeleteTableWithTableClient();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dotenv.config();
const tablesUrl = process.env["TABLES_URL"] || "";
const sasToken = process.env["SAS_TOKEN"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down Expand Up @@ -68,7 +68,7 @@ interface Entity {
quantity: number;
}

export async function main() {
async function main() {
await createAndDeleteEntities();
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/tables/data-tables/samples/typescript/src/queryTables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotenv.config();

const accountConnectionString = process.env["ACCOUNT_CONNECTION_STRING"] || "";

export async function queryTables() {
async function queryTables() {
console.log("== Query tables Sample ==");

// See authenticationMethods sample for other options of creating a new client
Expand Down Expand Up @@ -37,7 +37,7 @@ export async function queryTables() {
await serviceClient.deleteTable(tableName);
}

export async function main() {
async function main() {
await queryTables();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dotenv.config();
const tablesUrl = process.env["TABLES_URL"] || "";
const sasToken = process.env["SAS_TOKEN"] || "";

export async function createAndDeleteEntities() {
async function createAndDeleteEntities() {
console.log("== Create and delete entities Sample ==");

// Note that this sample assumes that a table with tableName exists
Expand Down Expand Up @@ -57,7 +57,7 @@ interface Entity {
brand?: string;
}

export async function main() {
async function main() {
await createAndDeleteEntities();
}

Expand Down

0 comments on commit 2fc97d9

Please sign in to comment.