Feature/3 add az table module (#6)
* adding azure table client module * adding azure table client module * adding azure table client module
This commit was merged in pull request #6.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
export interface TableOptions {
|
export interface TableOptions {
|
||||||
accountName: string;
|
accountName: string;
|
||||||
accountKey: string;
|
accountKey: string;
|
||||||
tableName: string;
|
|
||||||
}
|
}
|
||||||
@@ -10,9 +10,9 @@ export class TableService {
|
|||||||
private tablesOptions: TableOptions
|
private tablesOptions: TableOptions
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async getTableClient(): Promise<TableClient> {
|
async getTableClient(tableName: string): Promise<TableClient> {
|
||||||
const credential: AzureNamedKeyCredential = new AzureNamedKeyCredential(this.tablesOptions.accountName, this.tablesOptions.accountKey);
|
const credential: AzureNamedKeyCredential = new AzureNamedKeyCredential(this.tablesOptions.accountName, this.tablesOptions.accountKey);
|
||||||
const tableClient: TableClient = new TableClient(`https://${this.tablesOptions.accountName}`, this.tablesOptions.tableName, credential);
|
const tableClient: TableClient = new TableClient(`https://${this.tablesOptions.accountName}.table.core.windows.net`, tableName, credential);
|
||||||
|
|
||||||
return tableClient;
|
return tableClient;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@noahspan/noahspan-modules",
|
"name": "@noahspan/noahspan-modules",
|
||||||
"version": "0.3.7",
|
"version": "0.3.8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
|
|||||||
Reference in New Issue
Block a user