Comments (7)
Worked on this this afternoon, made a PR. Let me know if you prefer any changes to your accreditation, this RFC was great and I wish I had been able to complete the work sooner.
from electrodb.
Hey @sam3d!
This is definitely the most thorough proposal I've gotten, thank you for the time you took to put this together!
This feature makes a lot of sense and would be a great add to the library. In the near term, this might be a heavier lift than I can manage right at the moment. There are a few areas that this would impact that would add more complexity, namely typing, that I believe will be a large effort.
I don't know exactly when, but I will keep this in mind when I next have more bandwidth. I have another feature (adding auto-sharding) that will likely hit similar places of complexity and I'll likely try to do both.
Let me know if I can help further, and definitely don't let this dissuade you from creating more tickets; my bandwidth is low at the moment, but I'm still actively maintaining it 👍
from electrodb.
Good news, I slept on this (I read somewhere sleep helps...) an realized the typing won't be an issue here.
From a collections perspective, namespace
is a property that can/must be verified at Service instantiation to match across all members. Since it impacts the pk
key there is no reason to allow a collection with mixed namespaces.
So as far as my mental model is concerned I think this goes back to an easy add 🎉
from electrodb.
Whoa that's so exciting! Thank you so much for finding the time to work on this! 🚀
(p.s. really appreciate the accreditation, even though you did literally all of the heavy lifting)
from electrodb.
Heya! 👋
That's absolutely no worries, I'm super grateful for the consideration nonetheless 😊
I hope you don't mind me asking – my understanding of the typing amendments required would be a fairly trivial update to the props on an entity index to include the namespace?: string | string[] | undefined
in a standard way (i.e. not a type parameter). Simply treated as a static prefix that's prepended to the partition key.
It sounds like you're talking about going down a similar route to collections, where a partition namespace can actually refine the typescript typing of which entities a query may produce. Which would be very very cool! But a lot more work than what I was thinking of in my proposal, I imagine.
Thanks again for the awesome library! (p.s. very excited for auto-sharding)
from electrodb.
Yay! That makes sense, and is also pretty much what I had in mind too. Please let me know if there's anything I can do to support 🛟
from electrodb.
Thanks a lot @sam3d and @tywalch, this looks promising 🚀🥇
from electrodb.
Related Issues (20)
- Map attribute with required property creates undefined when property is not present or empty HOT 2
- Support readonly attributes for rebuilding a composite sort key HOT 7
- Computed attributes ignore `field` property during update HOT 4
- Secondary index keys not updated when using composite attributes from table's primary index HOT 13
- Setting initial value for attribute AND performing ADD operation within single `update` call on an Entity object HOT 4
- Feature request: Add Conditional Indexing Based on Attribute Presence HOT 2
- Missing `add` Method in Upsert for Transactional Writes HOT 2
- Table in Section "Attribute Options" malformed HOT 1
- Numeric sort key being ignored when building query params on a query operation. HOT 1
- Feature Request: BatchWrite across entities HOT 2
- UpdateExpression created by `.patch` doesn't account for custom attribute `field` value HOT 3
- ExpressionAttributeNames/Values can include hyphens HOT 5
- Modeling single-partition data HOT 2
- ElectroDB playground: After Page Load, the caret in code-editor is not aligned with the letters sometimes
- Specifying `response: 'all_new'` on `.update()` returns `Partial<T>` instead of `T` HOT 2
- Broken link in docs (Pagination) HOT 2
- Improve schema type using const type parameters
- Removing attributes with upsert HOT 9
- Invalid params generated for patch/update where table/GSI specified with Composite Attribute Templates HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrodb.