-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Across entities query #503
Comments
Generally, we try to design our keys and indexes so that a single query can fetch a collection. Is this what you mean or do you mean OneTable providing an API that will do multiple low level DynamoDB operations? Can you give an example: |
Hi mobsense. I mean to get multiple entities not items. Example: await table.find(["User", "Order"], { userId: "user_anyuuid1" });
// return: {
// user: [
// {
// pk: "user_anyuuid1",
// sk: "user_anyuuid1",
// userId: "user_anyuuid1",
// }
// ],
// order: [
// {
// pk: "user_anyuuid1",
// sk: "order_anyuuid1",
// orderId: "order_anyuuid1",
// orderedBy: "user_anyuuid1",
// },
// {
// pk: "user_anyuuid1",
// sk: "order_anyuuid2",
// orderId: "order_anyuuid2",
// orderedBy: "user_anyuuid1",
// },
// ]
// } ElectroDB can query like as this with typescript typing. https://electrodb.dev/en/modeling/collections/ I believe it is very helpful for users using TS. |
Thank you. |
This would be a great addition to the library. |
Across entities query is the essence of single-table design.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-relational-modeling.html
As electrodb, if also onetable gets support of across entities query, it will be super extra value of this product I think.
https://electrodb.dev/en/core-concepts/single-table-relationships/
The text was updated successfully, but these errors were encountered: