You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some code using dynamo-types where I was just grabbing the connection made by that library and doing a direct sdk call, and I had access to it with this command:
I see in the docs/code that Dyngoose has a DocumentClient which can be defined in the model but this looks like something different, a coincidentally named class and not the actual @AWS-SDK documentClient. I did find in the source code something like
MyTableClass.schema.dynamodb but this isn't the client either, although MyTableClass.schema.name looks like it would be the table name that's usable. Any advice on how to make "direct" sdk code work with the ORM (which I know long term just convert into ORM code but that's a refactor for later, right now just doing a transition.)
The text was updated successfully, but these errors were encountered:
Sorry for a late response here. I am not sure if you've found a workaround to this, if so, please let me know how you worked around this.
DynamoDB doesn't rely on the aws-sdk DocumentClient, it has its own wrapper for transforming values bidirectionally between DynamoDB and JavaScript, which internally can fallback to the same marshall utility that aws-sdk uses.
There is a confusingly similarly class named the DocumentClient though. It's exposed as a way to get the operation Dynoose will call when calling put, update, or delete to either review the operations or manipulate them and pass them directly to a DynamoDB Client.
Dyngoose exposes some utilities like update on the PrimaryKey class, but the APIs are not the same.
You can create an aws-sdk DocumentClient and keep the same calls, if you'd like to reuse the same dynamodb connection, Dyngoose does expose that on the tables as MyTableClass.schema.dynamo which can be used to create a DocumentClient.
I had some code using dynamo-types where I was just grabbing the connection made by that library and doing a direct sdk call, and I had access to it with this command:
I see in the docs/code that Dyngoose has a DocumentClient which can be defined in the model but this looks like something different, a coincidentally named class and not the actual @AWS-SDK documentClient. I did find in the source code something like
MyTableClass.schema.dynamodb but this isn't the client either, although MyTableClass.schema.name looks like it would be the table name that's usable. Any advice on how to make "direct" sdk code work with the ORM (which I know long term just convert into ORM code but that's a refactor for later, right now just doing a transition.)
The text was updated successfully, but these errors were encountered: