Azure / Azure/Azurite

Azurite doesn't support filter parameter when use query table operation on table.

Open
#675 10 comments 0 reactions 0 assignees View on GitHub
featureparity NewArch p0 table-storage
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

**Error Description:**
Azurite doesn't support filter parameter and return all tables when use query table operation on table.

**To Reproduce:**
The demo code is shown as following:
```
import * as assert from "assert"
import { TableServiceClient, odata } from "@azure/data-tables";

async function main() {
const tableName = "mytable";
const tableServiceClient = TableServiceClient.fromConnectionString("");
await tableServiceClient.createTable(tableName);
var queryTableResults = tableServiceClient.listTables({
queryOptions: { filter: odata`TableName eq ${tableName}` }
});
for await (const table of queryTableResults) {
assert.ok(table.tableName);
}

await tableServiceClient.deleteTable(tableName);
queryTableResults = tableServiceClient.listTables({
queryOptions: { filter: odata`TableName eq ${tableName}` }
});
for await (const table of queryTableResults) {
assert.ok(!table.tableName);
}
}

main().catch((err) => {
console.error(err);
});
```

**Error Track:**
In Azurite, the statement of the method `queryTable` lacks filter parameter. the code is shown as following:
[https://github.com/Azure/Azurite/blob/table/src/table/persistence/LokiTableMetadataStore.ts#L153](https://github.com/Azure/Azurite/blob/table/src/table/persistence/LokiTableMetadataStore.ts#L153)
![Screenshot 2021-01-14 182505](https://user-images.githubusercontent.com/20970631/104578648-f1b1a880-5695-11eb-90c2-ebce8e85ea52.png)

**Expected Behavior:**
Azurite support filter parameter when use query table operation on table.

@jongio for notification.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.