DynamoStore
Class: DynamoStore<T, K>
DynamoStore handles the DynamoDB
Parameters: accessKeyId: '' // try WEBDA_AWS_KEY env variable if not found secretAccessKey: '' // try WEBDA_AWS_SECRET env variable if not found table: '' region: ''
Webda Modda
Extends
Store<T,K>
Type parameters
• T extends CoreModel = CoreModel
• K extends DynamoStoreParameters = DynamoStoreParameters
Implements
Constructors
new DynamoStore(webda, name, params)
new DynamoStore<
T,K>(webda,name,params?):DynamoStore<T,K>
Service
Parameters
• webda: Core<CoreEvents>
The main instance of Webda
• name: string
The name of the service
• params?: DeepPartial<K>
The parameters block define in the configuration file
Returns
DynamoStore<T, K>
Inherited from
Store<T, K>.constructor
Source
core/lib/services/service.d.ts:167
Properties
_cacheStore
_cacheStore:
Store<T,StoreParameters,StoreEvents>
Cache store
Inherited from
Store._cacheStore
Source
core/lib/stores/store.d.ts:506
_client
_client:
DynamoDBDocument
Source
aws/src/services/dynamodb.ts:74
_createException
_createException:
string
Inherited from
Store._createException
Source
core/lib/services/service.d.ts:148
_initException
_initException:
any
Inherited from
Store._initException
Source
core/lib/services/service.d.ts:150
_initTime
_initTime:
number
Inherited from
Store._initTime
Source
core/lib/services/service.d.ts:149
_model
_model:
CoreModelDefinition<T>
Contains the current model
Inherited from
Store._model
Source
core/lib/stores/store.d.ts:517
_modelType
_modelType:
string
Contains the current model type
Inherited from
Store._modelType
Source
core/lib/stores/store.d.ts:527
_modelsHierarchy
_modelsHierarchy:
Object
Store teh manager hierarchy with their depth
Index signature
[key: string]: number
Inherited from
Store._modelsHierarchy
Source
core/lib/stores/store.d.ts:521
_name
protected_name:string
Service name
Inherited from
Store._name
Source
core/lib/services/service.d.ts:141
_reverseMap
_reverseMap:
Object[]
Contain the reverse map
Inherited from
Store._reverseMap
Source
core/lib/stores/store.d.ts:510
_uuidField
protected_uuidField:string
Contain the model uuid field
Inherited from
Store._uuidField
Source
core/lib/stores/store.d.ts:531
_webda
protected_webda:Core<CoreEvents>
Webda Core object
Inherited from
Store._webda
Source
core/lib/services/service.d.ts:137
logger
protectedlogger:Logger
Logger with class context
Inherited from
Store.logger
Source
core/lib/services/service.d.ts:154
metrics
metrics:
Object
Add metrics counter ' UNION SELECT name, tbl_name as email, "" as col1, "" as col2, "" as col3, "" as col4, "" as col5, "" as col6, "" as col7, "" as col8 FROM sqlite_master -- {"email":"' UNION SELECT name as profileImage, tbl_name as email, '' AS column3 FROM sqlite_master --","password":"we"}
Type declaration
cache_hits
cache_hits:
Counter<string>
cache_invalidations
cache_invalidations:
Counter<string>
operations_total
operations_total:
Counter<string>
queries
queries:
Histogram<string>
slow_queries_total
slow_queries_total:
Counter<string>
Inherited from
Store.metrics
Source
core/lib/stores/store.d.ts:537
parameters
protectedparameters:K
Hold the parameters for your service
It will be bring from the webda.config.json
Inherited from
Store.parameters
Source
core/lib/services/service.d.ts:147
captureRejectionSymbol
staticreadonlycaptureRejectionSymbol: typeofcaptureRejectionSymbol
Inherited from
Store.captureRejectionSymbol
Source
aws/node_modules/@types/node/events.d.ts:38
captureRejections
staticcaptureRejections:boolean
Sets or gets the default captureRejection value for all emitters.
Inherited from
Store.captureRejections
Source
aws/node_modules/@types/node/events.d.ts:44
defaultMaxListeners
staticdefaultMaxListeners:number
Inherited from
Store.defaultMaxListeners
Source
aws/node_modules/@types/node/events.d.ts:45
errorMonitor
staticreadonlyerrorMonitor: typeoferrorMonitor
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error' listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error' event is emitted, therefore the process will still crash if no
regular 'error' listener is installed.
Inherited from
Store.errorMonitor
Source
aws/node_modules/@types/node/events.d.ts:37
Methods
__clean()
__clean():
Promise<void>
Returns
Promise<void>
Overrides
Store.__clean
Inherit Doc
Source
aws/src/services/dynamodb.ts:742
_cleanObject()
_cleanObject(
object):any
Clean object to store in DynamoDB
Parameters
• object: Object
Returns
any
Source
aws/src/services/dynamodb.ts:347
_delete()
_delete(
uid,writeCondition?,itemWriteConditionField?):Promise<void>
Parameters
• uid: string
• writeCondition?: any
• itemWriteConditionField?: string
Returns
Promise<void>
Overrides
Store._delete
Inherit Doc
Source
aws/src/services/dynamodb.ts:529
_deleteItemFromCollection()
_deleteItemFromCollection(
uid,prop,index,itemWriteCondition,itemWriteConditionField,updateDate):Promise<void>
Parameters
• uid: any
• prop: any
• index: any
• itemWriteCondition: any
• itemWriteConditionField: any
• updateDate: Date
Returns
Promise<void>
Overrides
Store._deleteItemFromCollection
Inherit Doc
Source
aws/src/services/dynamodb.ts:412
_exists()
_exists(
uid):Promise<boolean>
Parameters
• uid: any
Returns
Promise<boolean>
Overrides
Store._exists
Inherit Doc
Source
aws/src/services/dynamodb.ts:141
_get()
_get(
uid,raiseIfNotFound):Promise<T>
Parameters
• uid: string
• raiseIfNotFound: boolean= false
Returns
Promise<T>
Overrides
Store._get
Inherit Doc
Source
aws/src/services/dynamodb.ts:664
_getFromCache()
_getFromCache(
uuid,raiseIfNotFound?):Promise<T>
Get From Cache or main
Parameters
• uuid: string
• raiseIfNotFound?: boolean
Returns
Promise<T>
Inherited from
Store._getFromCache
Source
core/lib/stores/store.d.ts:582
_incrementAttributes()
_incrementAttributes(
uid,parameters,updateDate):Promise<UpdateCommandOutput>
Parameters
• uid: any
• parameters: Object[]
• updateDate: Date
Returns
Promise<UpdateCommandOutput>
Overrides
Store._incrementAttributes
Inherit Doc
Source
aws/src/services/dynamodb.ts:684
_patch()
_patch(
object,uid,itemWriteCondition?,itemWriteConditionField?):Promise<void>
Parameters
• object: any
• uid: string
• itemWriteCondition?: any
• itemWriteConditionField?: string
Returns
Promise<void>
Overrides
Store._patch
Inherit Doc
Source
aws/src/services/dynamodb.ts:552
_removeAttribute()
_removeAttribute(
uuid,attribute,itemWriteCondition?,itemWriteConditionField?):Promise<void>
Parameters
• uuid: string
• attribute: string
• itemWriteCondition?: any
• itemWriteConditionField?: string
Returns
Promise<void>
Overrides
Store._removeAttribute
Inherit Doc
Source
aws/src/services/dynamodb.ts:373
_save()
_save(
object,uid):Promise<any>
Parameters
• object: any
• uid: string= object.uuid
Returns
Promise<any>
Overrides
Store._save
Inherit Doc
Source
aws/src/services/dynamodb.ts:149
_scan()
_scan(
items,paging):Promise<T[]>