adding azure table client module
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
export interface TableOptions {
|
||||
accountName: string;
|
||||
accountKey: string;
|
||||
tableName: string;
|
||||
}
|
||||
@@ -10,9 +10,9 @@ export class TableService {
|
||||
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 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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@noahspan/noahspan-modules",
|
||||
"version": "0.3.7",
|
||||
"version": "0.3.8",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"license": "UNLICENSED",
|
||||
|
||||
Reference in New Issue
Block a user