melchyore / adonis-dynamodb Goto Github PK
View Code? Open in Web Editor NEWA DynamoDB (Dyngoose) wrapper for AdonisJs
License: MIT License
A DynamoDB (Dyngoose) wrapper for AdonisJs
License: MIT License
Thanks for your work, @Melchyore! Is there a plan to support DAX connections soon? From the documentation, it seems that DAX is set up differently.
I will try to contribute as well if there are no plans yet. Thank you!
Dyngoose connection for DAX - https://github.com/benhutchins/dyngoose/blob/master/docs/Connections.md#dynamodb-accelerator-dax
Encountering error when importing the library itself. Here is how we import the library:
import type {Query} from '@ioc:Adonis/Addons/DynamoDB'
import Env from '@ioc:Adonis/Core/Env'
import {DynamoDB} from '@ioc:Adonis/Addons/DynamoDB'
This error shows up when using yarn dev
or running the dev server using npm
.
However when deploying the app on Docker the issue doesn't shows up. I must have been running this on detached that is why I don't see the Docker error.
"adonis-dynamodb": "^1.2.3"
[ info ] re-starting http server...
IocLookupException
E_IOC_LOOKUP_FAILED: Cannot resolve "Adonis/Addons/DynamoDB" namespace from the IoC Container
at Function.lookupFailed <path>/node_modules/@adonisjs/fold/build/src/Exceptions/IocLookupException.js:18
13| /**
14| * Raised when unable to lookup a namespace
15| */
16| class IocLookupException extends utils_1.Exception {
17| static lookupFailed(namespace) {
> 18| return new this(`Cannot resolve "${namespace}" namespace from the IoC Container`, 500, 'E_IOC_LOOKUP_FAILED');
19| }
20| /**
21| * Invalid namespace type
22| */
23| static invalidNamespace() {
1 Ioc.lookupOrFail
<path>/node_modules/@adonisjs/fold/build/src/Ioc/index.js:254
2 Ioc.use
<path>/node_modules/@adonisjs/fold/build/src/Ioc/index.js:308
3 Object.<anonymous>
<path>/app/DynamoDb/DynamoDb.ts:3
4 Module._compile
<path>/node_modules/pirates/lib/index.js:136
5 Object.newLoader [as .ts]
<path>/node_modules/pirates/lib/index.js:141
[ warn ] Underlying HTTP server died with "0 code"
Do you have plan to migrate to AWS SDK v3?
NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
Has anybody else experienced where in the DynamoDB model doesn't return all properties indicated? I tried console logging the DynamoDB query output and it shows the properties that are missings but when converting the output to JSON it's missing properties. Here is an example:
...
@DynamoDB.$Table({name: Env.get('TABLE', '')})
export default class DynamoDb extends DynamoDB.Table {
...
@DynamoDB.Attribute.String()
public name: string
@DynamoDB.Attribute.String()
public description: string
@DynamoDB.Attribute.String()
public sample: string
@DynamoDB.Attribute.Any()
public type: string | number
@DynamoDB.Attribute.Any()
public order: string | number
@DynamoDB.Attribute.Any()
public sample: string
@DynamoDB.Attribute.Any() // Even tried StringSet but doesn't work
public values: Array<string>
....
}
// console.log(dynamoOutput)
...
name: {S: 'Test'},
description: {S: 'Test description'},
sample: {S: 'Test example'}, // <-- this is missing when toJSON is called
type: {N: 1}, // <-- this is missing when toJSON is called
...
// console.log(dynamoOutput.toJSON())
{
name: 'Test',
description: 'Test description'
}
"adonis-dynamodb": "^1.2.3"
toJSON()
There is a new version of Dyngoose where it supports Attribute.Dynamic
which would be very helpful as it supports mixed or multiple attribute/value on a single property. It would be great if the version dependency of this library be updated to that version. Attributes#Dynamic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.