When using document-based storage, allow projecting certain properties to columns
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- azure, csharp
- Domain
- backend-api-design, databases
Research direction
Start by locating the document repository creation API and the table repository CreateQuery implementation mentioned in the issue. Compare how repository capabilities are exposed, then determine how projected properties and the proposed constrained async query would fit. Done means the design is settled and document storage supports querying the selected properties as columns.
Written by the indexing model from the issue text.
Description
This could be handy to allow querying by those columns in particular.
So maybe it could be via an implemented interface that's then used when creating the repository? For example: DocumentRepository.Create<Book, IAddressable>()?
public static IDocumentRepository<T> Create<T, TProperties>(...)
where T: class, TProperties
where TProperties: IDocumentEntity
Where the returned document repository augmented IDocumentRepository<T> with the ability to perform queries, such as:
public interface IDocumentRepository<T, TProperties> : IDocumentRepository<T>
where T : class, TProperties
{
IAsyncEnumerable<T> CreateQuery(Expression<Func<TProperties, bool>> predicate, CancellationToken cancellation = default);
}
Note that unlike table repository IQueryable<T> CreateQuery() version, we need to restrict the available properties for querying to the TProperties since not all T properties will be available as columns. So using an expression for the properties and an async enumerable with the full entity type seems the most natural.
- Dominant language
- C#
- Stars
- 27
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devlooped/TableStorage
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 15/100
devlooped/TableStorage#426 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
devlooped/TableStorage#351 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
devlooped/TableStorage#342 ·
All issues in devlooped/TableStorage
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
