Why is the jClient a member of the tables?
Opened this issue · 1 comments
I noticed that the underlying Dynamo client is a member of the table definitions. I am wondering why this is the case?
It feels like it goes against my intuition of seeing table definitions as pure data structures. I wonder if their inclusion undermines the table/indexes classes as pure/case
Also, unwinding this decision would be huge for the API so maybe something to consider for a v2 or overhaul
Great point. I think the naming could have been better to avoid this being counter intuitive. The reason it was part of the table's construction so that the API can be short (otherwise, each calls i.e. get
, put
etc..) would need a client
to be passed in. I see table
as "service" layer in an application where low level client(s) being DI into.